UNPKG

ramda-extension

Version:

Helpful functions built on top of the mighty Ramda

19 lines (18 loc) 453 B
import { equals } from 'ramda'; import { compareLength } from './internal/lengthUtils'; /** * Returns true if length of array equals first argument * * @func * @category List * * @example * * const lengthEqualsOne = R_.equalsLength(1) * lengthEqualsOne([{}]) // true * lengthEqualsOne([]) // false * * @sig Number -> [a] -> Boolean */ var equalsLength = /*#__PURE__*/compareLength(equals); export default equalsLength;