tabs-to-spaces-stream
A little library that converts tabs in streaming data to spaces.
Installation
npm install --save tabs-to-spaces-stream
Usage
const fs = const convertStream = const myStream = fs //contents: hello world myStream // hello world
API
convertStream(numberOfSpaces)
const convertStream = /** * Returns a transform stream converting tabs to spaces. * Buffer streams will be converted to strings by default. * * @param * to replace each tab with. * @throws * @returns */ src
convert(str, numberOfSpaces)
Alternatively you can use the base function that converts tabs to spaces in a string.
const convert = /*** Returns a string converting tabs to spaces** @param* @param* to replace each tab with. Default is 2.* @returns */ // 'Hello world'
Contributing
This is a pretty small library but if you find any issues, I'll happily take pull requests.
License
MIT