mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 01:38:07 +08:00
DISABLE_THIRD_PARTY_CHECK=new npm module causes package-lock change We can get rid of a custom script and use ESLint for these rules. Additionally this means editors will highlight the issue in the editor. Change-Id: I552b52e7f07b4e7430b3f685dbc3b5fad36ffff2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2052167 Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
28 lines
904 B
JavaScript
28 lines
904 B
JavaScript
import _clone from './internal/_clone.js';
|
|
import _curry1 from './internal/_curry1.js';
|
|
|
|
/**
|
|
* Creates a deep copy of the value which may contain (nested) `Array`s and
|
|
* `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are
|
|
* assigned by reference rather than copied
|
|
*
|
|
* Dispatches to a `clone` method if present.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.1.0
|
|
* @category Object
|
|
* @sig {*} -> {*}
|
|
* @param {*} value The object or array to clone
|
|
* @return {*} A deeply cloned copy of `val`
|
|
* @example
|
|
*
|
|
* const objects = [{}, {}, {}];
|
|
* const objectsClone = R.clone(objects);
|
|
* objects === objectsClone; //=> false
|
|
* objects[0] === objectsClone[0]; //=> false
|
|
*/
|
|
var clone = /*#__PURE__*/_curry1(function clone(value) {
|
|
return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true);
|
|
});
|
|
export default clone; |