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:
725 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | var _curry2 =
|
---|
| 2 | /*#__PURE__*/
|
---|
| 3 | require("./internal/_curry2.js");
|
---|
| 4 |
|
---|
| 5 | var dissocPath =
|
---|
| 6 | /*#__PURE__*/
|
---|
| 7 | require("./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 |
|
---|
| 26 | var dissoc =
|
---|
| 27 | /*#__PURE__*/
|
---|
| 28 | _curry2(function dissoc(prop, obj) {
|
---|
| 29 | return dissocPath([prop], obj);
|
---|
| 30 | });
|
---|
| 31 |
|
---|
| 32 | module.exports = dissoc; |
---|
Note:
See
TracBrowser
for help on using the repository browser.