No Description

propertyOf.js 286B

12345678910111213
  1. define(['./noop', './get'], function (noop, get) {
  2. // Generates a function for a given object that returns a given property.
  3. function propertyOf(obj) {
  4. if (obj == null) return noop;
  5. return function(path) {
  6. return get(obj, path);
  7. };
  8. }
  9. return propertyOf;
  10. });