🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

expandtabs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expandtabs

Javascript version of expandtabs

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

expandtabs Build Status XO: Linted

Javascript version of expandtabs

Return a copy where all tab characters are expanded using spaces.

This code bases on an article in Chris West's Blog : JavaScript – String.prototype.expandTabs() Revisited.

Support fullwidth characters and ANSI escape codes.

Install

$ npm install expandtabs

Usage

const expandTabs = require('expandtabs');

expandTabs('aaa\tbbb');
//=> aaa        bbb

API

expandTabs(string, tabSize?)

string

Type: string

String need to be expanded.

tabSize

Type: number
Default: 8

Size of a tab.

FAQs

Package last updated on 03 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts