redent

WebJar for redent

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

redent
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

redent
WebJar for redent
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/redent

Download redent

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : indent-string jar [3.0.0,4)
org.webjars.npm : strip-indent jar [2.0.0,3)

Project Modules

There are no modules declared in this project.

redent

Strip redundant indentation and indent the string

Install

$ npm install redent

Usage

const redent = require('redent');

redent('\n  foo\n    bar\n', 1);
//=> '\n foo\n   bar\n'

API

redent(string, count?, options?)

string

Type: string

The string to normalize indentation.

count

Type: number
Default: 0

How many times you want options.indent repeated.

options

Type: object

indent

Type: string
Default: ' '

The string to use for the indent.

includeEmptyLines

Type: boolean
Default: false

Also indent empty lines.


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Versions

Version
2.0.0
1.0.0