@lgd-utils/utils
A front-end utils tool
Usage
import utils from '@lgd-utils/utils';
utils.assertValue(1, 1); // true
utils.assertValue('str', [3, null, /^\w+$/]); // true
utils.normalizeValue(2, 'String'); // '2'
utils.normalizeValue('3kb', 'Number', 4); // 4
utils.undefinedTo(1, 2); // 1
utils.undefinedTo(undefined, 4); // 4
utils.partialEq('true')(true); // false
utils.partialEq('false')('false'); // true
Contribute
Documentation
Related
- @lgd-utils/array - A front-end array tool
- @lgd-utils/axios - A axios adapter and middleware tool
- @lgd-utils/cached-storage - 一个具有失效功能的缓存存储库
- @lgd-utils/collection - A front-end collection tool
- @lgd-utils/error - A front-end error tool
- @lgd-utils/html - A front-end html tool
- @lgd-utils/number - A front-end number tool
- @lgd-utils/object - A front-end object tool
- @lgd-utils/polling - A front-end polling tool
- @lgd-utils/regexp - A front-end regexp tool
- @lgd-utils/request-queue - A front-end request-queue tool
- @lgd-utils/screenlog - Bring console.log and so on, on the screen
- @lgd-utils/symbol - A front-end symbol tool
- @lgd-utils/utils - A front-end utils tool
- @lgd-utils/validate - A front-end verification tool
- More…