npm.io
1.0.1 • Published 4 years ago

eazyutils

Licence
ISC
Version
1.0.1
Deps
0
Size
6 kB
Vulns
0
Weekly
0

utils

一些常用工具的集合

url2Params

格式化获取url参数

storage

设置缓存

npm i eazyutils
const eazyutils = require('eazyutils');
// 设置缓存
eazyutils.storage('userInfo', {name: 'Maic',age: 18});

// 获取缓存
eazyutils.storage('userInfo');
fillterConfigArr 过滤数组中存在的数据
const eazyutils = require('eazyutils');
eazyutils.fillterConfigArr([{a: '1'}, {b: '2'}], {a: '1'})
upDateDateRem rem方案适配
const eazyutils = require('eazyutils');
// eazyutils.upDateScreen(); // pc端1080尺寸适配
eazyutils.upDateDateRem();
千分位匹配
const eazyutils = require('eazyutils');
eazyutils.regMoney(200300); // 匹配千分位
过滤对象 filterObj
const eazyutils = require('eazyutils');
eazyutils.filterObj(['a', 'b'], [{a: '1',b: '2',c: '3'}]);
函数节流debounce
const eazyutils = require('eazyutils');
eazyutils.debounce(() => {}, 800)
防抖
const eazyutils = require('eazyutils');
eazyutils.throttle(()=> {}, 1000)