1.0.3 • Published 7 years ago

convert-to-tabs v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

convert-to-tabs Build Status

Convert tabs to spaces in a string

Install

$ npm install --save convert-to-tabs

Usage

const convertToTabs = require('convert-to-tabs');

convertToTabs('    hello');
//=> '\t\thello'

convertToTabs('    hello', 4);
//=> '\thello'

API

convertToTabs(str, spaces)

str

Type: string

Source string.

spaces

Type: number Default: 2

Number of spaces to treat as one tab.

Related

License

MIT © Vadim Demedes

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago