convert-to-spaces
Convert tabs to spaces in a string
Last updated 3 years ago by vdemedes .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install convert-to-spaces 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.0.1                                ...           latest (3 years ago)

5 Versions

  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (6)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |