mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Bump to v4.0.0.
This commit is contained in:
18
internal/cloneSymbol.js
Normal file
18
internal/cloneSymbol.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import _Symbol from './_Symbol';
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
||||
symbolValueOf = _Symbol ? symbolProto.valueOf : undefined;
|
||||
|
||||
/**
|
||||
* Creates a clone of the `symbol` object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} symbol The symbol object to clone.
|
||||
* @returns {Object} Returns the cloned symbol object.
|
||||
*/
|
||||
function cloneSymbol(symbol) {
|
||||
return _Symbol ? Object(symbolValueOf.call(symbol)) : {};
|
||||
}
|
||||
|
||||
export default cloneSymbol;
|
||||
Reference in New Issue
Block a user