Skip to content
0347b72305
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/convert-to-spaces/
codeql-action/node_modules/convert-to-spaces/

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
May 13, 2020 11:13
May 13, 2020 11:13
May 13, 2020 11:13
May 13, 2020 11:13

convert-to-spaces Build Status

Convert tabs to spaces in a string

Install

$ npm install --save convert-to-spaces

Usage

const convertToSpaces = require('convert-to-spaces');

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

API

convertToSpaces(str, [spaces])

str

Type: string

Source string.

spaces

Type: number
Default: 2

Number of spaces instead of each tab.

Related

License

MIT © Vadim Demedes