
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
eden-collection
Advanced tools
#Collection
DESCRIPTION
npm install eden-collection
var collection = require('eden-collection');
this add('Elizabeth');
Adds a row to the collection
this
users.addName('Elizabeth');
users.addMi('B');
users.addAge(22);
users.addBday('September 13, 1992');
users[2].name;
users[2].mi;
users[2].age;
users[2].bday;
'Elizabeth'
'B'
22
'September 13, 1992'
this cut(first | 1);
Cut the element from the array based on the index
this
users = collection([
{ name: 'chris1', age: 42 },
{ name: 'chris2', age: 32 },
{ name: 'chase1', age: 22 },
{ name: 'chase2', age: 12 },
{ name: 'chase3', age: 2 }]);
users.cut('first');
users[0].name;
users.cut(1);
users[1].name;
users.cut('last');
users.length;
// cut the first collection - users { name: 'chris1', age: 42 }
'chris2'
// cut the second collection - users { name: 'chase1', age: 22 }
'chase2'
// cut the last collection - users { name: 'chase3', age: 2 }
2
this each(users[1].getName);
Loops through returned result sets
this
users.each(function(i, user) {
user.setName('Something2');
});
users[1].getName();
'Something2'
array get(raw[0].name);
Returns the row array
array
var raw = users.get();
raw[1].age;
raw[0].name;
22
'Something2'
this set('bobby');
Sets data
this
users = collection([
{ name: 'chris1', age: 42 },
{ name: 'chris2', age: 32 },
{ name: 'chase1', age: 22 },
{ name: 'chase2', age: 12 },
{ name: 'chase3', age: 2 }]);
users.setName('bobby');
users[0].name;
users[1].name;
users[2].name;
users[3].name;
users[4].name;
'bobby'
'bobby'
'bobby'
'bobby'
'bobby'
FAQs
Eden Node JS Generic Collection Definition
We found that eden-collection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.