Skip to content

allow passing a method to .default(), for #363#545

Merged
Marsup merged 1 commit intomasterfrom
363/method_defaults
Feb 18, 2015
Merged

allow passing a method to .default(), for #363#545
Marsup merged 1 commit intomasterfrom
363/method_defaults

Conversation

@nlf
Copy link
Member

@nlf nlf commented Feb 5, 2015

This covers the use cases of Date.now, UUID generation, and other similar methods.

@Marsup Marsup added the feature New functionality or improvement label Feb 5, 2015
@Marsup Marsup self-assigned this Feb 5, 2015
@Marsup
Copy link
Collaborator

Marsup commented Feb 5, 2015

For the record, discussed in chat with @nlf :

  • this doesn't cover describability of the function
  • this doesn't allow the use of context (ie. other keys)

We need to find solutions to both before I consider merging.

@nlf
Copy link
Member Author

nlf commented Feb 5, 2015

Just to keep the record up:

Functions are now describable, but we still don't have a solution for context. Personally, I lean toward it being too complicated to be worth it, but it's still open for discussion and we're brainstorming solutions.

@nlf
Copy link
Member Author

nlf commented Feb 6, 2015

This implementation now also passes context into the function, but only if the function has a length greater than 0 since this will cause a small performance hit.

@Marsup Marsup added this to the 6.0 milestone Feb 15, 2015
@Marsup
Copy link
Collaborator

Marsup commented Feb 15, 2015

@nlf I think we have all we need here, right ? All that's left is documentation, do you mind taking care of it ? Also squashing commits.

test/any.js Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking but line break after function.

@nlf
Copy link
Member Author

nlf commented Feb 15, 2015

Wrote some docs, let me know if they make sense to you. Once we're happy with those I'll squash the commits and this is ready to go.

@nlf nlf force-pushed the 363/method_defaults branch 3 times, most recently from 6d50476 to c8992e1 Compare February 15, 2015 23:01
@nlf
Copy link
Member Author

nlf commented Feb 15, 2015

Updated documentation

@nlf nlf force-pushed the 363/method_defaults branch 2 times, most recently from 8028443 to d3a2113 Compare February 16, 2015 17:32
@nlf
Copy link
Member Author

nlf commented Feb 16, 2015

Updated the readme again, I think it's ready now :)

@nlf nlf force-pushed the 363/method_defaults branch 3 times, most recently from 021f901 to ad2a1ae Compare February 17, 2015 18:45
@nlf nlf force-pushed the 363/method_defaults branch from 075434d to ba40cd5 Compare February 18, 2015 18:23
Marsup added a commit that referenced this pull request Feb 18, 2015
allow passing a method to .default(), for #363
@Marsup Marsup merged commit 619707a into master Feb 18, 2015
@pekeler
Copy link

pekeler commented Feb 25, 2015

I really want to use this. Can you please cut a release soon? @nlf @Marsup

@Marsup
Copy link
Collaborator

Marsup commented Feb 25, 2015

Almost there.

@Marsup Marsup deleted the 363/method_defaults branch February 25, 2015 22:37
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature New functionality or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants