mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Simplify lib/fp/fp.js.
This commit is contained in:
13
lib/fp/fp.js
13
lib/fp/fp.js
@@ -12,17 +12,10 @@ var _ = require('lodash'),
|
||||
*/
|
||||
function convert() {
|
||||
var args = arguments,
|
||||
name = args[0],
|
||||
func = args[1],
|
||||
length = args.length;
|
||||
name = args.length ? args[0] : _.runInContext(),
|
||||
func = args[1];
|
||||
|
||||
if (length == 1) {
|
||||
func = name;
|
||||
name = undefined;
|
||||
}
|
||||
return length
|
||||
? base(util, name, func)
|
||||
: base(util, _.runInContext());
|
||||
return base(util, name, func);
|
||||
}
|
||||
|
||||
module.exports = convert;
|
||||
|
||||
Reference in New Issue
Block a user