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:
1014 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import { complement, curryN } from 'ramda';
|
---|
| 2 |
|
---|
| 3 | import isPrimitive from './isPrimitive';
|
---|
| 4 |
|
---|
| 5 | /**
|
---|
| 6 | * Checks if value is not a primitive data type. There are 6 primitive data types: `string`, `number`, `bigint`, `boolean`, `undefined`, `symbol` and a special case of `null`.
|
---|
| 7 | *
|
---|
| 8 | * @func isNotPrimitive
|
---|
| 9 | * @memberOf RA
|
---|
| 10 | * @category Type
|
---|
| 11 | * @sig * -> Boolean
|
---|
| 12 | * @since {@link https://char0n.github.io/ramda-adjunct/2.32.0|v2.32.0}
|
---|
| 13 | * @param {*} val The value to test
|
---|
| 14 | * @return {boolean}
|
---|
| 15 | * @see {@link RA.isPrimitive|isPrimitive}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#primitive_values|MDN Primitive values}, {@link https://developer.mozilla.org/en-US/docs/Glossary/Primitive|MDN Primitive}
|
---|
| 16 | * @example
|
---|
| 17 | *
|
---|
| 18 | * RA.isNotPrimitive(new String("string")); //=> true
|
---|
| 19 | * RA.isNotPrimitive(new Number(1)); //=> true
|
---|
| 20 | * RA.isNotPrimitive("string"); //=> false
|
---|
| 21 | * RA.isNotPrimitive(1); //=> false
|
---|
| 22 | */
|
---|
| 23 |
|
---|
| 24 | const isNotPrimitive = curryN(1, complement(isPrimitive));
|
---|
| 25 |
|
---|
| 26 | export default isNotPrimitive;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.