source: node_modules/ramda/es/dissoc.js@ d24f17c

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

Initial commit

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