reduce-string

0.0.6 • Public • Published
import test from 'ava';
import func from '../index';

test(t => {
    t.is(func('with spaces '), 'with spaces');
    t.is(func('no spaces'), 'no');
    t.is(func('中文'), '中');
    t.is(func('!@#$%^&*()_+'), '!@#$%^&*()_');
    t.is(func('what1'), 'what');
    t.is(func('what-'), 'what');
    t.is(func('what文'), 'what');
    t.is(func('what'), '');
    t.is(func('www.baidu.com google.cn'), 'www.baidu.com');
    t.is(func('www.baidu.com '), 'www.baidu.com');
    t.is(func('www.baidu.com'), '');
});

Readme

Keywords

none

Package Sidebar

Install

npm i reduce-string

Weekly Downloads

0

Version

0.0.6

License

ISC

Last publish

Collaborators

  • standlee