Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch array: assert elements are objects #142

Merged
merged 1 commit into from Nov 27, 2017
Merged

Conversation

vweevers
Copy link
Member

Closes #138.

Breaking change, major.

@juliangruber
Copy link
Member

For reference, pre-allocating the array is the fastest method for big and small arrays

@ralphtheninja
Copy link
Member

I just noticed that we're calling back on the same tick on multiple places. Creating new issue for this.

@vweevers
Copy link
Member Author

@ralphtheninja also, my first instinct was to throw (because it's a programmer's error), instead of calling back with an error. But then I thought it should be the same as the lines below:

if (err = this._checkKey(e.type, 'type'))
return callback(err)

What's our policy on that?

@vweevers
Copy link
Member Author

Never mind, I realized we do that in order to wrap the error in levelup.

@vweevers vweevers merged commit 1385068 into master Nov 27, 2017
@vweevers vweevers deleted the feat/batch-assert-object branch November 27, 2017 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants