_applyProperty.js 318 B

12345678910
  1. // Internal helper that wraps an `iteratee` to call it with the
  2. // property of a closed-over `object`. Useful when iterating over
  3. // an array of keys of `object`.
  4. function applyProperty(iteratee, object) {
  5. return function(key) {
  6. return iteratee(object[key], key, object);
  7. };
  8. }
  9. module.exports = applyProperty;