jashkenas/underscore — pull request #1520 by smelnikov (2014-03-13 22:19:06+00:00)
Title: _.property support for null and undefined

The _.property method will currently throw an error if the returned function is passed in a `null` or `undefined` value. With this PR, in such a case `undefined` will be returned instead. This seems to be the least surprising behaviour as opposed to crashing the program.

contrived example:

```javascript
var predicate = _.compose( _.partial(_.isEqual, 'foo') , _.property('foo'), _.property('bar'));
var result = _.filter([{bar : {foo: 'foo'}}, {foo: 'foo'}], predicate);
console.log(result); // => [{bar : {foo: 'foo'}}] : where as it would crash before
```