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

Rename pick/omit to pickBy/omitBy #54

Closed
suguru03 opened this issue Feb 25, 2018 · 1 comment
Closed

Rename pick/omit to pickBy/omitBy #54

suguru03 opened this issue Feb 25, 2018 · 1 comment

Comments

@suguru03
Copy link
Owner

These functions will be renamed.

functions

  • pick -> pickBy
  • omit -> omitBy

new functions

  • pick
  • omit

These functions are the almost same as pickBy/omitBy, but shorthand will be different.

// current 
const collection = {
  a: { bool: 0 },
  b: { bool: 1 },
  c: { bool: 1 }
};
Aigle.pick(collection, 'bool'); // { b: {}, c: {} }
_.pick(collection, 'bool'); // {}
_.pickBy(collection, 'bool'); // { b: {}, c: {} }

// after 
Aigle.pick(object, 'a');  // { a: {} }
Aigle.pick(object, 'bool');  // {}
Aigle.pickBy(object, 'bool'); // { b: {}, c: {} }
@suguru03
Copy link
Owner Author

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant