source: node_modules/ramda/src/dissoc.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 725 bytes
Line 
1var _curry2 =
2/*#__PURE__*/
3require("./internal/_curry2.js");
4
5var dissocPath =
6/*#__PURE__*/
7require("./dissocPath.js");
8/**
9 * Returns a new object that does not contain a `prop` property.
10 *
11 * @func
12 * @memberOf R
13 * @since v0.10.0
14 * @category Object
15 * @sig String -> {k: v} -> {k: v}
16 * @param {String} prop The name of the property to dissociate
17 * @param {Object} obj The object to clone
18 * @return {Object} A new object equivalent to the original but without the specified property
19 * @see R.assoc, R.omit
20 * @example
21 *
22 * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3}
23 */
24
25
26var dissoc =
27/*#__PURE__*/
28_curry2(function dissoc(prop, obj) {
29 return dissocPath([prop], obj);
30});
31
32module.exports = dissoc;
Note: See TracBrowser for help on using the repository browser.