github-actions[bot] d7506e9702
Add node modules and compiled JavaScript from main (#198)
Co-authored-by: Oliver King <oking3@uncc.edu>
2022-06-24 15:58:43 -04:00

11 lines
267 B
JavaScript

import noop from './noop.js';
import get from './get.js';
// Generates a function for a given object that returns a given property.
export default function propertyOf(obj) {
if (obj == null) return noop;
return function(path) {
return get(obj, path);
};
}