detab

WebJar for detab

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

detab
Last Version

Last Version

2.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

detab
WebJar for detab
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/wooorm/detab

Download detab

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/detab/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>detab</artifactId>
    <version>2.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/detab/
implementation 'org.webjars.npm:detab:2.0.3'
// https://jarcasting.com/artifacts/org.webjars.npm/detab/
implementation ("org.webjars.npm:detab:2.0.3")
'org.webjars.npm:detab:jar:2.0.3'
<dependency org="org.webjars.npm" name="detab" rev="2.0.3">
  <artifact name="detab" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='detab', version='2.0.3')
)
libraryDependencies += "org.webjars.npm" % "detab" % "2.0.3"
[org.webjars.npm/detab "2.0.3"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : repeat-string jar [1.5.4,2)

Project Modules

There are no modules declared in this project.

detab

Build Coverage Downloads Size

Detab: tabs → spaces.

Install

npm:

npm install detab

Use

var detab = require('detab')

console.log(detab('\tfoo\nbar\tbaz'))
console.log(detab('\tfoo\nbar\tbaz', 2))
console.log(detab('\tfoo\nbar\tbaz', 8))

Yields:

    foo
bar baz
  foo
bar baz
        foo
bar     baz

API

detab(value[, size=4])

Replace tabs with spaces in value (string), being smart about which column the tab is at and which size (number, default: 4) should be used.

License

MIT © Titus Wormer

Versions

Version
2.0.3
2.0.2