_shallowProperty.js 222 B

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