mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-11-05 20:59:26 +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>
33 lines
949 B
JavaScript
33 lines
949 B
JavaScript
var _curry3 = /*#__PURE__*/require('./internal/_curry3');
|
|
|
|
/**
|
|
* Makes a shallow clone of an object, setting or overriding the specified
|
|
* property with the given value. Note that this copies and flattens prototype
|
|
* properties onto the new object as well. All non-primitive properties are
|
|
* copied by reference.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.8.0
|
|
* @category Object
|
|
* @sig String -> a -> {k: v} -> {k: v}
|
|
* @param {String} prop The property name to set
|
|
* @param {*} val The new value
|
|
* @param {Object} obj The object to clone
|
|
* @return {Object} A new object equivalent to the original except for the changed property.
|
|
* @see R.dissoc, R.pick
|
|
* @example
|
|
*
|
|
* R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}
|
|
*/
|
|
|
|
|
|
var assoc = /*#__PURE__*/_curry3(function assoc(prop, val, obj) {
|
|
var result = {};
|
|
for (var p in obj) {
|
|
result[p] = obj[p];
|
|
}
|
|
result[prop] = val;
|
|
return result;
|
|
});
|
|
module.exports = assoc; |