JSPM

convert-to-spaces

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3136927
  • Score
    100M100P100Q211451F
  • License MIT

Convert tabs to spaces in a string

Package Exports

  • convert-to-spaces

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (convert-to-spaces) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

convert-to-spaces Build Status

Convert tabs to spaces in a string

Supports multiline strings as well.

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.

License

MIT © vdemedes