prop.js 218 B

1234567891011121314
  1. /**
  2. * Returns a function that gets a property of the passed object
  3. */
  4. function prop(name){
  5. return function(obj){
  6. return obj[name];
  7. };
  8. }
  9. module.exports = prop;