0.1.15 • Published 7 years ago
utils-lite v0.1.15
Install
npm i utils-lite -S
Start JS
use npm
import { debounce } from 'utils-lite'
// commonjs package is 'utils-lite/lib/index.cjs.js'
debounce(() => {
// code...
}, 1000)use cdn
<script src="https://unpkg.com/utils-lite/lib/index.umd.min.js"></script>
<script>
UtilsLite.debounce(function () {
// code ...
}, 1000)
</script>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
@import 'project-path/node_modules/utils-lite/index.less';
.test {
.text-ellipsis
}@import 'project-path/node_modules/utils-lite/index.sass';
.test {
@include text-ellipsis;
}@import 'project-path/node_modules/utils-lite/index.styl';
.test
text-ellipsis();JS Utils List
debounce
debounce(<fn>, <delay>)throttle
throttle(<fn>, <wait>, [delay])get
get(<target>, <path>, [default])path format: 'a.b.c'
set
set(<target>, <path>, <value>)clone
clone(<target>)cloneDeep
cloneDeep(<target>)getType
getType(<target>)getTypeof
getTypeof(<target>)isObject
isObject(<target>)isArray
isArray(<target>)isFunction
isFunction(<target>)isString
isString(<target>)isBoolean
isBoolean(<target>)isEmptyObj
isEmptyObj(<target>)isNumber
isNumber(<target>)getStore
getStore(<key>)setStore
setStore(<key>, <value>)kebabToCamel
kebabToCamel(<key>)camelToKebab
camelToKebab(<key>)unique
unique(<array>)getLinearValue
getLinearValue(<x1>, <y1>, <x2>, <y2>, [x3])getFnAndObjValue
getFnAndObjValue(<function|object>, <key>)arrDelItem
arrDelItem(<array>, <diffItem>)arrDelArrItem
arrDelArrItem(<array>, <diffArrayItem>)toArray
toArray(<arrayLike>)getArrayMin
getArrayMin(<array>)extend
extend(<sourceObj>, [otherObj])hasOwn
hasOwn(<target>)isEqual
isEqual(<alice>, <bob>)chunk
chunk(<array>, <number>)CSS Utils List
text-ellipsis
.target {
.text-ellipsis
}text-loading
.target {
.text-loading([time])
}License
MIT
0.1.15
7 years ago
0.1.14
7 years ago
0.1.13
7 years ago
0.1.12
7 years ago
0.1.11
7 years ago
0.1.10
7 years ago
0.1.9
7 years ago
0.1.7
7 years ago
0.1.6
7 years ago
0.1.5
7 years ago
0.1.4
7 years ago
0.1.3
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago
0.0.12
7 years ago
0.0.11
7 years ago
0.0.10
7 years ago
0.0.9
7 years ago
0.0.8
7 years ago
0.0.7
7 years ago
0.0.6
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago