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.
24 lines
650 B
24 lines
650 B
/** Built-in value references. */
|
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
|
|
/**
|
|
* Creates an array of the own enumerable symbol properties of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of symbols.
|
|
*/
|
|
function getSymbols(object) {
|
|
// Coerce `object` to an object to avoid non-object errors in V8.
|
|
// See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details.
|
|
return getOwnPropertySymbols(Object(object));
|
|
}
|
|
|
|
// Fallback for IE < 11.
|
|
if (!getOwnPropertySymbols) {
|
|
getSymbols = function() {
|
|
return [];
|
|
};
|
|
}
|
|
|
|
module.exports = getSymbols;
|
|
|