mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Move internal modules to “internal” folder.
This commit is contained in:
15
.internal/cloneSymbol.js
Normal file
15
.internal/cloneSymbol.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
const symbolValueOf = Symbol.prototype.valueOf;
|
||||
|
||||
/**
|
||||
* 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 symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
||||
}
|
||||
|
||||
export default cloneSymbol;
|
||||
Reference in New Issue
Block a user