mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 20:07:49 +00:00
Use undefined instead of nullish checks in baseConvert.
This commit is contained in:
@@ -11,14 +11,14 @@ var mapping = require('./mapping.js'),
|
|||||||
* @returns {Function|Object} Returns the converted function or object.
|
* @returns {Function|Object} Returns the converted function or object.
|
||||||
*/
|
*/
|
||||||
function baseConvert(util, name, func) {
|
function baseConvert(util, name, func) {
|
||||||
if (!func) {
|
if (typeof func != 'function') {
|
||||||
func = name;
|
func = name;
|
||||||
name = null;
|
name = undefined;
|
||||||
}
|
}
|
||||||
if (func == null) {
|
if (func == null) {
|
||||||
throw new TypeError;
|
throw new TypeError;
|
||||||
}
|
}
|
||||||
var isLib = name == null && typeof func.VERSION == 'string';
|
var isLib = name === undefined && typeof func.VERSION == 'string';
|
||||||
|
|
||||||
var _ = isLib ? func : {
|
var _ = isLib ? func : {
|
||||||
'ary': util.ary,
|
'ary': util.ary,
|
||||||
|
|||||||
Reference in New Issue
Block a user