-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,7 @@ var wrap = function (tag, description) { | |
return symbol; | ||
}; | ||
|
||
var isSymbol = NATIVE_SYMBOL && typeof $Symbol.iterator == 'symbol' ? function (it) { | ||
var isSymbol = USE_SYMBOL_AS_UID ? function (it) { | ||
return typeof it == 'symbol'; | ||
} : function (it) { | ||
return Object(it) instanceof $Symbol; | ||
|
@@ -178,12 +178,20 @@ if (!NATIVE_SYMBOL) { | |
return getInternalState(this).tag; | ||
}); | ||
|
||
redefine($Symbol, 'withoutSetter', function (description) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
zloirock
Author
Owner
|
||
return wrap(uid(description), description); | ||
}); | ||
|
||
propertyIsEnumerableModule.f = $propertyIsEnumerable; | ||
definePropertyModule.f = $defineProperty; | ||
getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor; | ||
getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames; | ||
getOwnPropertySymbolsModule.f = $getOwnPropertySymbols; | ||
|
||
wrappedWellKnownSymbolModule.f = function (name) { | ||
return wrap(wellKnownSymbol(name), name); | ||
}; | ||
|
||
if (DESCRIPTORS) { | ||
// https://github.com/tc39/proposal-Symbol-description | ||
nativeDefineProperty($Symbol[PROTOTYPE], 'description', { | ||
|
@@ -198,12 +206,6 @@ if (!NATIVE_SYMBOL) { | |
} | ||
} | ||
|
||
if (!USE_SYMBOL_AS_UID) { | ||
wrappedWellKnownSymbolModule.f = function (name) { | ||
return wrap(wellKnownSymbol(name), name); | ||
}; | ||
} | ||
|
||
$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, { | ||
Symbol: $Symbol | ||
}); | ||
|
Is this making a new property on the Symbol constructor called
withoutSetter
? Is that a spec proposal?