source: node_modules/ramda-adjunct/src/isMap.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: 662 bytes
Line 
1import { type, identical, pipe, curryN } from 'ramda';
2
3/**
4 * Predicate for determining if a provided value is an instance of a Map.
5 *
6 * @func isMap
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.isSet|isSet}}
14 * @example
15 *
16 * RA.isMap(new Map()); //=> true
17 * RA.isMap(new Map([[1, 2], [2, 1]])); //=> true
18 * RA.isSet(new Set()); //=> false
19 * RA.isSet(new Set([1,2]); //=> false
20 * RA.isSet(new Object()); //=> false
21 */
22
23const isMap = curryN(1, pipe(type, identical('Map')));
24
25export default isMap;
Note: See TracBrowser for help on using the repository browser.