indentation-length
v0.0.1
Published
indentation of a string
Downloads
5
Readme
indentation-length
Returns the indentation length of a string. Tabs and spaces are treated equally.
const indentation = require('indentation-length')
const indented = ' whammy'
console.log(indentation(indented)) // 3
const str = 'bam'
console.log(indentation(str)) // 0