"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/lodash.clonedeep/index.js" (11 Apr 2017, 928 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /**
    2  * lodash 4.3.2 (Custom Build) <https://lodash.com/>
    3  * Build: `lodash modularize exports="npm" -o ./`
    4  * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
    5  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
    6  * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
    7  * Available under MIT license <https://lodash.com/license>
    8  */
    9 var baseClone = require('lodash._baseclone');
   10 
   11 /**
   12  * This method is like `_.clone` except that it recursively clones `value`.
   13  *
   14  * @static
   15  * @memberOf _
   16  * @category Lang
   17  * @param {*} value The value to recursively clone.
   18  * @returns {*} Returns the deep cloned value.
   19  * @example
   20  *
   21  * var objects = [{ 'a': 1 }, { 'b': 2 }];
   22  *
   23  * var deep = _.cloneDeep(objects);
   24  * console.log(deep[0] === objects[0]);
   25  * // => false
   26  */
   27 function cloneDeep(value) {
   28   return baseClone(value, true, true);
   29 }
   30 
   31 module.exports = cloneDeep;