fleet-docs/node_modules/detab
divya-mohan0209 9de94a264c Initial commit 2022-09-22 09:54:31 +05:30
..
index.js Initial commit 2022-09-22 09:54:31 +05:30
license Initial commit 2022-09-22 09:54:31 +05:30
package.json Initial commit 2022-09-22 09:54:31 +05:30
readme.md Initial commit 2022-09-22 09:54:31 +05:30

readme.md

detab

Build Coverage Downloads Size

Detab: tabs → spaces.

Install

npm:

npm install detab

Use

var detab = require('detab')

console.log(detab('\tfoo\nbar\tbaz'))
console.log(detab('\tfoo\nbar\tbaz', 2))
console.log(detab('\tfoo\nbar\tbaz', 8))

Yields:

    foo
bar baz
  foo
bar baz
        foo
bar     baz

API

detab(value[, size=4])

Replace tabs with spaces in value (string), being smart about which column the tab is at and which size (number, default: 4) should be used.

License

MIT © Titus Wormer