1.3.0 • Published 7 years ago
xp-utils v1.3.0
xp-utils
A JavaScript utility library
Installation
npm i xp-utils --save
Usage
- Fully use
import _ from 'xp-utils'
const obj1 = { a: 1, b: { c: 2 } }
const obj2 = _.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
clone.js
- deepClone
array.js
- swap
- unique
- newArray
throtte.js
- throtte
- debounce
date.js
- formatDate
- duration
- ago
url.js
- qs
- qsStringify
string.js
- len
- subStr
- padStart
- padEnd
ua.js
- isIOS
- isAndroid
- isMobile
body-scroll.js
- lockScroll
security.js
- decode
- encode
- escapeHtml
- escapeJs
1.3.0
7 years ago
1.2.0
7 years ago
1.1.9
7 years ago
1.1.8
7 years ago
1.1.7
7 years ago
1.1.6
7 years ago
1.1.5
7 years ago
1.1.4
7 years ago
1.1.3
7 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.9
8 years ago
1.0.8
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago