trim-char

0.1.2 • Public • Published

trim-char

Travis Coveralls branch license

Trim characters from a string.

Install

$ npm install --save trim-char

Usage

import trim from 'trim-char';

trim('foobar', 1); // -> ooba
trim('foobar', 2); // -> ob

API

trim(value, length)

Trims the value on both ends.

value

Type: String

The string to trim.

length

Type: Number

How much characters to cut off on each end.

License

MIT © Vu Tran

Package Sidebar

Install

npm i trim-char

Weekly Downloads

4

Version

0.1.2

License

MIT

Last publish

Collaborators

  • vutran