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