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

generalize Hoek.transform to accept an array of objects #148

Merged
merged 1 commit into from Jun 4, 2015

Conversation

@paulovieira
Copy link
Contributor

paulovieira commented May 24, 2015

For more details see issue #143.

@nlf nlf added the feature label Jun 4, 2015
@nlf nlf self-assigned this Jun 4, 2015
@nlf nlf added this to the 2.15.0 milestone Jun 4, 2015
nlf added a commit that referenced this pull request Jun 4, 2015
generalize Hoek.transform to accept an array of objects
@nlf nlf merged commit 1e87ea6 into hapijs:master Jun 4, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
nlf added a commit that referenced this pull request Jun 4, 2015
@zedd45

This comment has been minimized.

Copy link

zedd45 commented Sep 11, 2015

Is there a targeted release date for 2.15? I'm excited about using this feature.

@nlf

This comment has been minimized.

Copy link
Member

nlf commented Sep 11, 2015

just published

@zedd45

This comment has been minimized.

Copy link

zedd45 commented Sep 16, 2015

Awesome! Thanks! (I didn't see github notification until today.)

exports.assert(source === null || source === undefined || typeof source === 'object' || Array.isArray(source), 'Invalid source object: must be null, undefined, an object, or an array');

if (Array.isArray(source)){
return source.map(function (obj){

This comment has been minimized.

Copy link
@hueniverse

hueniverse Sep 16, 2015

Member

Did anyone perf test this compared to a simple for loop?

This comment has been minimized.

Copy link
@nlf

nlf Sep 16, 2015

Member

argh, i had a commit to change it to a for loop that i apparently didn't push. good catch. my fault.

This comment has been minimized.

Copy link
@hueniverse

hueniverse Sep 16, 2015

Member

node v4 seems to have a different performance profile for this but worth making sure.

This comment has been minimized.

Copy link
@AdriVanHoudt

AdriVanHoudt Sep 16, 2015

Contributor

What do you mean with different perf profile?

This comment has been minimized.

Copy link
@nlf

nlf Sep 16, 2015

Member

newer v8, different optimizations, some things that used to be faster are now slower, etc.

This comment has been minimized.

Copy link
@AdriVanHoudt

AdriVanHoudt Sep 16, 2015

Contributor

Oh really :O like?

nlf added a commit that referenced this pull request Sep 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.