0.0.1 • Published 8 years ago
indentation-length v0.0.1
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
0.0.1
8 years ago