x-data-processing

对数组数据进行增删改操作

Usage no npm install needed!

<script type="module">
  import xDataProcessing from 'https://cdn.skypack.dev/x-data-processing';
</script>

README

dataProcessing

对数组数据进行增删改操作

Demo

let DataProcessing = require('../src/index');
let arr = [];
let d = new DataProcessing(arr);
d.add({"kk":111,"dd":"AAA"});
d.add({"kk":222,"dd":"BBB"});
console.log(d)
d.update('kk',{kk:111,dd:'aaa'});
console.log(d)
d.updateBeatch('kk',[{kk:111,dd:'ccc'},{kk:222,dd:'ddd'}])
console.log(d)
d.delete('kk',222);
console.log(d)

Npm

npm install  x-data-processing --save-dev