ericelliott / object-list

Treat arrays of objects like a db you can query.
MIT License
43 stars 2 forks source link

Add `.add()` method #7

Closed therealklanni closed 9 years ago

therealklanni commented 9 years ago

Implements sync and async add operations on object lists. Each method returns a new object-list instance to keep them immutable.

The async method is a partial implementation, pending adapter implementation, but can be used as is (it just gets immediately resolved for now). Once adapters are implemented, the async method can be updated without impacting anything using the current async implementation.

therealklanni commented 9 years ago

@ericelliott please let me know if ff48dd5 is more what you were thinking.

ericelliott commented 9 years ago

Please run npm run validate and fix any issues you see.

therealklanni commented 9 years ago

I see none ;)

ericelliott commented 9 years ago

Odd... I see...

Erics-MacBook-Pro:object-list eric$ npm run validate

> object-list@1.1.1 validate /Users/eric/Dropbox/dev/object-list
> npm run lint && npm test && npm outdated --depth 0

> object-list@1.1.1 lint /Users/eric/Dropbox/dev/object-list
> jshint .

index.js: line 34, col 51, 'cb' is defined but never used.

1 error
therealklanni commented 9 years ago

You probably didn't pull the latest ;)