Permalink
Cannot retrieve contributors at this time
29 lines (26 sloc)
679 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/lodash/cloneDeep.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
var baseClone = require('./_baseClone'); | |
/** Used to compose bitmasks for cloning. */ | |
var CLONE_DEEP_FLAG = 1, | |
CLONE_SYMBOLS_FLAG = 4; | |
/** | |
* This method is like `_.clone` except that it recursively clones `value`. | |
* | |
* @static | |
* @memberOf _ | |
* @since 1.0.0 | |
* @category Lang | |
* @param {*} value The value to recursively clone. | |
* @returns {*} Returns the deep cloned value. | |
* @see _.clone | |
* @example | |
* | |
* var objects = [{ 'a': 1 }, { 'b': 2 }]; | |
* | |
* var deep = _.cloneDeep(objects); | |
* console.log(deep[0] === objects[0]); | |
* // => false | |
*/ | |
function cloneDeep(value) { | |
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); | |
} | |
module.exports = cloneDeep; |