main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1000 bytes
|
Line | |
---|
1 | import { complement } from 'ramda';
|
---|
2 |
|
---|
3 | import isPlainObj from './isPlainObj';
|
---|
4 |
|
---|
5 | /* eslint-disable max-len */
|
---|
6 | /**
|
---|
7 | * Check to see if an object is a not plain object (created using `{}`, `new Object()` or `Object.create(null)`).
|
---|
8 | *
|
---|
9 | * @func isNotPlainObj
|
---|
10 | * @aliases isNotPlainObject
|
---|
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.isPlainObj|isPlainObj}, {@link RA.isObjLike|isObjLike}, {@link RA.isObj|isObj}
|
---|
18 | * @example
|
---|
19 | *
|
---|
20 | * class Bar {
|
---|
21 | * constructor() {
|
---|
22 | * this.prop = 'value';
|
---|
23 | * }
|
---|
24 | * }
|
---|
25 | *
|
---|
26 | * RA.isNotPlainObj(new Bar()); //=> true
|
---|
27 | * RA.isNotPlainObj({ prop: 'value' }); //=> false
|
---|
28 | * RA.isNotPlainObj(['a', 'b', 'c']); //=> true
|
---|
29 | * RA.isNotPlainObj(Object.create(null); //=> false
|
---|
30 | * RA.isNotPlainObj(new Object()); //=> false
|
---|
31 | */
|
---|
32 | /* eslint-enable max-len */
|
---|
33 | const isNotPlainObj = complement(isPlainObj);
|
---|
34 |
|
---|
35 | export default isNotPlainObj;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.