项目作者: vutran

项目描述 :
:scissors: Trim characters from a string.
高级语言: JavaScript
项目地址: git://github.com/vutran/trim-char.git
创建时间: 2017-03-01T01:36:17Z
项目社区:https://github.com/vutran/trim-char

开源协议:MIT License

下载


trim-char

Travis Coveralls branch license

Trim characters from a string.

Install

  1. $ npm install --save trim-char

Usage

  1. import trim from 'trim-char';
  2. trim('foobar', 1); // -> ooba
  3. 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