Use undefined instead of nullish checks in baseConvert.

This commit is contained in:
John-David Dalton
2015-10-23 22:13:21 -07:00
parent cc8e4956f5
commit 3769719816

View File

@@ -11,14 +11,14 @@ var mapping = require('./mapping.js'),
* @returns {Function|Object} Returns the converted function or object.
*/
function baseConvert(util, name, func) {
if (!func) {
if (typeof func != 'function') {
func = name;
name = null;
name = undefined;
}
if (func == null) {
throw new TypeError;
}
var isLib = name == null && typeof func.VERSION == 'string';
var isLib = name === undefined && typeof func.VERSION == 'string';
var _ = isLib ? func : {
'ary': util.ary,