source: node_modules/ramda-adjunct/src/isIndexed.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: 541 bytes
Line 
1import { either, curryN } from 'ramda';
2
3import isArray from './isArray';
4import 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
22const isIndexed = curryN(1, either(isString, isArray));
23
24export default isIndexed;
Note: See TracBrowser for help on using the repository browser.