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:
541 bytes
|
Line | |
---|
1 | import { either, curryN } from 'ramda';
|
---|
2 |
|
---|
3 | import isArray from './isArray';
|
---|
4 | import isString from './isString';
|
---|
5 |
|
---|
6 | /**
|
---|
7 | * Determine if input value is an indexed data type.
|
---|
8 | *
|
---|
9 | * @func isIndexed
|
---|
10 | * @memberOf RA
|
---|
11 | * @since {@link https://char0n.github.io/ramda-adjunct/2.26.0|v2.26.0}
|
---|
12 | * @category Type
|
---|
13 | * @sig * -> Boolean
|
---|
14 | * @param {*} val The value to test
|
---|
15 | * @return {boolean}
|
---|
16 | * @example
|
---|
17 | *
|
---|
18 | * RA.isIndexed([1]) //=> true
|
---|
19 | * RA.isIndexed('test') //=> true
|
---|
20 | */
|
---|
21 |
|
---|
22 | const isIndexed = curryN(1, either(isString, isArray));
|
---|
23 |
|
---|
24 | export default isIndexed;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.