index.js
function stringToFunction(str) {
  // immediate such as "> 20"
  if (/^ *\W+/.test(str)) return new Function('_', 'return _ ' + str);

  // properties such as "name.first" or "age > 18"
  var fn = new Function('_', 'return _.' + str);
  return fn
}
function stringToFunction(str) {
  // immediate such as "> 20"
  if (/^ *\W+/.test(str)) return new Function('_', 'return _ ' + str);

  // properties such as "name.first" or "age > 18"
  var fn = new Function('_', 'return _.' + str);
  return fn
}
function stringToFunction ( str ) { // immediate such as "> 20" if ( / ^ *\W+ / . test ( str ) ) return new Function ( '_' , 'return _ ' + str ) ; // properties such as "name.first" or "age > 18" var fn = new Function ( '_' , 'return _.' + str ) ; return fn }
Convert property `str` to a function.

@param {String} str
@return {Function}
@api private
Convert property str to a function .