mirror of https://gitee.com/antv-l7/antv-l7
f7e5376b7d | ||
---|---|---|
.. | ||
index.js | ||
license | ||
package.json | ||
readme.md |
readme.md
detab
Detab: tabs → spaces.
Installation
npm:
npm install detab
Usage
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.