mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
307 B
13 lines
307 B
9 years ago
|
/**
|
||
|
* Checks if `value` is a global object.
|
||
|
*
|
||
|
* @private
|
||
|
* @param {*} value The value to check.
|
||
|
* @returns {null|Object} Returns `value` if it's a global object, else `null`.
|
||
|
*/
|
||
|
function checkGlobal(value) {
|
||
|
return (value && value.Object === Object) ? value : null;
|
||
|
}
|
||
|
|
||
|
module.exports = checkGlobal;
|