733 B
733 B
convert-to-spaces
Convert tabs to spaces in a string
Install
$ npm install --save convert-to-spaces
Usage
const convertToSpaces = require('convert-to-spaces');
convertToSpaces('\t\thello!');
//=> ' hello!'
API
convertToSpaces(str, [spaces])
str
Type: string
Source string.
spaces
Type: number
Default: 2
Number of spaces instead of each tab.
Related
- convert-to-tabs - Convert spaces to tabs.
License
MIT © Vadim Demedes