Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
524 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var Symbol = require('./_Symbol');
|
---|
| 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 | module.exports = cloneSymbol;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.