main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
522 bytes
|
Line | |
---|
1 | import Symbol from './_Symbol.js';
|
---|
2 |
|
---|
3 | /** Used to convert symbols to primitives and strings. */
|
---|
4 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
---|
5 | symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * Creates a clone of the `symbol` object.
|
---|
9 | *
|
---|
10 | * @private
|
---|
11 | * @param {Object} symbol The symbol object to clone.
|
---|
12 | * @returns {Object} Returns the cloned symbol object.
|
---|
13 | */
|
---|
14 | function cloneSymbol(symbol) {
|
---|
15 | return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
---|
16 | }
|
---|
17 |
|
---|
18 | export default cloneSymbol;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.