'use strict';vartoStr=Object.prototype.toString;varhasSymbols=require('has-symbols')();if(hasSymbols){varsymToStr=Symbol.prototype.toString;varsymStringRegex=/^Symbol\(.*\)$/;varisSymbolObject=functionisRealSymbolObject(value){if(typeofvalue.valueOf()!=='symbol'){returnfalse;}returnsymStringRegex.test(symToStr.call(value));};module.exports=functionisSymbol(value){if(typeofvalue==='symbol'){returntrue;}if(toStr.call(value)!=='[object Symbol]'){returnfalse;}try{returnisSymbolObject(value);}catch(e){returnfalse;}};}else{module.exports=functionisSymbol(value){// this environment does not support Symbols.returnfalse&&value;};}