_shallowProperty.js 253 B

12345678910111213
  1. define(function () {
  2. // Internal helper to generate a function to obtain property `key` from `obj`.
  3. function shallowProperty(key) {
  4. return function(obj) {
  5. return obj == null ? void 0 : obj[key];
  6. };
  7. }
  8. return shallowProperty;
  9. });