tab-to-space
v1.0.1
Published
Converts tabs to approproate number of spaces
Downloads
256
Maintainers
Readme
Tabs to Spaces
Convert a string containing tabs to appropriate number of spaces.
Installation
Either through cloning with git or by using npm (the recommended way):
npm install tab-to-space
Usage
const tabToSpace = require('tab-to-space')
Use var_dump while development for printing details of variables and functions.
let text = '\t\t[FirstName]\t\t\t\t=> TEST\n' +
' [LastName] => TEST\n'
// convert tabs to spaces
tabToSpace(text, 4)
This will return:
' [FirstName] => TEST\n' +
' [LastName] => TEST\n'