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:
899 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import { equals } from 'ramda';
|
---|
| 2 |
|
---|
| 3 | import compareLength from './internal/compareLength';
|
---|
| 4 |
|
---|
| 5 | /**
|
---|
| 6 | * Returns `true` if the supplied list or string has a length equal to `valueLength`.
|
---|
| 7 | *
|
---|
| 8 | * @func lengthEq
|
---|
| 9 | * @memberOf RA
|
---|
| 10 | * @since {@link https://char0n.github.io/ramda-adjunct/2.8.0|v2.8.0}
|
---|
| 11 | * @category List
|
---|
| 12 | * @sig Number -> [*] -> Boolean
|
---|
| 13 | * @param {number} valueLength The length of the list or string
|
---|
| 14 | * @param {Array|string} value The list or string
|
---|
| 15 | * @return {boolean}
|
---|
| 16 | * @see {@link RA.lengthNotEq|lengthNotEq}, {@link RA.lengthLt|lengthLt}, {@link RA.lengthGt|lengthGt}, {@link RA.lengthLte|lengthLte}, {@link RA.lengthGte|lengthGte},, {@link http://ramdajs.com/docs/#equals|equals}, {@link http://ramdajs.com/docs/#length|length}
|
---|
| 17 | * @example
|
---|
| 18 | *
|
---|
| 19 | * RA.lengthEq(3, [1,2,3]); //=> true
|
---|
| 20 | * RA.lengthEq(3, [1,2,3,4]); //=> false
|
---|
| 21 | */
|
---|
| 22 | const lengthEq = compareLength(equals);
|
---|
| 23 |
|
---|
| 24 | export default lengthEq;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.