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

add functional auto-curried syntax support #3

Merged
merged 5 commits into from Jun 16, 2016
Merged

add functional auto-curried syntax support #3

merged 5 commits into from Jun 16, 2016

Conversation

zspecza
Copy link
Collaborator

@zspecza zspecza commented Jun 15, 2016

supersedes #2

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 89769f6 on ddw.fp2 into 659133e on master.


```js
const {map, reduce, filter, forEach} = require('objectfn')

const obj = { foo: 'bar', wow: 'doge' }

map(obj, (val, key) => val.toUpperCase())
const upcasedValues = map(obj, (val) => val.toUpperCase())
console.log(upcasedValues)
Copy link
Owner

Choose a reason for hiding this comment

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

Why add extra boilerplate here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've developed a habit of making code examples runnable on tonicdev.com but i see there are other ways of doing this so I've removed the boilerplate. I also spotted some errors in the example which I've fixed

@jescalan
Copy link
Owner

This is awesome. You are an es6 magician

@coveralls
Copy link

coveralls commented Jun 16, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling c3cfc93 on ddw.fp2 into 659133e on master.

@zspecza
Copy link
Collaborator Author

zspecza commented Jun 16, 2016

@jescalan fixed some code example errors + removed boilerplate

@jescalan
Copy link
Owner

Ok cool, looking good. So the question is, do we need a major version for this? Is there any regression at all?

@jescalan jescalan merged commit b0796bc into master Jun 16, 2016
@zspecza
Copy link
Collaborator Author

zspecza commented Jun 16, 2016

Ok cool, looking good. So the question is, do we need a major version for this? Is there any regression at all?

The addition of the index argument in #1 changes the method signature of each function from (val, key, obj) to (val, key, index, obj) which I'd consider a breaking change. Everything in this PR is backwards-compatible with #1. That being said, objectfn is so early in development so a major version bump may not be necessary.

@jescalan jescalan deleted the ddw.fp2 branch June 20, 2016 13:43
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