trim-newlines

WebJar for trim-newlines

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

trim-newlines
Last Version

Last Version

3.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

trim-newlines
WebJar for trim-newlines
Project URL

Project URL

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

Source Code Management

https://github.com/sindresorhus/trim-newlines

Download trim-newlines

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/trim-newlines/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>trim-newlines</artifactId>
    <version>3.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/trim-newlines/
implementation 'org.webjars.npm:trim-newlines:3.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/trim-newlines/
implementation ("org.webjars.npm:trim-newlines:3.0.0")
'org.webjars.npm:trim-newlines:jar:3.0.0'
<dependency org="org.webjars.npm" name="trim-newlines" rev="3.0.0">
  <artifact name="trim-newlines" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='trim-newlines', version='3.0.0')
)
libraryDependencies += "org.webjars.npm" % "trim-newlines" % "3.0.0"
[org.webjars.npm/trim-newlines "3.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.

trim-newlines Build Status

Trim newlines from the start and/or end of a string

Install

$ npm install trim-newlines

Usage

const trimNewlines = require('trim-newlines');

trimNewlines('\nšŸ¦„\r\n');
//=> 'šŸ¦„'

trimNewlines.start('\nšŸ¦„\r\n');
//=> 'šŸ¦„\r\n'

trimNewlines.end('\nšŸ¦„\r\n');
//=> '\nšŸ¦„'

API

trimNewlines(string)

Trim from the start and end of a string.

trimNewlines.start(string)

Trim from the start of a string.

trimNewlines.end(string)

Trim from the end of a string.

Related

  • trim-left - Similar to String#trim() but removes only whitespace on the left
  • trim-right - Similar to String#trim() but removes only whitespace on the right.

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
3.0.0
2.0.0
1.0.0