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:
1011 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = void 0;
|
---|
5 | var _ramda = require("ramda");
|
---|
6 | var _isArray = _interopRequireDefault(require("./isArray"));
|
---|
7 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
---|
8 | /**
|
---|
9 | * Checks if input value is a pair.
|
---|
10 | *
|
---|
11 | * @func isPair
|
---|
12 | * @memberOf RA
|
---|
13 | * @since {@link https://char0n.github.io/ramda-adjunct/1.19.0|v1.19.0}
|
---|
14 | * @category Type
|
---|
15 | * @sig * -> Boolean
|
---|
16 | * @param {*} val The value to test
|
---|
17 | * @return {boolean}
|
---|
18 | * @see {@link http://ramdajs.com/docs/#pair|R.pair}, {@link RA.isNotPair|isNotPair}
|
---|
19 | * @example
|
---|
20 | *
|
---|
21 | * RA.isPair([]); // => false
|
---|
22 | * RA.isPair([0]); // => false
|
---|
23 | * RA.isPair([0, 1]); // => true
|
---|
24 | * RA.isPair([0, 1, 2]); // => false
|
---|
25 | * RA.isPair({ 0: 0, 1: 1 }); // => false
|
---|
26 | * RA.isPair({ foo: 0, bar: 0 }); // => false
|
---|
27 | */
|
---|
28 | var isPair = (0, _ramda.curryN)(1, (0, _ramda.both)(_isArray["default"], (0, _ramda.pipe)(_ramda.length, (0, _ramda.equals)(2))));
|
---|
29 | var _default = isPair;
|
---|
30 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.