indentation-length

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i indentation-length

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • rogerbf