不同类型的数组快速去重(适用于 vue,react,angular,js)

145 阅读1分钟

moval是什么?

数组去重,是开发项目中经常使用到的工具类。

moval源码仓库:下載地址

moval使用教程帮助文档:

1、安装下载

$ npm install --save moval

2、快速使用

  • 引入
const tools = require('moval');
  • 数组快速去重
tools.Simplify(array)
  • json数组以某个key值进行去重
tools.SimplifyByKey(array,'value')

3、交流提问

提问地址:github.com/wushuxuan/m…