npm.io
2.0.1 • Published 4 years ago

convert-to-spaces

Licence
MIT
Version
2.0.1
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
4

convert-to-spaces Build Status

Convert tabs to spaces in a string

Install

$ npm install --save convert-to-spaces

Usage

import convertToSpaces from 'convert-to-spaces';

convertToSpaces('\t\thello!');
//=> '    hello!'

API

convertToSpaces(input, [spaces])
input

Type: string

String to convert.

spaces

Type: number
Default: 2

Number of spaces instead of each tab.

Keywords