suguru03/aigle

Rename pick/omit to pickBy/omitBy

suguru03 opened this issue · 1 comments

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: {} }

Done!