UNPKG

ramda-adjunct

Version:

Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.

25 lines (20 loc) 541 B
import { either, curryN } from 'ramda'; import isArray from './isArray'; import isString from './isString'; /** * Determine if input value is an indexed data type. * * @func isIndexed * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.26.0|v2.26.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @example * * RA.isIndexed([1]) //=> true * RA.isIndexed('test') //=> true */ const isIndexed = curryN(1, either(isString, isArray)); export default isIndexed;