indent-string

WebJar for indent-string

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

indent-string
Last Version

Last Version

4.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

indent-string
WebJar for indent-string
Project URL

Project URL

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

Source Code Management

https://github.com/sindresorhus/indent-string

Download indent-string

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

indent-string Build Status

Indent each line in a string

Install

$ npm install indent-string

Usage

const indentString = require('indent-string');

indentString('Unicorns\nRainbows', 4);
//=> '    Unicorns\n    Rainbows'

indentString('Unicorns\nRainbows', 4, {indent: '♥'});
//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows'

API

indentString(string, count?, options?)

string

Type: string

The string to indent.

count

Type: number
Default: 1

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.

Related


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
4.0.0
3.2.0
3.0.0
2.1.0
1.2.1