convert-to-spaces
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

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.

Related

Readme

Keywords

Package Sidebar

Install

npm i convert-to-spaces

Weekly Downloads

779,899

Version

2.0.1

License

MIT

Unpacked Size

2.96 kB

Total Files

5

Last publish

Collaborators

  • vdemedes