An open API service indexing awesome lists of open source software.

https://github.com/afeiship/next-trim

Trim space or customize string.
https://github.com/afeiship/next-trim

next trim

Last synced: 10 months ago
JSON representation

Trim space or customize string.

Awesome Lists containing this project

README

          

# next-trim
> Trim space or customize string.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-trim
```

## usage
```js
import '@jswork/next-trim';

//1. trim space:
nx.trim(' abc');
nx.trim(' abc ');
nx.trim('abc ');

// abc

// 2.trim char
nx.trim('/sso-login.html','/');
nx.trim('//sso-login.html','/');

// sso-login.html
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-trim/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-trim
[version-url]: https://npmjs.org/package/@jswork/next-trim

[license-image]: https://img.shields.io/npm/l/@jswork/next-trim
[license-url]: https://github.com/afeiship/next-trim/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-trim
[size-url]: https://github.com/afeiship/next-trim/blob/master/dist/next-trim.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-trim
[download-url]: https://www.npmjs.com/package/@jswork/next-trim