1.0.3 • Published 6 years ago

bd-utils v1.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

db-utils


常用javaScript 工具函数

Installation

npm i db-utils --save

Usage

  • fulluse

    import utils from bd-utils
    const obj1 = { a: 1, b: { c: 2 } }
    const obj2 = utils.deepClone(obj1) // const obj2 = clone.deepClone(obj1)
    obj2.a = 3
    console.log(obj1) // { a: 1, b: { c: 2 } }
    console.log(obj2) // { a: 3, b: { c: 2 } }
* On demand

import { deepClone } from 'xp-utils' const obj1 = { a: 1, b: { c: 2 } } const obj2 = deepClone(obj1) obj2.a = 3 console.log(obj1) // { a: 1, b: { c: 2 } } console.log(obj2) // { a: 3, b: { c: 2 } }

### methods

#### deepClone.js
* deepClone

#### throtte.js
* throtte
* debounce

#### date.js
* formatDate
* duration
* ago

#### debug.js
* log

#### array.js
* swap
* unique
* newArray

#### storage.js
* storageSet
* storageGet
* storageClear
* storageLength
* storageGetAll
* storageKeys
* storageHas
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago