Comparing version 1.1.1 to 1.1.2
@@ -101,3 +101,3 @@ "use strict"; | ||
keyFor: defValue(function (sym) { | ||
if (!isSymbol(sym)) { | ||
if (supportsAccessors && !isSymbol(sym)) { | ||
throw new TypeError("" + sym + " is not a symbol"); | ||
@@ -108,3 +108,3 @@ } | ||
if (globalSymbolRegistryList[key] === sym) { | ||
return globalSymbolRegistryList[key].__description__; | ||
return supportsAccessors ? globalSymbolRegistryList[key].__description__ : globalSymbolRegistryList[key].substr(7, globalSymbolRegistryList[key].length - 8); | ||
} | ||
@@ -111,0 +111,0 @@ } |
{ | ||
"name": "es-symbol", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A spec-compliant as much as it could be, small, and tested ES6 Symbol implementation.", | ||
@@ -5,0 +5,0 @@ "main": "dist/symbol.js", |
@@ -11,3 +11,3 @@ # es-symbol | ||
* No unnecessary dependencies | ||
* Works in node + browser | ||
* Works in node + browser (IE8--Modern browsers) | ||
* Uses native `Symbol` if possible otherwise exports a polyfill | ||
@@ -14,0 +14,0 @@ |
11085
8