source: node_modules/ramda-adjunct/src/isObjLike.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: 919 bytes
RevLine 
[d24f17c]1import { both, curryN } from 'ramda';
2
3import isNotNull from './isNotNull';
4import isOfTypeObject from './internal/isOfTypeObject';
5
6/* eslint-disable max-len */
7/**
8 * Checks if value is object-like. A value is object-like if it's not null and has a typeof result of "object".
9 *
10 * @func isObjLike
11 * @aliases isObjectLike
12 * @memberOf RA
13 * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0}
14 * @category Type
15 * @sig * -> Boolean
16 * @param {*} val The value to test
17 * @return {boolean}
18 * @see {@link RA.isNotObjLike|isNotObjLike}, {@link RA.isObj|isObj}, {@link RA.isPlainObj|isPlainObj}
19 * @example
20 *
21 * RA.isObjLike({}); //=> true
22 * RA.isObjLike([]); //=> true
23 * RA.isObjLike(() => {}); //=> false
24 * RA.isObjLike(null); //=> false
25 * RA.isObjLike(undefined); //=> false
26 */
27/* eslint-enable max-len */
28const isObjLike = curryN(1, both(isNotNull, isOfTypeObject));
29
30export default isObjLike;
Note: See TracBrowser for help on using the repository browser.