![download](https://img.shields.io/npm/dm/utils-lite.svg) ![version](https://img.shields.io/npm/v/utils-lite.svg) ![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/utils-lite.svg) ![language](https://img.shields.io/badge/language-javascript-yellow.svg) ![License](https://img.shields.io/badge/license-MIT-000000.svg) ## Install `npm i utils-lite -S` ## Start JS #### use npm ```js import { debounce } from 'utils-lite' // commonjs package is 'utils-lite/lib/index.cjs.js' debounce(() => { // code... }, 1000) ``` #### use cdn ```html ``` ## Start CSS Now css utils package has three file type: less, sass, stylus as `index.less`/ `index.sass`/`index.styl`, you can choose one and import to you project, for example ```less @import 'project-path/node_modules/utils-lite/index.less'; .test { .text-ellipsis } ``` ```less @import 'project-path/node_modules/utils-lite/index.sass'; .test { @include text-ellipsis; } ``` ```less @import 'project-path/node_modules/utils-lite/index.styl'; .test text-ellipsis(); ``` ## JS Utils List ### debounce ```js debounce(, ) ``` ### throttle ```js throttle(, , [delay]) ``` ### get ```js get(, , [default]) ``` > path format: 'a.b.c' ### set ```js set(, , ) ``` ### clone ```js clone() ``` ### cloneDeep ```js cloneDeep() ``` ### getType ```js getType() ``` ### getTypeof ```js getTypeof() ``` ### isObject ```js isObject() ``` ### isArray ```js isArray() ``` ### isFunction ```js isFunction() ``` ### isString ```js isString() ``` ### isBoolean ```js isBoolean() ``` ### isEmptyObj ```js isEmptyObj() ``` ### isNumber ```js isNumber() ``` ### getStore ```js getStore() ``` ### setStore ```js setStore(, ) ``` ### kebabToCamel ```js kebabToCamel() ``` ### camelToKebab ```js camelToKebab() ``` ### unique ```js unique() ``` ### getLinearValue ```js getLinearValue(, , , , [x3]) ``` ### getFnAndObjValue ```js getFnAndObjValue(, ) ``` ### arrDelItem ```js arrDelItem(, ) ``` ### arrDelArrItem ```js arrDelArrItem(, ) ``` ### toArray ```js toArray() ``` ### getArrayMin ```js getArrayMin() ``` ### extend ```js extend(, [otherObj]) ``` ### hasOwn ```js hasOwn() ``` ### isEqual ```js isEqual(, ) ``` ## CSS Utils List ### text-ellipsis ```less .target { .text-ellipsis } ``` ### text-loading ```less .target { .text-loading([time]) } ``` ## License MIT