No Description

propertyOf.js 267B

12345678910
  1. import noop from './noop.js';
  2. import get from './get.js';
  3. // Generates a function for a given object that returns a given property.
  4. export default function propertyOf(obj) {
  5. if (obj == null) return noop;
  6. return function(path) {
  7. return get(obj, path);
  8. };
  9. }