1.0.9 • Published 5 years ago
estructuras v1.0.9
Estructuras
Repository with a set of handy (and not so much) data structures to be used with node js.
Install
npm install --save estructuras
All data structures includes:
- add(element)
- remove(element)
- contains(element)
- find(condition)
- findOne(condition)
- isEmpty()
- forEach(callback)
- toArray
- size Most of the structures include more methods, see documentation.
Usage
Check out this example.
Or check out the documentation. We do have documentation.
const List = require('estructuras').List;
let l = new List();
l.add("hola");
l.add(2);
l.add(3);
l.add(4);
l.remove(3);
l.forEach((x)=>{
//Do something
console.log(x);
})