0.0.6 • Published 7 years ago
reduce-string v0.0.6
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'), '');
});