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:
1009 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import { complement, curryN } from 'ramda';
|
---|
| 2 | import isPrimitive from './isPrimitive';
|
---|
| 3 |
|
---|
| 4 | /**
|
---|
| 5 | * 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`.
|
---|
| 6 | *
|
---|
| 7 | * @func isNotPrimitive
|
---|
| 8 | * @memberOf RA
|
---|
| 9 | * @category Type
|
---|
| 10 | * @sig * -> Boolean
|
---|
| 11 | * @since {@link https://char0n.github.io/ramda-adjunct/2.32.0|v2.32.0}
|
---|
| 12 | * @param {*} val The value to test
|
---|
| 13 | * @return {boolean}
|
---|
| 14 | * @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}
|
---|
| 15 | * @example
|
---|
| 16 | *
|
---|
| 17 | * RA.isNotPrimitive(new String("string")); //=> true
|
---|
| 18 | * RA.isNotPrimitive(new Number(1)); //=> true
|
---|
| 19 | * RA.isNotPrimitive("string"); //=> false
|
---|
| 20 | * RA.isNotPrimitive(1); //=> false
|
---|
| 21 | */
|
---|
| 22 |
|
---|
| 23 | var isNotPrimitive = curryN(1, complement(isPrimitive));
|
---|
| 24 | export default isNotPrimitive; |
---|
Note:
See
TracBrowser
for help on using the repository browser.