1 var isObjectLike = require('./isObjectLike');
3 /** `Object#toString` result references. */
4 var symbolTag = '[object Symbol]';
6 /** Used for built-in method references. */
7 var objectProto = global.Object.prototype;
10 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
13 var objectToString = objectProto.toString;
16 * Checks if `value` is classified as a `Symbol` primitive or object.
21 * @param {*} value The value to check.
22 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
25 * _.isSymbol(Symbol.iterator);
31 function isSymbol(value) {
32 return typeof value == 'symbol' ||
33 (isObjectLike(value) && objectToString.call(value) == symbolTag);
36 module.exports = isSymbol;