e6a4d2991950b8d844696939410040968719b9cd
[platform/framework/web/crosswalk-tizen.git] /
1 var constant = require('../utility/constant'),
2     isNative = require('../lang/isNative'),
3     toObject = require('./toObject');
4
5 /** Native method references. */
6 var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols;
7
8 /**
9  * Creates an array of the own symbols of `object`.
10  *
11  * @private
12  * @param {Object} object The object to query.
13  * @returns {Array} Returns the array of symbols.
14  */
15 var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) {
16   return getOwnPropertySymbols(toObject(object));
17 };
18
19 module.exports = getSymbols;