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