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.
$ npm install expandtabs
const expandTabs = require('expandtabs');
expandTabs('aaa\tbbb');
//=> aaa bbb
Type: string
String need to be expanded.
Type: number
Default: 8
Size of a tab.