source: node_modules/ramda-adjunct/src/isSet.js@ 65b6638

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

Initial commit

  • Property mode set to 100644
File size: 611 bytes
Line 
1import { type, identical, pipe, curryN } from 'ramda';
2
3/**
4 * Predicate for determining if a provided value is an instance of a Set.
5 *
6 * @func isSet
7 * @memberOf RA
8 * @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
9 * @category Type
10 * @sig * -> Boolean
11 * @param {*} val The value to test
12 * @return {boolean}
13 * @see {@link RA.isMap|isMap}}
14 * @example
15 *
16 * RA.isSet(new Map()); //=> false
17 * RA.isSet(new Set()); //=> true
18 * RA.isSet(new Set([1,2]); //=> true
19 * RA.isSet(new Object()); //=> false
20 */
21
22const isSet = curryN(1, pipe(type, identical('Set')));
23
24export default isSet;
Note: See TracBrowser for help on using the repository browser.