# utils-lite

> utils for smaller and convenient

Latest version **0.1.15** (published 2018-07-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install utils-lite
pnpm add utils-lite
yarn add utils-lite
bun add utils-lite
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.15 |
| Published | 2018-07-07 |
| First published | 2018-05-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 49 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Maintainers | quietcoder |

## Links

- npm: https://www.npmjs.com/package/utils-lite
- Repository: https://github.com/xiguaxigua/utils-lite
- Homepage: http://daxigua.me/utils-lite
- Issues: https://github.com/xiguaxigua/utils-lite/issues
- npm.io page: https://npm.io/package/utils-lite

## Recent versions

- 0.1.15 (latest) — 2018-07-07
- 0.1.14 — 2018-07-05
- 0.1.13 — 2018-06-27
- 0.1.12 — 2018-06-27
- 0.1.11 — 2018-06-27
- 0.1.10 — 2018-06-26
- 0.1.9 — 2018-06-21
- 0.1.7 — 2018-06-21
- 0.1.6 — 2018-06-21
- 0.1.5 — 2018-06-20
- 0.1.4 — 2018-06-20
- 0.1.3 — 2018-06-07
- 0.1.2 — 2018-06-07
- 0.1.1 — 2018-06-07
- 0.1.0 — 2018-06-04
- … 12 more at https://npm.io/package/utils-lite/versions

## README

![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
<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

```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(<fn>, <delay>)
```

### throttle
```js
throttle(<fn>, <wait>, [delay])
```

### get
```js
get(<target>, <path>, [default])
```
> path format: 'a.b.c'

### set
```js
set(<target>, <path>, <value>)
```

### clone
```js
clone(<target>)
```

### cloneDeep
```js
cloneDeep(<target>)
```

### getType
```js
getType(<target>)
```

### getTypeof
```js
getTypeof(<target>)
```

### isObject
```js
isObject(<target>)
```

### isArray
```js
isArray(<target>)
```

### isFunction
```js
isFunction(<target>)
```

### isString
```js
isString(<target>)
```

### isBoolean
```js
isBoolean(<target>)
```

### isEmptyObj
```js
isEmptyObj(<target>)
```

### isNumber
```js
isNumber(<target>)
```

### getStore
```js
getStore(<key>)
```

### setStore
```js
setStore(<key>, <value>)
```

### kebabToCamel
```js
kebabToCamel(<key>)
```

### camelToKebab
```js
camelToKebab(<key>)
```

### unique
```js
unique(<array>)
```

### getLinearValue
```js
getLinearValue(<x1>, <y1>, <x2>, <y2>, [x3])
```
### getFnAndObjValue
```js
getFnAndObjValue(<function|object>, <key>)
```

### arrDelItem
```js
arrDelItem(<array>, <diffItem>)
```

### arrDelArrItem
```js
arrDelArrItem(<array>, <diffArrayItem>)
```

### toArray
```js
toArray(<arrayLike>)
```

### getArrayMin
```js
getArrayMin(<array>)
```

### extend
```js
extend(<sourceObj>, [otherObj])
```

### hasOwn
```js
hasOwn(<target>)
```

### isEqual
```js
isEqual(<alice>, <bob>)
```

### chunk
```js
chunk(<array>, <number>)
```


## CSS Utils List

### text-ellipsis

```less
.target {
  .text-ellipsis
}
```

### text-loading

```less
.target {
  .text-loading([time])
}
```

## License

MIT

---
_Source: https://npm.io/package/utils-lite · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
