perf(isObject): use strict comparison

this is a micro-optimization based on http://jsperf.com/isobject4

no significant improvement in macro-benchmarks, but since it makes the code better it makes
sense making this change.
This commit is contained in:
Igor Minar
2014-08-11 11:26:53 -07:00
parent de3f238764
commit d208ba2544

View File

@@ -441,7 +441,10 @@ function isDefined(value){return typeof value !== 'undefined';}
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is an `Object` but not `null`.
*/
function isObject(value){return value != null && typeof value === 'object';}
function isObject(value){
// http://jsperf.com/isobject4
return value !== null && typeof value === 'object';
}
/**