object-extends
v1.2.0
Published
object extends, async array methods, async each, async forEach, async map, async find
Downloads
4
Maintainers
Readme
Object-extends
Install
npm i object-extends --save
Usage
require('object-extends')
// Or
import 'object-extends'
Extends For Array
Array.prototype.asyncMap
Array.prototype.asyncEach
Array.prototype.asyncFind
Array.prototype.asyncSome
Array.prototype.asyncEvery
// 数组排重
Array.prototype.unique
// 删除
Array.prototype.remove
// 相似值
Array.prototype.near
Array.prototype.nearIndex
Example
async function test() {
let keys = await arr.asyncMap(async item => await item.key())
console.log(keys)
}
test()