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:
985 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = void 0;
|
---|
5 | var _ramda = require("ramda");
|
---|
6 | /* eslint-disable max-len */
|
---|
7 | /**
|
---|
8 | * Returns a partial copy of an object containing only the keys
|
---|
9 | * that don't satisfy the supplied predicate.
|
---|
10 | *
|
---|
11 | * @func omitBy
|
---|
12 | * @memberOf RA
|
---|
13 | * @since {@link https://char0n.github.io/ramda-adjunct/2.6.0|v2.6.0}
|
---|
14 | * @category Object
|
---|
15 | * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v}
|
---|
16 | * @param {!Function} pred A predicate to determine whether or not a key should be included on the output object
|
---|
17 | * @param {!Object} obj The object to copy from
|
---|
18 | * @return {!Object} A new object only with properties that don't satisfy `pred`
|
---|
19 | *
|
---|
20 | * @example
|
---|
21 | *
|
---|
22 | * const isLowerCase = (val, key) => key.toLowerCase() === key;
|
---|
23 | * RA.omitBy(isLowerCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4}
|
---|
24 | */
|
---|
25 | /* eslint-enable max-len */
|
---|
26 | var omitBy = (0, _ramda.useWith)(_ramda.pickBy, [_ramda.complement, _ramda.identity]);
|
---|
27 | var _default = omitBy;
|
---|
28 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.