1.0.0 • Published 5 years ago
expandtabs v1.0.0
expandtabs
Javascript version of expandtabs
Return a copy where all tab characters are expanded using spaces.
This code bases on an article in Chris West's Blog : JavaScript – String.prototype.expandTabs() Revisited.
Support fullwidth characters and ANSI escape codes.
Install
$ npm install expandtabs
Usage
const expandTabs = require('expandtabs');
expandTabs('aaa\tbbb');
//=> aaa bbb
API
expandTabs(string, tabSize?)
string
Type: string
String need to be expanded.
tabSize
Type: number
Default: 8
Size of a tab.
1.0.0
5 years ago