update
This commit is contained in:
parent
d9becc67b6
commit
9308795b8b
964 changed files with 104265 additions and 16 deletions
20
node_modules/ramda/src/F.js
generated
vendored
Normal file
20
node_modules/ramda/src/F.js
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* A function that always returns `false`. Any passed in parameters are ignored.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category Function
|
||||
* @sig * -> Boolean
|
||||
* @param {*}
|
||||
* @return {Boolean}
|
||||
* @see R.T
|
||||
* @example
|
||||
*
|
||||
* R.F(); //=> false
|
||||
*/
|
||||
var F = function () {
|
||||
return false;
|
||||
};
|
||||
|
||||
module.exports = F;
|
20
node_modules/ramda/src/T.js
generated
vendored
Normal file
20
node_modules/ramda/src/T.js
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* A function that always returns `true`. Any passed in parameters are ignored.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category Function
|
||||
* @sig * -> Boolean
|
||||
* @param {*}
|
||||
* @return {Boolean}
|
||||
* @see R.F
|
||||
* @example
|
||||
*
|
||||
* R.T(); //=> true
|
||||
*/
|
||||
var T = function () {
|
||||
return true;
|
||||
};
|
||||
|
||||
module.exports = T;
|
30
node_modules/ramda/src/__.js
generated
vendored
Normal file
30
node_modules/ramda/src/__.js
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* A special placeholder value used to specify "gaps" within curried functions,
|
||||
* allowing partial application of any combination of arguments, regardless of
|
||||
* their positions.
|
||||
*
|
||||
* If `g` is a curried ternary function and `_` is `R.__`, the following are
|
||||
* equivalent:
|
||||
*
|
||||
* - `g(1, 2, 3)`
|
||||
* - `g(_, 2, 3)(1)`
|
||||
* - `g(_, _, 3)(1)(2)`
|
||||
* - `g(_, _, 3)(1, 2)`
|
||||
* - `g(_, 2, _)(1, 3)`
|
||||
* - `g(_, 2)(1)(3)`
|
||||
* - `g(_, 2)(1, 3)`
|
||||
* - `g(_, 2)(_, 3)(1)`
|
||||
*
|
||||
* @name __
|
||||
* @constant
|
||||
* @memberOf R
|
||||
* @since v0.6.0
|
||||
* @category Function
|
||||
* @example
|
||||
*
|
||||
* const greet = R.replace('{name}', R.__, 'Hello, {name}!');
|
||||
* greet('Alice'); //=> 'Hello, Alice!'
|
||||
*/
|
||||
module.exports = {
|
||||
'@@functional/placeholder': true
|
||||
};
|
29
node_modules/ramda/src/add.js
generated
vendored
Normal file
29
node_modules/ramda/src/add.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Adds two values.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Math
|
||||
* @sig Number -> Number -> Number
|
||||
* @param {Number} a
|
||||
* @param {Number} b
|
||||
* @return {Number}
|
||||
* @see R.subtract
|
||||
* @example
|
||||
*
|
||||
* R.add(2, 3); //=> 5
|
||||
* R.add(7)(10); //=> 17
|
||||
*/
|
||||
|
||||
|
||||
var add =
|
||||
/*#__PURE__*/
|
||||
_curry2(function add(a, b) {
|
||||
return Number(a) + Number(b);
|
||||
});
|
||||
|
||||
module.exports = add;
|
57
node_modules/ramda/src/addIndex.js
generated
vendored
Normal file
57
node_modules/ramda/src/addIndex.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
var _concat =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_concat");
|
||||
|
||||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var curryN =
|
||||
/*#__PURE__*/
|
||||
require("./curryN");
|
||||
/**
|
||||
* Creates a new list iteration function from an existing one by adding two new
|
||||
* parameters to its callback function: the current index, and the entire list.
|
||||
*
|
||||
* This would turn, for instance, [`R.map`](#map) function into one that
|
||||
* more closely resembles `Array.prototype.map`. Note that this will only work
|
||||
* for functions in which the iteration callback function is the first
|
||||
* parameter, and where the list is the last parameter. (This latter might be
|
||||
* unimportant if the list parameter is not used.)
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.15.0
|
||||
* @category Function
|
||||
* @category List
|
||||
* @sig ((a ... -> b) ... -> [a] -> *) -> ((a ..., Int, [a] -> b) ... -> [a] -> *)
|
||||
* @param {Function} fn A list iteration function that does not pass index or list to its callback
|
||||
* @return {Function} An altered list iteration function that passes (item, index, list) to its callback
|
||||
* @example
|
||||
*
|
||||
* const mapIndexed = R.addIndex(R.map);
|
||||
* mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']);
|
||||
* //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r']
|
||||
*/
|
||||
|
||||
|
||||
var addIndex =
|
||||
/*#__PURE__*/
|
||||
_curry1(function addIndex(fn) {
|
||||
return curryN(fn.length, function () {
|
||||
var idx = 0;
|
||||
var origFn = arguments[0];
|
||||
var list = arguments[arguments.length - 1];
|
||||
var args = Array.prototype.slice.call(arguments, 0);
|
||||
|
||||
args[0] = function () {
|
||||
var result = origFn.apply(this, _concat(arguments, [idx, list]));
|
||||
idx += 1;
|
||||
return result;
|
||||
};
|
||||
|
||||
return fn.apply(this, args);
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = addIndex;
|
52
node_modules/ramda/src/adjust.js
generated
vendored
Normal file
52
node_modules/ramda/src/adjust.js
generated
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
var _concat =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_concat");
|
||||
|
||||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
/**
|
||||
* Applies a function to the value at the given index of an array, returning a
|
||||
* new copy of the array with the element at the given index replaced with the
|
||||
* result of the function application.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.14.0
|
||||
* @category List
|
||||
* @sig Number -> (a -> a) -> [a] -> [a]
|
||||
* @param {Number} idx The index.
|
||||
* @param {Function} fn The function to apply.
|
||||
* @param {Array|Arguments} list An array-like object whose value
|
||||
* at the supplied index will be replaced.
|
||||
* @return {Array} A copy of the supplied array-like object with
|
||||
* the element at index `idx` replaced with the value
|
||||
* returned by applying `fn` to the existing element.
|
||||
* @see R.update
|
||||
* @example
|
||||
*
|
||||
* R.adjust(1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'B', 'c', 'd']
|
||||
* R.adjust(-1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c', 'D']
|
||||
* @symb R.adjust(-1, f, [a, b]) = [a, f(b)]
|
||||
* @symb R.adjust(0, f, [a, b]) = [f(a), b]
|
||||
*/
|
||||
|
||||
|
||||
var adjust =
|
||||
/*#__PURE__*/
|
||||
_curry3(function adjust(idx, fn, list) {
|
||||
if (idx >= list.length || idx < -list.length) {
|
||||
return list;
|
||||
}
|
||||
|
||||
var start = idx < 0 ? list.length : 0;
|
||||
|
||||
var _idx = start + idx;
|
||||
|
||||
var _list = _concat(list);
|
||||
|
||||
_list[_idx] = fn(list[_idx]);
|
||||
return _list;
|
||||
});
|
||||
|
||||
module.exports = adjust;
|
56
node_modules/ramda/src/all.js
generated
vendored
Normal file
56
node_modules/ramda/src/all.js
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xall =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xall");
|
||||
/**
|
||||
* Returns `true` if all elements of the list match the predicate, `false` if
|
||||
* there are any that don't.
|
||||
*
|
||||
* Dispatches to the `all` method of the second argument, if present.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig (a -> Boolean) -> [a] -> Boolean
|
||||
* @param {Function} fn The predicate function.
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Boolean} `true` if the predicate is satisfied by every element, `false`
|
||||
* otherwise.
|
||||
* @see R.any, R.none, R.transduce
|
||||
* @example
|
||||
*
|
||||
* const equals3 = R.equals(3);
|
||||
* R.all(equals3)([3, 3, 3, 3]); //=> true
|
||||
* R.all(equals3)([3, 3, 1, 3]); //=> false
|
||||
*/
|
||||
|
||||
|
||||
var all =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable(['all'], _xall, function all(fn, list) {
|
||||
var idx = 0;
|
||||
|
||||
while (idx < list.length) {
|
||||
if (!fn(list[idx])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return true;
|
||||
}));
|
||||
|
||||
module.exports = all;
|
66
node_modules/ramda/src/allPass.js
generated
vendored
Normal file
66
node_modules/ramda/src/allPass.js
generated
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var curryN =
|
||||
/*#__PURE__*/
|
||||
require("./curryN");
|
||||
|
||||
var max =
|
||||
/*#__PURE__*/
|
||||
require("./max");
|
||||
|
||||
var pluck =
|
||||
/*#__PURE__*/
|
||||
require("./pluck");
|
||||
|
||||
var reduce =
|
||||
/*#__PURE__*/
|
||||
require("./reduce");
|
||||
/**
|
||||
* Takes a list of predicates and returns a predicate that returns true for a
|
||||
* given list of arguments if every one of the provided predicates is satisfied
|
||||
* by those arguments.
|
||||
*
|
||||
* The function returned is a curried function whose arity matches that of the
|
||||
* highest-arity predicate.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category Logic
|
||||
* @sig [(*... -> Boolean)] -> (*... -> Boolean)
|
||||
* @param {Array} predicates An array of predicates to check
|
||||
* @return {Function} The combined predicate
|
||||
* @see R.anyPass
|
||||
* @example
|
||||
*
|
||||
* const isQueen = R.propEq('rank', 'Q');
|
||||
* const isSpade = R.propEq('suit', '♠︎');
|
||||
* const isQueenOfSpades = R.allPass([isQueen, isSpade]);
|
||||
*
|
||||
* isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false
|
||||
* isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true
|
||||
*/
|
||||
|
||||
|
||||
var allPass =
|
||||
/*#__PURE__*/
|
||||
_curry1(function allPass(preds) {
|
||||
return curryN(reduce(max, 0, pluck('length', preds)), function () {
|
||||
var idx = 0;
|
||||
var len = preds.length;
|
||||
|
||||
while (idx < len) {
|
||||
if (!preds[idx].apply(this, arguments)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = allPass;
|
33
node_modules/ramda/src/always.js
generated
vendored
Normal file
33
node_modules/ramda/src/always.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
/**
|
||||
* Returns a function that always returns the given value. Note that for
|
||||
* non-primitives the value returned is a reference to the original value.
|
||||
*
|
||||
* This function is known as `const`, `constant`, or `K` (for K combinator) in
|
||||
* other languages and libraries.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Function
|
||||
* @sig a -> (* -> a)
|
||||
* @param {*} val The value to wrap in a function
|
||||
* @return {Function} A Function :: * -> val.
|
||||
* @example
|
||||
*
|
||||
* const t = R.always('Tee');
|
||||
* t(); //=> 'Tee'
|
||||
*/
|
||||
|
||||
|
||||
var always =
|
||||
/*#__PURE__*/
|
||||
_curry1(function always(val) {
|
||||
return function () {
|
||||
return val;
|
||||
};
|
||||
});
|
||||
|
||||
module.exports = always;
|
31
node_modules/ramda/src/and.js
generated
vendored
Normal file
31
node_modules/ramda/src/and.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Returns `true` if both arguments are `true`; `false` otherwise.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Logic
|
||||
* @sig a -> b -> a | b
|
||||
* @param {Any} a
|
||||
* @param {Any} b
|
||||
* @return {Any} the first argument if it is falsy, otherwise the second argument.
|
||||
* @see R.both, R.xor
|
||||
* @example
|
||||
*
|
||||
* R.and(true, true); //=> true
|
||||
* R.and(true, false); //=> false
|
||||
* R.and(false, true); //=> false
|
||||
* R.and(false, false); //=> false
|
||||
*/
|
||||
|
||||
|
||||
var and =
|
||||
/*#__PURE__*/
|
||||
_curry2(function and(a, b) {
|
||||
return a && b;
|
||||
});
|
||||
|
||||
module.exports = and;
|
44
node_modules/ramda/src/andThen.js
generated
vendored
Normal file
44
node_modules/ramda/src/andThen.js
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _assertPromise =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_assertPromise");
|
||||
/**
|
||||
* Returns the result of applying the onSuccess function to the value inside
|
||||
* a successfully resolved promise. This is useful for working with promises
|
||||
* inside function compositions.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.27.0
|
||||
* @category Function
|
||||
* @sig (a -> b) -> (Promise e a) -> (Promise e b)
|
||||
* @sig (a -> (Promise e b)) -> (Promise e a) -> (Promise e b)
|
||||
* @param {Function} onSuccess The function to apply. Can return a value or a promise of a value.
|
||||
* @param {Promise} p
|
||||
* @return {Promise} The result of calling `p.then(onSuccess)`
|
||||
* @see R.otherwise
|
||||
* @example
|
||||
*
|
||||
* var makeQuery = (email) => ({ query: { email }});
|
||||
*
|
||||
* //getMemberName :: String -> Promise ({firstName, lastName})
|
||||
* var getMemberName = R.pipe(
|
||||
* makeQuery,
|
||||
* fetchMember,
|
||||
* R.andThen(R.pick(['firstName', 'lastName']))
|
||||
* );
|
||||
*/
|
||||
|
||||
|
||||
var andThen =
|
||||
/*#__PURE__*/
|
||||
_curry2(function andThen(f, p) {
|
||||
_assertPromise('andThen', p);
|
||||
|
||||
return p.then(f);
|
||||
});
|
||||
|
||||
module.exports = andThen;
|
57
node_modules/ramda/src/any.js
generated
vendored
Normal file
57
node_modules/ramda/src/any.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xany =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xany");
|
||||
/**
|
||||
* Returns `true` if at least one of the elements of the list match the predicate,
|
||||
* `false` otherwise.
|
||||
*
|
||||
* Dispatches to the `any` method of the second argument, if present.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig (a -> Boolean) -> [a] -> Boolean
|
||||
* @param {Function} fn The predicate function.
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Boolean} `true` if the predicate is satisfied by at least one element, `false`
|
||||
* otherwise.
|
||||
* @see R.all, R.none, R.transduce
|
||||
* @example
|
||||
*
|
||||
* const lessThan0 = R.flip(R.lt)(0);
|
||||
* const lessThan2 = R.flip(R.lt)(2);
|
||||
* R.any(lessThan0)([1, 2]); //=> false
|
||||
* R.any(lessThan2)([1, 2]); //=> true
|
||||
*/
|
||||
|
||||
|
||||
var any =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable(['any'], _xany, function any(fn, list) {
|
||||
var idx = 0;
|
||||
|
||||
while (idx < list.length) {
|
||||
if (fn(list[idx])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return false;
|
||||
}));
|
||||
|
||||
module.exports = any;
|
67
node_modules/ramda/src/anyPass.js
generated
vendored
Normal file
67
node_modules/ramda/src/anyPass.js
generated
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var curryN =
|
||||
/*#__PURE__*/
|
||||
require("./curryN");
|
||||
|
||||
var max =
|
||||
/*#__PURE__*/
|
||||
require("./max");
|
||||
|
||||
var pluck =
|
||||
/*#__PURE__*/
|
||||
require("./pluck");
|
||||
|
||||
var reduce =
|
||||
/*#__PURE__*/
|
||||
require("./reduce");
|
||||
/**
|
||||
* Takes a list of predicates and returns a predicate that returns true for a
|
||||
* given list of arguments if at least one of the provided predicates is
|
||||
* satisfied by those arguments.
|
||||
*
|
||||
* The function returned is a curried function whose arity matches that of the
|
||||
* highest-arity predicate.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category Logic
|
||||
* @sig [(*... -> Boolean)] -> (*... -> Boolean)
|
||||
* @param {Array} predicates An array of predicates to check
|
||||
* @return {Function} The combined predicate
|
||||
* @see R.allPass
|
||||
* @example
|
||||
*
|
||||
* const isClub = R.propEq('suit', '♣');
|
||||
* const isSpade = R.propEq('suit', '♠');
|
||||
* const isBlackCard = R.anyPass([isClub, isSpade]);
|
||||
*
|
||||
* isBlackCard({rank: '10', suit: '♣'}); //=> true
|
||||
* isBlackCard({rank: 'Q', suit: '♠'}); //=> true
|
||||
* isBlackCard({rank: 'Q', suit: '♦'}); //=> false
|
||||
*/
|
||||
|
||||
|
||||
var anyPass =
|
||||
/*#__PURE__*/
|
||||
_curry1(function anyPass(preds) {
|
||||
return curryN(reduce(max, 0, pluck('length', preds)), function () {
|
||||
var idx = 0;
|
||||
var len = preds.length;
|
||||
|
||||
while (idx < len) {
|
||||
if (preds[idx].apply(this, arguments)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = anyPass;
|
54
node_modules/ramda/src/ap.js
generated
vendored
Normal file
54
node_modules/ramda/src/ap.js
generated
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
var _concat =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_concat");
|
||||
|
||||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _reduce =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_reduce");
|
||||
|
||||
var map =
|
||||
/*#__PURE__*/
|
||||
require("./map");
|
||||
/**
|
||||
* ap applies a list of functions to a list of values.
|
||||
*
|
||||
* Dispatches to the `ap` method of the second argument, if present. Also
|
||||
* treats curried functions as applicatives.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.3.0
|
||||
* @category Function
|
||||
* @sig [a -> b] -> [a] -> [b]
|
||||
* @sig Apply f => f (a -> b) -> f a -> f b
|
||||
* @sig (r -> a -> b) -> (r -> a) -> (r -> b)
|
||||
* @param {*} applyF
|
||||
* @param {*} applyX
|
||||
* @return {*}
|
||||
* @example
|
||||
*
|
||||
* R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6]
|
||||
* R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"]
|
||||
*
|
||||
* // R.ap can also be used as S combinator
|
||||
* // when only two functions are passed
|
||||
* R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA'
|
||||
* @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)]
|
||||
*/
|
||||
|
||||
|
||||
var ap =
|
||||
/*#__PURE__*/
|
||||
_curry2(function ap(applyF, applyX) {
|
||||
return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) {
|
||||
return applyF(x)(applyX(x));
|
||||
} : _reduce(function (acc, f) {
|
||||
return _concat(acc, map(f, applyX));
|
||||
}, [], applyF);
|
||||
});
|
||||
|
||||
module.exports = ap;
|
45
node_modules/ramda/src/aperture.js
generated
vendored
Normal file
45
node_modules/ramda/src/aperture.js
generated
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
var _aperture =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_aperture");
|
||||
|
||||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xaperture =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xaperture");
|
||||
/**
|
||||
* Returns a new list, composed of n-tuples of consecutive elements. If `n` is
|
||||
* greater than the length of the list, an empty list is returned.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.12.0
|
||||
* @category List
|
||||
* @sig Number -> [a] -> [[a]]
|
||||
* @param {Number} n The size of the tuples to create
|
||||
* @param {Array} list The list to split into `n`-length tuples
|
||||
* @return {Array} The resulting list of `n`-length tuples
|
||||
* @see R.transduce
|
||||
* @example
|
||||
*
|
||||
* R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]]
|
||||
* R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]]
|
||||
* R.aperture(7, [1, 2, 3, 4, 5]); //=> []
|
||||
*/
|
||||
|
||||
|
||||
var aperture =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable([], _xaperture, _aperture));
|
||||
|
||||
module.exports = aperture;
|
36
node_modules/ramda/src/append.js
generated
vendored
Normal file
36
node_modules/ramda/src/append.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
var _concat =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_concat");
|
||||
|
||||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Returns a new list containing the contents of the given list, followed by
|
||||
* the given element.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig a -> [a] -> [a]
|
||||
* @param {*} el The element to add to the end of the new list.
|
||||
* @param {Array} list The list of elements to add a new item to.
|
||||
* list.
|
||||
* @return {Array} A new list containing the elements of the old list followed by `el`.
|
||||
* @see R.prepend
|
||||
* @example
|
||||
*
|
||||
* R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests']
|
||||
* R.append('tests', []); //=> ['tests']
|
||||
* R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']]
|
||||
*/
|
||||
|
||||
|
||||
var append =
|
||||
/*#__PURE__*/
|
||||
_curry2(function append(el, list) {
|
||||
return _concat(list, [el]);
|
||||
});
|
||||
|
||||
module.exports = append;
|
32
node_modules/ramda/src/apply.js
generated
vendored
Normal file
32
node_modules/ramda/src/apply.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Applies function `fn` to the argument list `args`. This is useful for
|
||||
* creating a fixed-arity function from a variadic function. `fn` should be a
|
||||
* bound function if context is significant.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.7.0
|
||||
* @category Function
|
||||
* @sig (*... -> a) -> [*] -> a
|
||||
* @param {Function} fn The function which will be called with `args`
|
||||
* @param {Array} args The arguments to call `fn` with
|
||||
* @return {*} result The result, equivalent to `fn(...args)`
|
||||
* @see R.call, R.unapply
|
||||
* @example
|
||||
*
|
||||
* const nums = [1, 2, 3, -99, 42, 6, 7];
|
||||
* R.apply(Math.max, nums); //=> 42
|
||||
* @symb R.apply(f, [a, b, c]) = f(a, b, c)
|
||||
*/
|
||||
|
||||
|
||||
var apply =
|
||||
/*#__PURE__*/
|
||||
_curry2(function apply(fn, args) {
|
||||
return fn.apply(this, args);
|
||||
});
|
||||
|
||||
module.exports = apply;
|
82
node_modules/ramda/src/applySpec.js
generated
vendored
Normal file
82
node_modules/ramda/src/applySpec.js
generated
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var apply =
|
||||
/*#__PURE__*/
|
||||
require("./apply");
|
||||
|
||||
var curryN =
|
||||
/*#__PURE__*/
|
||||
require("./curryN");
|
||||
|
||||
var max =
|
||||
/*#__PURE__*/
|
||||
require("./max");
|
||||
|
||||
var pluck =
|
||||
/*#__PURE__*/
|
||||
require("./pluck");
|
||||
|
||||
var reduce =
|
||||
/*#__PURE__*/
|
||||
require("./reduce");
|
||||
|
||||
var keys =
|
||||
/*#__PURE__*/
|
||||
require("./keys");
|
||||
|
||||
var values =
|
||||
/*#__PURE__*/
|
||||
require("./values"); // Use custom mapValues function to avoid issues with specs that include a "map" key and R.map
|
||||
// delegating calls to .map
|
||||
|
||||
|
||||
function mapValues(fn, obj) {
|
||||
return keys(obj).reduce(function (acc, key) {
|
||||
acc[key] = fn(obj[key]);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
/**
|
||||
* Given a spec object recursively mapping properties to functions, creates a
|
||||
* function producing an object of the same structure, by mapping each property
|
||||
* to the result of calling its associated function with the supplied arguments.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.20.0
|
||||
* @category Function
|
||||
* @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v})
|
||||
* @param {Object} spec an object recursively mapping properties to functions for
|
||||
* producing the values for these properties.
|
||||
* @return {Function} A function that returns an object of the same structure
|
||||
* as `spec', with each property set to the value returned by calling its
|
||||
* associated function with the supplied arguments.
|
||||
* @see R.converge, R.juxt
|
||||
* @example
|
||||
*
|
||||
* const getMetrics = R.applySpec({
|
||||
* sum: R.add,
|
||||
* nested: { mul: R.multiply }
|
||||
* });
|
||||
* getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } }
|
||||
* @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } }
|
||||
*/
|
||||
|
||||
|
||||
var applySpec =
|
||||
/*#__PURE__*/
|
||||
_curry1(function applySpec(spec) {
|
||||
spec = mapValues(function (v) {
|
||||
return typeof v == 'function' ? v : applySpec(v);
|
||||
}, spec);
|
||||
return curryN(reduce(max, 0, pluck('length', values(spec))), function () {
|
||||
var args = arguments;
|
||||
return mapValues(function (f) {
|
||||
return apply(f, args);
|
||||
}, spec);
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = applySpec;
|
31
node_modules/ramda/src/applyTo.js
generated
vendored
Normal file
31
node_modules/ramda/src/applyTo.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Takes a value and applies a function to it.
|
||||
*
|
||||
* This function is also known as the `thrush` combinator.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.25.0
|
||||
* @category Function
|
||||
* @sig a -> (a -> b) -> b
|
||||
* @param {*} x The value
|
||||
* @param {Function} f The function to apply
|
||||
* @return {*} The result of applying `f` to `x`
|
||||
* @example
|
||||
*
|
||||
* const t42 = R.applyTo(42);
|
||||
* t42(R.identity); //=> 42
|
||||
* t42(R.add(1)); //=> 43
|
||||
*/
|
||||
|
||||
|
||||
var applyTo =
|
||||
/*#__PURE__*/
|
||||
_curry2(function applyTo(x, f) {
|
||||
return f(x);
|
||||
});
|
||||
|
||||
module.exports = applyTo;
|
39
node_modules/ramda/src/ascend.js
generated
vendored
Normal file
39
node_modules/ramda/src/ascend.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
/**
|
||||
* Makes an ascending comparator function out of a function that returns a value
|
||||
* that can be compared with `<` and `>`.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.23.0
|
||||
* @category Function
|
||||
* @sig Ord b => (a -> b) -> a -> a -> Number
|
||||
* @param {Function} fn A function of arity one that returns a value that can be compared
|
||||
* @param {*} a The first item to be compared.
|
||||
* @param {*} b The second item to be compared.
|
||||
* @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0`
|
||||
* @see R.descend
|
||||
* @example
|
||||
*
|
||||
* const byAge = R.ascend(R.prop('age'));
|
||||
* const people = [
|
||||
* { name: 'Emma', age: 70 },
|
||||
* { name: 'Peter', age: 78 },
|
||||
* { name: 'Mikhail', age: 62 },
|
||||
* ];
|
||||
* const peopleByYoungestFirst = R.sort(byAge, people);
|
||||
* //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }]
|
||||
*/
|
||||
|
||||
|
||||
var ascend =
|
||||
/*#__PURE__*/
|
||||
_curry3(function ascend(fn, a, b) {
|
||||
var aa = fn(a);
|
||||
var bb = fn(b);
|
||||
return aa < bb ? -1 : aa > bb ? 1 : 0;
|
||||
});
|
||||
|
||||
module.exports = ascend;
|
39
node_modules/ramda/src/assoc.js
generated
vendored
Normal file
39
node_modules/ramda/src/assoc.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
/**
|
||||
* Makes a shallow clone of an object, setting or overriding the specified
|
||||
* property with the given value. Note that this copies and flattens prototype
|
||||
* properties onto the new object as well. All non-primitive properties are
|
||||
* copied by reference.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.8.0
|
||||
* @category Object
|
||||
* @sig String -> a -> {k: v} -> {k: v}
|
||||
* @param {String} prop The property name to set
|
||||
* @param {*} val The new value
|
||||
* @param {Object} obj The object to clone
|
||||
* @return {Object} A new object equivalent to the original except for the changed property.
|
||||
* @see R.dissoc, R.pick
|
||||
* @example
|
||||
*
|
||||
* R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}
|
||||
*/
|
||||
|
||||
|
||||
var assoc =
|
||||
/*#__PURE__*/
|
||||
_curry3(function assoc(prop, val, obj) {
|
||||
var result = {};
|
||||
|
||||
for (var p in obj) {
|
||||
result[p] = obj[p];
|
||||
}
|
||||
|
||||
result[prop] = val;
|
||||
return result;
|
||||
});
|
||||
|
||||
module.exports = assoc;
|
73
node_modules/ramda/src/assocPath.js
generated
vendored
Normal file
73
node_modules/ramda/src/assocPath.js
generated
vendored
Normal file
|
@ -0,0 +1,73 @@
|
|||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
|
||||
var _has =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_has");
|
||||
|
||||
var _isArray =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isArray");
|
||||
|
||||
var _isInteger =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isInteger");
|
||||
|
||||
var assoc =
|
||||
/*#__PURE__*/
|
||||
require("./assoc");
|
||||
|
||||
var isNil =
|
||||
/*#__PURE__*/
|
||||
require("./isNil");
|
||||
/**
|
||||
* Makes a shallow clone of an object, setting or overriding the nodes required
|
||||
* to create the given path, and placing the specific value at the tail end of
|
||||
* that path. Note that this copies and flattens prototype properties onto the
|
||||
* new object as well. All non-primitive properties are copied by reference.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.8.0
|
||||
* @category Object
|
||||
* @typedefn Idx = String | Int
|
||||
* @sig [Idx] -> a -> {a} -> {a}
|
||||
* @param {Array} path the path to set
|
||||
* @param {*} val The new value
|
||||
* @param {Object} obj The object to clone
|
||||
* @return {Object} A new object equivalent to the original except along the specified path.
|
||||
* @see R.dissocPath
|
||||
* @example
|
||||
*
|
||||
* R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}}
|
||||
*
|
||||
* // Any missing or non-object keys in path will be overridden
|
||||
* R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}}
|
||||
*/
|
||||
|
||||
|
||||
var assocPath =
|
||||
/*#__PURE__*/
|
||||
_curry3(function assocPath(path, val, obj) {
|
||||
if (path.length === 0) {
|
||||
return val;
|
||||
}
|
||||
|
||||
var idx = path[0];
|
||||
|
||||
if (path.length > 1) {
|
||||
var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {};
|
||||
val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);
|
||||
}
|
||||
|
||||
if (_isInteger(idx) && _isArray(obj)) {
|
||||
var arr = [].concat(obj);
|
||||
arr[idx] = val;
|
||||
return arr;
|
||||
} else {
|
||||
return assoc(idx, val, obj);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = assocPath;
|
44
node_modules/ramda/src/binary.js
generated
vendored
Normal file
44
node_modules/ramda/src/binary.js
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var nAry =
|
||||
/*#__PURE__*/
|
||||
require("./nAry");
|
||||
/**
|
||||
* Wraps a function of any arity (including nullary) in a function that accepts
|
||||
* exactly 2 parameters. Any extraneous parameters will not be passed to the
|
||||
* supplied function.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.2.0
|
||||
* @category Function
|
||||
* @sig (* -> c) -> (a, b -> c)
|
||||
* @param {Function} fn The function to wrap.
|
||||
* @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of
|
||||
* arity 2.
|
||||
* @see R.nAry, R.unary
|
||||
* @example
|
||||
*
|
||||
* const takesThreeArgs = function(a, b, c) {
|
||||
* return [a, b, c];
|
||||
* };
|
||||
* takesThreeArgs.length; //=> 3
|
||||
* takesThreeArgs(1, 2, 3); //=> [1, 2, 3]
|
||||
*
|
||||
* const takesTwoArgs = R.binary(takesThreeArgs);
|
||||
* takesTwoArgs.length; //=> 2
|
||||
* // Only 2 arguments are passed to the wrapped function
|
||||
* takesTwoArgs(1, 2, 3); //=> [1, 2, undefined]
|
||||
* @symb R.binary(f)(a, b, c) = f(a, b)
|
||||
*/
|
||||
|
||||
|
||||
var binary =
|
||||
/*#__PURE__*/
|
||||
_curry1(function binary(fn) {
|
||||
return nAry(2, fn);
|
||||
});
|
||||
|
||||
module.exports = binary;
|
40
node_modules/ramda/src/bind.js
generated
vendored
Normal file
40
node_modules/ramda/src/bind.js
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
var _arity =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_arity");
|
||||
|
||||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Creates a function that is bound to a context.
|
||||
* Note: `R.bind` does not provide the additional argument-binding capabilities of
|
||||
* [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.6.0
|
||||
* @category Function
|
||||
* @category Object
|
||||
* @sig (* -> *) -> {*} -> (* -> *)
|
||||
* @param {Function} fn The function to bind to context
|
||||
* @param {Object} thisObj The context to bind `fn` to
|
||||
* @return {Function} A function that will execute in the context of `thisObj`.
|
||||
* @see R.partial
|
||||
* @example
|
||||
*
|
||||
* const log = R.bind(console.log, console);
|
||||
* R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}
|
||||
* // logs {a: 2}
|
||||
* @symb R.bind(f, o)(a, b) = f.call(o, a, b)
|
||||
*/
|
||||
|
||||
|
||||
var bind =
|
||||
/*#__PURE__*/
|
||||
_curry2(function bind(fn, thisObj) {
|
||||
return _arity(fn.length, function () {
|
||||
return fn.apply(thisObj, arguments);
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = bind;
|
57
node_modules/ramda/src/both.js
generated
vendored
Normal file
57
node_modules/ramda/src/both.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _isFunction =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isFunction");
|
||||
|
||||
var and =
|
||||
/*#__PURE__*/
|
||||
require("./and");
|
||||
|
||||
var lift =
|
||||
/*#__PURE__*/
|
||||
require("./lift");
|
||||
/**
|
||||
* A function which calls the two provided functions and returns the `&&`
|
||||
* of the results.
|
||||
* It returns the result of the first function if it is false-y and the result
|
||||
* of the second function otherwise. Note that this is short-circuited,
|
||||
* meaning that the second function will not be invoked if the first returns a
|
||||
* false-y value.
|
||||
*
|
||||
* In addition to functions, `R.both` also accepts any fantasy-land compatible
|
||||
* applicative functor.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.12.0
|
||||
* @category Logic
|
||||
* @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)
|
||||
* @param {Function} f A predicate
|
||||
* @param {Function} g Another predicate
|
||||
* @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together.
|
||||
* @see R.and
|
||||
* @example
|
||||
*
|
||||
* const gt10 = R.gt(R.__, 10)
|
||||
* const lt20 = R.lt(R.__, 20)
|
||||
* const f = R.both(gt10, lt20);
|
||||
* f(15); //=> true
|
||||
* f(30); //=> false
|
||||
*
|
||||
* R.both(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(false)
|
||||
* R.both([false, false, 'a'], [11]); //=> [false, false, 11]
|
||||
*/
|
||||
|
||||
|
||||
var both =
|
||||
/*#__PURE__*/
|
||||
_curry2(function both(f, g) {
|
||||
return _isFunction(f) ? function _both() {
|
||||
return f.apply(this, arguments) && g.apply(this, arguments);
|
||||
} : lift(and)(f, g);
|
||||
});
|
||||
|
||||
module.exports = both;
|
43
node_modules/ramda/src/call.js
generated
vendored
Normal file
43
node_modules/ramda/src/call.js
generated
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
var curry =
|
||||
/*#__PURE__*/
|
||||
require("./curry");
|
||||
/**
|
||||
* Returns the result of calling its first argument with the remaining
|
||||
* arguments. This is occasionally useful as a converging function for
|
||||
* [`R.converge`](#converge): the first branch can produce a function while the
|
||||
* remaining branches produce values to be passed to that function as its
|
||||
* arguments.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category Function
|
||||
* @sig (*... -> a),*... -> a
|
||||
* @param {Function} fn The function to apply to the remaining arguments.
|
||||
* @param {...*} args Any number of positional arguments.
|
||||
* @return {*}
|
||||
* @see R.apply
|
||||
* @example
|
||||
*
|
||||
* R.call(R.add, 1, 2); //=> 3
|
||||
*
|
||||
* const indentN = R.pipe(R.repeat(' '),
|
||||
* R.join(''),
|
||||
* R.replace(/^(?!$)/gm));
|
||||
*
|
||||
* const format = R.converge(R.call, [
|
||||
* R.pipe(R.prop('indent'), indentN),
|
||||
* R.prop('value')
|
||||
* ]);
|
||||
*
|
||||
* format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n'
|
||||
* @symb R.call(f, a, b) = f(a, b)
|
||||
*/
|
||||
|
||||
|
||||
var call =
|
||||
/*#__PURE__*/
|
||||
curry(function call(fn) {
|
||||
return fn.apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
});
|
||||
module.exports = call;
|
62
node_modules/ramda/src/chain.js
generated
vendored
Normal file
62
node_modules/ramda/src/chain.js
generated
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _makeFlat =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_makeFlat");
|
||||
|
||||
var _xchain =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xchain");
|
||||
|
||||
var map =
|
||||
/*#__PURE__*/
|
||||
require("./map");
|
||||
/**
|
||||
* `chain` maps a function over a list and concatenates the results. `chain`
|
||||
* is also known as `flatMap` in some libraries.
|
||||
*
|
||||
* Dispatches to the `chain` method of the second argument, if present,
|
||||
* according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain).
|
||||
*
|
||||
* If second argument is a function, `chain(f, g)(x)` is equivalent to `f(g(x), x)`.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.3.0
|
||||
* @category List
|
||||
* @sig Chain m => (a -> m b) -> m a -> m b
|
||||
* @param {Function} fn The function to map with
|
||||
* @param {Array} list The list to map over
|
||||
* @return {Array} The result of flat-mapping `list` with `fn`
|
||||
* @example
|
||||
*
|
||||
* const duplicate = n => [n, n];
|
||||
* R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3]
|
||||
*
|
||||
* R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1]
|
||||
*/
|
||||
|
||||
|
||||
var chain =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable(['fantasy-land/chain', 'chain'], _xchain, function chain(fn, monad) {
|
||||
if (typeof monad === 'function') {
|
||||
return function (x) {
|
||||
return fn(monad(x))(x);
|
||||
};
|
||||
}
|
||||
|
||||
return _makeFlat(false)(map(fn, monad));
|
||||
}));
|
||||
|
||||
module.exports = chain;
|
36
node_modules/ramda/src/clamp.js
generated
vendored
Normal file
36
node_modules/ramda/src/clamp.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
/**
|
||||
* Restricts a number to be within a range.
|
||||
*
|
||||
* Also works for other ordered types such as Strings and Dates.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.20.0
|
||||
* @category Relation
|
||||
* @sig Ord a => a -> a -> a -> a
|
||||
* @param {Number} minimum The lower limit of the clamp (inclusive)
|
||||
* @param {Number} maximum The upper limit of the clamp (inclusive)
|
||||
* @param {Number} value Value to be clamped
|
||||
* @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise
|
||||
* @example
|
||||
*
|
||||
* R.clamp(1, 10, -5) // => 1
|
||||
* R.clamp(1, 10, 15) // => 10
|
||||
* R.clamp(1, 10, 4) // => 4
|
||||
*/
|
||||
|
||||
|
||||
var clamp =
|
||||
/*#__PURE__*/
|
||||
_curry3(function clamp(min, max, value) {
|
||||
if (min > max) {
|
||||
throw new Error('min must not be greater than max in clamp(min, max, value)');
|
||||
}
|
||||
|
||||
return value < min ? min : value > max ? max : value;
|
||||
});
|
||||
|
||||
module.exports = clamp;
|
37
node_modules/ramda/src/clone.js
generated
vendored
Normal file
37
node_modules/ramda/src/clone.js
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
var _clone =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_clone");
|
||||
|
||||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
/**
|
||||
* Creates a deep copy of the value which may contain (nested) `Array`s and
|
||||
* `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are
|
||||
* assigned by reference rather than copied
|
||||
*
|
||||
* Dispatches to a `clone` method if present.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Object
|
||||
* @sig {*} -> {*}
|
||||
* @param {*} value The object or array to clone
|
||||
* @return {*} A deeply cloned copy of `val`
|
||||
* @example
|
||||
*
|
||||
* const objects = [{}, {}, {}];
|
||||
* const objectsClone = R.clone(objects);
|
||||
* objects === objectsClone; //=> false
|
||||
* objects[0] === objectsClone[0]; //=> false
|
||||
*/
|
||||
|
||||
|
||||
var clone =
|
||||
/*#__PURE__*/
|
||||
_curry1(function clone(value) {
|
||||
return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true);
|
||||
});
|
||||
|
||||
module.exports = clone;
|
37
node_modules/ramda/src/comparator.js
generated
vendored
Normal file
37
node_modules/ramda/src/comparator.js
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
/**
|
||||
* Makes a comparator function out of a function that reports whether the first
|
||||
* element is less than the second.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Function
|
||||
* @sig ((a, b) -> Boolean) -> ((a, b) -> Number)
|
||||
* @param {Function} pred A predicate function of arity two which will return `true` if the first argument
|
||||
* is less than the second, `false` otherwise
|
||||
* @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0`
|
||||
* @example
|
||||
*
|
||||
* const byAge = R.comparator((a, b) => a.age < b.age);
|
||||
* const people = [
|
||||
* { name: 'Emma', age: 70 },
|
||||
* { name: 'Peter', age: 78 },
|
||||
* { name: 'Mikhail', age: 62 },
|
||||
* ];
|
||||
* const peopleByIncreasingAge = R.sort(byAge, people);
|
||||
* //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }]
|
||||
*/
|
||||
|
||||
|
||||
var comparator =
|
||||
/*#__PURE__*/
|
||||
_curry1(function comparator(pred) {
|
||||
return function (a, b) {
|
||||
return pred(a, b) ? -1 : pred(b, a) ? 1 : 0;
|
||||
};
|
||||
});
|
||||
|
||||
module.exports = comparator;
|
35
node_modules/ramda/src/complement.js
generated
vendored
Normal file
35
node_modules/ramda/src/complement.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
var lift =
|
||||
/*#__PURE__*/
|
||||
require("./lift");
|
||||
|
||||
var not =
|
||||
/*#__PURE__*/
|
||||
require("./not");
|
||||
/**
|
||||
* Takes a function `f` and returns a function `g` such that if called with the same arguments
|
||||
* when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`.
|
||||
*
|
||||
* `R.complement` may be applied to any functor
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.12.0
|
||||
* @category Logic
|
||||
* @sig (*... -> *) -> (*... -> Boolean)
|
||||
* @param {Function} f
|
||||
* @return {Function}
|
||||
* @see R.not
|
||||
* @example
|
||||
*
|
||||
* const isNotNil = R.complement(R.isNil);
|
||||
* isNil(null); //=> true
|
||||
* isNotNil(null); //=> false
|
||||
* isNil(7); //=> false
|
||||
* isNotNil(7); //=> true
|
||||
*/
|
||||
|
||||
|
||||
var complement =
|
||||
/*#__PURE__*/
|
||||
lift(not);
|
||||
module.exports = complement;
|
42
node_modules/ramda/src/compose.js
generated
vendored
Normal file
42
node_modules/ramda/src/compose.js
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
var pipe =
|
||||
/*#__PURE__*/
|
||||
require("./pipe");
|
||||
|
||||
var reverse =
|
||||
/*#__PURE__*/
|
||||
require("./reverse");
|
||||
/**
|
||||
* Performs right-to-left function composition. The last argument may have
|
||||
* any arity; the remaining arguments must be unary.
|
||||
*
|
||||
* **Note:** The result of compose is not automatically curried.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Function
|
||||
* @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z)
|
||||
* @param {...Function} ...functions The functions to compose
|
||||
* @return {Function}
|
||||
* @see R.pipe
|
||||
* @example
|
||||
*
|
||||
* const classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName
|
||||
* const yellGreeting = R.compose(R.toUpper, classyGreeting);
|
||||
* yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND"
|
||||
*
|
||||
* R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7
|
||||
*
|
||||
* @symb R.compose(f, g, h)(a, b) = f(g(h(a, b)))
|
||||
*/
|
||||
|
||||
|
||||
function compose() {
|
||||
if (arguments.length === 0) {
|
||||
throw new Error('compose requires at least one argument');
|
||||
}
|
||||
|
||||
return pipe.apply(this, reverse(arguments));
|
||||
}
|
||||
|
||||
module.exports = compose;
|
55
node_modules/ramda/src/composeK.js
generated
vendored
Normal file
55
node_modules/ramda/src/composeK.js
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
var chain =
|
||||
/*#__PURE__*/
|
||||
require("./chain");
|
||||
|
||||
var compose =
|
||||
/*#__PURE__*/
|
||||
require("./compose");
|
||||
|
||||
var map =
|
||||
/*#__PURE__*/
|
||||
require("./map");
|
||||
/**
|
||||
* Returns the right-to-left Kleisli composition of the provided functions,
|
||||
* each of which must return a value of a type supported by [`chain`](#chain).
|
||||
*
|
||||
* `R.composeK(h, g, f)` is equivalent to `R.compose(R.chain(h), R.chain(g), f)`.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.16.0
|
||||
* @category Function
|
||||
* @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z)
|
||||
* @param {...Function} ...functions The functions to compose
|
||||
* @return {Function}
|
||||
* @see R.pipeK
|
||||
* @deprecated since v0.26.0
|
||||
* @example
|
||||
*
|
||||
* // get :: String -> Object -> Maybe *
|
||||
* const get = R.curry((propName, obj) => Maybe(obj[propName]))
|
||||
*
|
||||
* // getStateCode :: Maybe String -> Maybe String
|
||||
* const getStateCode = R.composeK(
|
||||
* R.compose(Maybe.of, R.toUpper),
|
||||
* get('state'),
|
||||
* get('address'),
|
||||
* get('user'),
|
||||
* );
|
||||
* getStateCode({"user":{"address":{"state":"ny"}}}); //=> Maybe.Just("NY")
|
||||
* getStateCode({}); //=> Maybe.Nothing()
|
||||
* @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a)))
|
||||
*/
|
||||
|
||||
|
||||
function composeK() {
|
||||
if (arguments.length === 0) {
|
||||
throw new Error('composeK requires at least one argument');
|
||||
}
|
||||
|
||||
var init = Array.prototype.slice.call(arguments);
|
||||
var last = init.pop();
|
||||
return compose(compose.apply(this, map(chain, init)), last);
|
||||
}
|
||||
|
||||
module.exports = composeK;
|
53
node_modules/ramda/src/composeP.js
generated
vendored
Normal file
53
node_modules/ramda/src/composeP.js
generated
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
var pipeP =
|
||||
/*#__PURE__*/
|
||||
require("./pipeP");
|
||||
|
||||
var reverse =
|
||||
/*#__PURE__*/
|
||||
require("./reverse");
|
||||
/**
|
||||
* Performs right-to-left composition of one or more Promise-returning
|
||||
* functions. The last arguments may have any arity; the remaining
|
||||
* arguments must be unary.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.10.0
|
||||
* @category Function
|
||||
* @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z)
|
||||
* @param {...Function} functions The functions to compose
|
||||
* @return {Function}
|
||||
* @see R.pipeP
|
||||
* @deprecated since v0.26.0
|
||||
* @example
|
||||
*
|
||||
* const db = {
|
||||
* users: {
|
||||
* JOE: {
|
||||
* name: 'Joe',
|
||||
* followers: ['STEVE', 'SUZY']
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* // We'll pretend to do a db lookup which returns a promise
|
||||
* const lookupUser = (userId) => Promise.resolve(db.users[userId])
|
||||
* const lookupFollowers = (user) => Promise.resolve(user.followers)
|
||||
* lookupUser('JOE').then(lookupFollowers)
|
||||
*
|
||||
* // followersForUser :: String -> Promise [UserId]
|
||||
* const followersForUser = R.composeP(lookupFollowers, lookupUser);
|
||||
* followersForUser('JOE').then(followers => console.log('Followers:', followers))
|
||||
* // Followers: ["STEVE","SUZY"]
|
||||
*/
|
||||
|
||||
|
||||
function composeP() {
|
||||
if (arguments.length === 0) {
|
||||
throw new Error('composeP requires at least one argument');
|
||||
}
|
||||
|
||||
return pipeP.apply(this, reverse(arguments));
|
||||
}
|
||||
|
||||
module.exports = composeP;
|
44
node_modules/ramda/src/composeWith.js
generated
vendored
Normal file
44
node_modules/ramda/src/composeWith.js
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var pipeWith =
|
||||
/*#__PURE__*/
|
||||
require("./pipeWith");
|
||||
|
||||
var reverse =
|
||||
/*#__PURE__*/
|
||||
require("./reverse");
|
||||
/**
|
||||
* Performs right-to-left function composition using transforming function. The last argument may have
|
||||
* any arity; the remaining arguments must be unary.
|
||||
*
|
||||
* **Note:** The result of compose is not automatically curried. Transforming function is not used on the
|
||||
* last argument.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.26.0
|
||||
* @category Function
|
||||
* @sig ((* -> *), [(y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)]) -> ((a, b, ..., n) -> z)
|
||||
* @param {...Function} ...functions The functions to compose
|
||||
* @return {Function}
|
||||
* @see R.compose, R.pipeWith
|
||||
* @example
|
||||
*
|
||||
* const composeWhileNotNil = R.composeWith((f, res) => R.isNil(res) ? res : f(res));
|
||||
*
|
||||
* composeWhileNotNil([R.inc, R.prop('age')])({age: 1}) //=> 2
|
||||
* composeWhileNotNil([R.inc, R.prop('age')])({}) //=> undefined
|
||||
*
|
||||
* @symb R.composeWith(f)([g, h, i])(...args) = f(g, f(h, i(...args)))
|
||||
*/
|
||||
|
||||
|
||||
var composeWith =
|
||||
/*#__PURE__*/
|
||||
_curry2(function composeWith(xf, list) {
|
||||
return pipeWith.apply(this, [xf, reverse(list)]);
|
||||
});
|
||||
|
||||
module.exports = composeWith;
|
80
node_modules/ramda/src/concat.js
generated
vendored
Normal file
80
node_modules/ramda/src/concat.js
generated
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _isArray =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isArray");
|
||||
|
||||
var _isFunction =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isFunction");
|
||||
|
||||
var _isString =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isString");
|
||||
|
||||
var toString =
|
||||
/*#__PURE__*/
|
||||
require("./toString");
|
||||
/**
|
||||
* Returns the result of concatenating the given lists or strings.
|
||||
*
|
||||
* Note: `R.concat` expects both arguments to be of the same type,
|
||||
* unlike the native `Array.prototype.concat` method. It will throw
|
||||
* an error if you `concat` an Array with a non-Array value.
|
||||
*
|
||||
* Dispatches to the `concat` method of the first argument, if present.
|
||||
* Can also concatenate two members of a [fantasy-land
|
||||
* compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup).
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig [a] -> [a] -> [a]
|
||||
* @sig String -> String -> String
|
||||
* @param {Array|String} firstList The first list
|
||||
* @param {Array|String} secondList The second list
|
||||
* @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of
|
||||
* `secondList`.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* R.concat('ABC', 'DEF'); // 'ABCDEF'
|
||||
* R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]
|
||||
* R.concat([], []); //=> []
|
||||
*/
|
||||
|
||||
|
||||
var concat =
|
||||
/*#__PURE__*/
|
||||
_curry2(function concat(a, b) {
|
||||
if (_isArray(a)) {
|
||||
if (_isArray(b)) {
|
||||
return a.concat(b);
|
||||
}
|
||||
|
||||
throw new TypeError(toString(b) + ' is not an array');
|
||||
}
|
||||
|
||||
if (_isString(a)) {
|
||||
if (_isString(b)) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
throw new TypeError(toString(b) + ' is not a string');
|
||||
}
|
||||
|
||||
if (a != null && _isFunction(a['fantasy-land/concat'])) {
|
||||
return a['fantasy-land/concat'](b);
|
||||
}
|
||||
|
||||
if (a != null && _isFunction(a.concat)) {
|
||||
return a.concat(b);
|
||||
}
|
||||
|
||||
throw new TypeError(toString(a) + ' does not have a method named "concat" or "fantasy-land/concat"');
|
||||
});
|
||||
|
||||
module.exports = concat;
|
68
node_modules/ramda/src/cond.js
generated
vendored
Normal file
68
node_modules/ramda/src/cond.js
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
var _arity =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_arity");
|
||||
|
||||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var map =
|
||||
/*#__PURE__*/
|
||||
require("./map");
|
||||
|
||||
var max =
|
||||
/*#__PURE__*/
|
||||
require("./max");
|
||||
|
||||
var reduce =
|
||||
/*#__PURE__*/
|
||||
require("./reduce");
|
||||
/**
|
||||
* Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic.
|
||||
* `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments
|
||||
* to `fn` are applied to each of the predicates in turn until one returns a
|
||||
* "truthy" value, at which point `fn` returns the result of applying its
|
||||
* arguments to the corresponding transformer. If none of the predicates
|
||||
* matches, `fn` returns undefined.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.6.0
|
||||
* @category Logic
|
||||
* @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *)
|
||||
* @param {Array} pairs A list of [predicate, transformer]
|
||||
* @return {Function}
|
||||
* @see R.ifElse, R.unless, R.when
|
||||
* @example
|
||||
*
|
||||
* const fn = R.cond([
|
||||
* [R.equals(0), R.always('water freezes at 0°C')],
|
||||
* [R.equals(100), R.always('water boils at 100°C')],
|
||||
* [R.T, temp => 'nothing special happens at ' + temp + '°C']
|
||||
* ]);
|
||||
* fn(0); //=> 'water freezes at 0°C'
|
||||
* fn(50); //=> 'nothing special happens at 50°C'
|
||||
* fn(100); //=> 'water boils at 100°C'
|
||||
*/
|
||||
|
||||
|
||||
var cond =
|
||||
/*#__PURE__*/
|
||||
_curry1(function cond(pairs) {
|
||||
var arity = reduce(max, 0, map(function (pair) {
|
||||
return pair[0].length;
|
||||
}, pairs));
|
||||
return _arity(arity, function () {
|
||||
var idx = 0;
|
||||
|
||||
while (idx < pairs.length) {
|
||||
if (pairs[idx][0].apply(this, arguments)) {
|
||||
return pairs[idx][1].apply(this, arguments);
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = cond;
|
48
node_modules/ramda/src/construct.js
generated
vendored
Normal file
48
node_modules/ramda/src/construct.js
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var constructN =
|
||||
/*#__PURE__*/
|
||||
require("./constructN");
|
||||
/**
|
||||
* Wraps a constructor function inside a curried function that can be called
|
||||
* with the same arguments and returns the same type.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Function
|
||||
* @sig (* -> {*}) -> (* -> {*})
|
||||
* @param {Function} fn The constructor function to wrap.
|
||||
* @return {Function} A wrapped, curried constructor function.
|
||||
* @see R.invoker
|
||||
* @example
|
||||
*
|
||||
* // Constructor function
|
||||
* function Animal(kind) {
|
||||
* this.kind = kind;
|
||||
* };
|
||||
* Animal.prototype.sighting = function() {
|
||||
* return "It's a " + this.kind + "!";
|
||||
* }
|
||||
*
|
||||
* const AnimalConstructor = R.construct(Animal)
|
||||
*
|
||||
* // Notice we no longer need the 'new' keyword:
|
||||
* AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}};
|
||||
*
|
||||
* const animalTypes = ["Lion", "Tiger", "Bear"];
|
||||
* const animalSighting = R.invoker(0, 'sighting');
|
||||
* const sightNewAnimal = R.compose(animalSighting, AnimalConstructor);
|
||||
* R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"]
|
||||
*/
|
||||
|
||||
|
||||
var construct =
|
||||
/*#__PURE__*/
|
||||
_curry1(function construct(Fn) {
|
||||
return constructN(Fn.length, Fn);
|
||||
});
|
||||
|
||||
module.exports = construct;
|
97
node_modules/ramda/src/constructN.js
generated
vendored
Normal file
97
node_modules/ramda/src/constructN.js
generated
vendored
Normal file
|
@ -0,0 +1,97 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var curry =
|
||||
/*#__PURE__*/
|
||||
require("./curry");
|
||||
|
||||
var nAry =
|
||||
/*#__PURE__*/
|
||||
require("./nAry");
|
||||
/**
|
||||
* Wraps a constructor function inside a curried function that can be called
|
||||
* with the same arguments and returns the same type. The arity of the function
|
||||
* returned is specified to allow using variadic constructor functions.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.4.0
|
||||
* @category Function
|
||||
* @sig Number -> (* -> {*}) -> (* -> {*})
|
||||
* @param {Number} n The arity of the constructor function.
|
||||
* @param {Function} Fn The constructor function to wrap.
|
||||
* @return {Function} A wrapped, curried constructor function.
|
||||
* @example
|
||||
*
|
||||
* // Variadic Constructor function
|
||||
* function Salad() {
|
||||
* this.ingredients = arguments;
|
||||
* }
|
||||
*
|
||||
* Salad.prototype.recipe = function() {
|
||||
* const instructions = R.map(ingredient => 'Add a dollop of ' + ingredient, this.ingredients);
|
||||
* return R.join('\n', instructions);
|
||||
* };
|
||||
*
|
||||
* const ThreeLayerSalad = R.constructN(3, Salad);
|
||||
*
|
||||
* // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments.
|
||||
* const salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup');
|
||||
*
|
||||
* console.log(salad.recipe());
|
||||
* // Add a dollop of Mayonnaise
|
||||
* // Add a dollop of Potato Chips
|
||||
* // Add a dollop of Ketchup
|
||||
*/
|
||||
|
||||
|
||||
var constructN =
|
||||
/*#__PURE__*/
|
||||
_curry2(function constructN(n, Fn) {
|
||||
if (n > 10) {
|
||||
throw new Error('Constructor with greater than ten arguments');
|
||||
}
|
||||
|
||||
if (n === 0) {
|
||||
return function () {
|
||||
return new Fn();
|
||||
};
|
||||
}
|
||||
|
||||
return curry(nAry(n, function ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
||||
switch (arguments.length) {
|
||||
case 1:
|
||||
return new Fn($0);
|
||||
|
||||
case 2:
|
||||
return new Fn($0, $1);
|
||||
|
||||
case 3:
|
||||
return new Fn($0, $1, $2);
|
||||
|
||||
case 4:
|
||||
return new Fn($0, $1, $2, $3);
|
||||
|
||||
case 5:
|
||||
return new Fn($0, $1, $2, $3, $4);
|
||||
|
||||
case 6:
|
||||
return new Fn($0, $1, $2, $3, $4, $5);
|
||||
|
||||
case 7:
|
||||
return new Fn($0, $1, $2, $3, $4, $5, $6);
|
||||
|
||||
case 8:
|
||||
return new Fn($0, $1, $2, $3, $4, $5, $6, $7);
|
||||
|
||||
case 9:
|
||||
return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8);
|
||||
|
||||
case 10:
|
||||
return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9);
|
||||
}
|
||||
}));
|
||||
});
|
||||
|
||||
module.exports = constructN;
|
37
node_modules/ramda/src/contains.js
generated
vendored
Normal file
37
node_modules/ramda/src/contains.js
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
var _includes =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_includes");
|
||||
|
||||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Returns `true` if the specified value is equal, in [`R.equals`](#equals)
|
||||
* terms, to at least one element of the given list; `false` otherwise.
|
||||
* Works also with strings.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig a -> [a] -> Boolean
|
||||
* @param {Object} a The item to compare against.
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.
|
||||
* @see R.includes
|
||||
* @deprecated since v0.26.0
|
||||
* @example
|
||||
*
|
||||
* R.contains(3, [1, 2, 3]); //=> true
|
||||
* R.contains(4, [1, 2, 3]); //=> false
|
||||
* R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true
|
||||
* R.contains([42], [[42]]); //=> true
|
||||
* R.contains('ba', 'banana'); //=>true
|
||||
*/
|
||||
|
||||
|
||||
var contains =
|
||||
/*#__PURE__*/
|
||||
_curry2(_includes);
|
||||
|
||||
module.exports = contains;
|
66
node_modules/ramda/src/converge.js
generated
vendored
Normal file
66
node_modules/ramda/src/converge.js
generated
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _map =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_map");
|
||||
|
||||
var curryN =
|
||||
/*#__PURE__*/
|
||||
require("./curryN");
|
||||
|
||||
var max =
|
||||
/*#__PURE__*/
|
||||
require("./max");
|
||||
|
||||
var pluck =
|
||||
/*#__PURE__*/
|
||||
require("./pluck");
|
||||
|
||||
var reduce =
|
||||
/*#__PURE__*/
|
||||
require("./reduce");
|
||||
/**
|
||||
* Accepts a converging function and a list of branching functions and returns
|
||||
* a new function. The arity of the new function is the same as the arity of
|
||||
* the longest branching function. When invoked, this new function is applied
|
||||
* to some arguments, and each branching function is applied to those same
|
||||
* arguments. The results of each branching function are passed as arguments
|
||||
* to the converging function to produce the return value.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.4.2
|
||||
* @category Function
|
||||
* @sig ((x1, x2, ...) -> z) -> [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> (a -> b -> ... -> z)
|
||||
* @param {Function} after A function. `after` will be invoked with the return values of
|
||||
* `fn1` and `fn2` as its arguments.
|
||||
* @param {Array} functions A list of functions.
|
||||
* @return {Function} A new function.
|
||||
* @see R.useWith
|
||||
* @example
|
||||
*
|
||||
* const average = R.converge(R.divide, [R.sum, R.length])
|
||||
* average([1, 2, 3, 4, 5, 6, 7]) //=> 4
|
||||
*
|
||||
* const strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower])
|
||||
* strangeConcat("Yodel") //=> "YODELyodel"
|
||||
*
|
||||
* @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b))
|
||||
*/
|
||||
|
||||
|
||||
var converge =
|
||||
/*#__PURE__*/
|
||||
_curry2(function converge(after, fns) {
|
||||
return curryN(reduce(max, 0, pluck('length', fns)), function () {
|
||||
var args = arguments;
|
||||
var context = this;
|
||||
return after.apply(context, _map(function (fn) {
|
||||
return fn.apply(context, args);
|
||||
}, fns));
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = converge;
|
35
node_modules/ramda/src/countBy.js
generated
vendored
Normal file
35
node_modules/ramda/src/countBy.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
var reduceBy =
|
||||
/*#__PURE__*/
|
||||
require("./reduceBy");
|
||||
/**
|
||||
* Counts the elements of a list according to how many match each value of a
|
||||
* key generated by the supplied function. Returns an object mapping the keys
|
||||
* produced by `fn` to the number of occurrences in the list. Note that all
|
||||
* keys are coerced to strings because of how JavaScript objects work.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Relation
|
||||
* @sig (a -> String) -> [a] -> {*}
|
||||
* @param {Function} fn The function used to map values to keys.
|
||||
* @param {Array} list The list to count elements from.
|
||||
* @return {Object} An object mapping keys to number of occurrences in the list.
|
||||
* @example
|
||||
*
|
||||
* const numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2];
|
||||
* R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1}
|
||||
*
|
||||
* const letters = ['a', 'b', 'A', 'a', 'B', 'c'];
|
||||
* R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1}
|
||||
*/
|
||||
|
||||
|
||||
var countBy =
|
||||
/*#__PURE__*/
|
||||
reduceBy(function (acc, elem) {
|
||||
return acc + 1;
|
||||
}, 0);
|
||||
module.exports = countBy;
|
57
node_modules/ramda/src/curry.js
generated
vendored
Normal file
57
node_modules/ramda/src/curry.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var curryN =
|
||||
/*#__PURE__*/
|
||||
require("./curryN");
|
||||
/**
|
||||
* Returns a curried equivalent of the provided function. The curried function
|
||||
* has two unusual capabilities. First, its arguments needn't be provided one
|
||||
* at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the
|
||||
* following are equivalent:
|
||||
*
|
||||
* - `g(1)(2)(3)`
|
||||
* - `g(1)(2, 3)`
|
||||
* - `g(1, 2)(3)`
|
||||
* - `g(1, 2, 3)`
|
||||
*
|
||||
* Secondly, the special placeholder value [`R.__`](#__) may be used to specify
|
||||
* "gaps", allowing partial application of any combination of arguments,
|
||||
* regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),
|
||||
* the following are equivalent:
|
||||
*
|
||||
* - `g(1, 2, 3)`
|
||||
* - `g(_, 2, 3)(1)`
|
||||
* - `g(_, _, 3)(1)(2)`
|
||||
* - `g(_, _, 3)(1, 2)`
|
||||
* - `g(_, 2)(1)(3)`
|
||||
* - `g(_, 2)(1, 3)`
|
||||
* - `g(_, 2)(_, 3)(1)`
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Function
|
||||
* @sig (* -> a) -> (* -> a)
|
||||
* @param {Function} fn The function to curry.
|
||||
* @return {Function} A new, curried function.
|
||||
* @see R.curryN, R.partial
|
||||
* @example
|
||||
*
|
||||
* const addFourNumbers = (a, b, c, d) => a + b + c + d;
|
||||
*
|
||||
* const curriedAddFourNumbers = R.curry(addFourNumbers);
|
||||
* const f = curriedAddFourNumbers(1, 2);
|
||||
* const g = f(3);
|
||||
* g(4); //=> 10
|
||||
*/
|
||||
|
||||
|
||||
var curry =
|
||||
/*#__PURE__*/
|
||||
_curry1(function curry(fn) {
|
||||
return curryN(fn.length, fn);
|
||||
});
|
||||
|
||||
module.exports = curry;
|
70
node_modules/ramda/src/curryN.js
generated
vendored
Normal file
70
node_modules/ramda/src/curryN.js
generated
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
var _arity =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_arity");
|
||||
|
||||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _curryN =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curryN");
|
||||
/**
|
||||
* Returns a curried equivalent of the provided function, with the specified
|
||||
* arity. The curried function has two unusual capabilities. First, its
|
||||
* arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the
|
||||
* following are equivalent:
|
||||
*
|
||||
* - `g(1)(2)(3)`
|
||||
* - `g(1)(2, 3)`
|
||||
* - `g(1, 2)(3)`
|
||||
* - `g(1, 2, 3)`
|
||||
*
|
||||
* Secondly, the special placeholder value [`R.__`](#__) may be used to specify
|
||||
* "gaps", allowing partial application of any combination of arguments,
|
||||
* regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),
|
||||
* the following are equivalent:
|
||||
*
|
||||
* - `g(1, 2, 3)`
|
||||
* - `g(_, 2, 3)(1)`
|
||||
* - `g(_, _, 3)(1)(2)`
|
||||
* - `g(_, _, 3)(1, 2)`
|
||||
* - `g(_, 2)(1)(3)`
|
||||
* - `g(_, 2)(1, 3)`
|
||||
* - `g(_, 2)(_, 3)(1)`
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.5.0
|
||||
* @category Function
|
||||
* @sig Number -> (* -> a) -> (* -> a)
|
||||
* @param {Number} length The arity for the returned function.
|
||||
* @param {Function} fn The function to curry.
|
||||
* @return {Function} A new, curried function.
|
||||
* @see R.curry
|
||||
* @example
|
||||
*
|
||||
* const sumArgs = (...args) => R.sum(args);
|
||||
*
|
||||
* const curriedAddFourNumbers = R.curryN(4, sumArgs);
|
||||
* const f = curriedAddFourNumbers(1, 2);
|
||||
* const g = f(3);
|
||||
* g(4); //=> 10
|
||||
*/
|
||||
|
||||
|
||||
var curryN =
|
||||
/*#__PURE__*/
|
||||
_curry2(function curryN(length, fn) {
|
||||
if (length === 1) {
|
||||
return _curry1(fn);
|
||||
}
|
||||
|
||||
return _arity(length, _curryN(length, [], fn));
|
||||
});
|
||||
|
||||
module.exports = curryN;
|
24
node_modules/ramda/src/dec.js
generated
vendored
Normal file
24
node_modules/ramda/src/dec.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
var add =
|
||||
/*#__PURE__*/
|
||||
require("./add");
|
||||
/**
|
||||
* Decrements its argument.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category Math
|
||||
* @sig Number -> Number
|
||||
* @param {Number} n
|
||||
* @return {Number} n - 1
|
||||
* @see R.inc
|
||||
* @example
|
||||
*
|
||||
* R.dec(42); //=> 41
|
||||
*/
|
||||
|
||||
|
||||
var dec =
|
||||
/*#__PURE__*/
|
||||
add(-1);
|
||||
module.exports = dec;
|
35
node_modules/ramda/src/defaultTo.js
generated
vendored
Normal file
35
node_modules/ramda/src/defaultTo.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Returns the second argument if it is not `null`, `undefined` or `NaN`;
|
||||
* otherwise the first argument is returned.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.10.0
|
||||
* @category Logic
|
||||
* @sig a -> b -> a | b
|
||||
* @param {a} default The default value.
|
||||
* @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`.
|
||||
* @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value
|
||||
* @example
|
||||
*
|
||||
* const defaultTo42 = R.defaultTo(42);
|
||||
*
|
||||
* defaultTo42(null); //=> 42
|
||||
* defaultTo42(undefined); //=> 42
|
||||
* defaultTo42(false); //=> false
|
||||
* defaultTo42('Ramda'); //=> 'Ramda'
|
||||
* // parseInt('string') results in NaN
|
||||
* defaultTo42(parseInt('string')); //=> 42
|
||||
*/
|
||||
|
||||
|
||||
var defaultTo =
|
||||
/*#__PURE__*/
|
||||
_curry2(function defaultTo(d, v) {
|
||||
return v == null || v !== v ? d : v;
|
||||
});
|
||||
|
||||
module.exports = defaultTo;
|
39
node_modules/ramda/src/descend.js
generated
vendored
Normal file
39
node_modules/ramda/src/descend.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
/**
|
||||
* Makes a descending comparator function out of a function that returns a value
|
||||
* that can be compared with `<` and `>`.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.23.0
|
||||
* @category Function
|
||||
* @sig Ord b => (a -> b) -> a -> a -> Number
|
||||
* @param {Function} fn A function of arity one that returns a value that can be compared
|
||||
* @param {*} a The first item to be compared.
|
||||
* @param {*} b The second item to be compared.
|
||||
* @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0`
|
||||
* @see R.ascend
|
||||
* @example
|
||||
*
|
||||
* const byAge = R.descend(R.prop('age'));
|
||||
* const people = [
|
||||
* { name: 'Emma', age: 70 },
|
||||
* { name: 'Peter', age: 78 },
|
||||
* { name: 'Mikhail', age: 62 },
|
||||
* ];
|
||||
* const peopleByOldestFirst = R.sort(byAge, people);
|
||||
* //=> [{ name: 'Peter', age: 78 }, { name: 'Emma', age: 70 }, { name: 'Mikhail', age: 62 }]
|
||||
*/
|
||||
|
||||
|
||||
var descend =
|
||||
/*#__PURE__*/
|
||||
_curry3(function descend(fn, a, b) {
|
||||
var aa = fn(a);
|
||||
var bb = fn(b);
|
||||
return aa > bb ? -1 : aa < bb ? 1 : 0;
|
||||
});
|
||||
|
||||
module.exports = descend;
|
54
node_modules/ramda/src/difference.js
generated
vendored
Normal file
54
node_modules/ramda/src/difference.js
generated
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _Set =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_Set");
|
||||
/**
|
||||
* Finds the set (i.e. no duplicates) of all elements in the first list not
|
||||
* contained in the second list. Objects and Arrays are compared in terms of
|
||||
* value equality, not reference equality.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Relation
|
||||
* @sig [*] -> [*] -> [*]
|
||||
* @param {Array} list1 The first list.
|
||||
* @param {Array} list2 The second list.
|
||||
* @return {Array} The elements in `list1` that are not in `list2`.
|
||||
* @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without
|
||||
* @example
|
||||
*
|
||||
* R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2]
|
||||
* R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5]
|
||||
* R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}]
|
||||
*/
|
||||
|
||||
|
||||
var difference =
|
||||
/*#__PURE__*/
|
||||
_curry2(function difference(first, second) {
|
||||
var out = [];
|
||||
var idx = 0;
|
||||
var firstLen = first.length;
|
||||
var secondLen = second.length;
|
||||
var toFilterOut = new _Set();
|
||||
|
||||
for (var i = 0; i < secondLen; i += 1) {
|
||||
toFilterOut.add(second[i]);
|
||||
}
|
||||
|
||||
while (idx < firstLen) {
|
||||
if (toFilterOut.add(first[idx])) {
|
||||
out[out.length] = first[idx];
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return out;
|
||||
});
|
||||
|
||||
module.exports = difference;
|
50
node_modules/ramda/src/differenceWith.js
generated
vendored
Normal file
50
node_modules/ramda/src/differenceWith.js
generated
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
var _includesWith =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_includesWith");
|
||||
|
||||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
/**
|
||||
* Finds the set (i.e. no duplicates) of all elements in the first list not
|
||||
* contained in the second list. Duplication is determined according to the
|
||||
* value returned by applying the supplied predicate to two list elements.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Relation
|
||||
* @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a]
|
||||
* @param {Function} pred A predicate used to test whether two items are equal.
|
||||
* @param {Array} list1 The first list.
|
||||
* @param {Array} list2 The second list.
|
||||
* @return {Array} The elements in `list1` that are not in `list2`.
|
||||
* @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith
|
||||
* @example
|
||||
*
|
||||
* const cmp = (x, y) => x.a === y.a;
|
||||
* const l1 = [{a: 1}, {a: 2}, {a: 3}];
|
||||
* const l2 = [{a: 3}, {a: 4}];
|
||||
* R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}]
|
||||
*/
|
||||
|
||||
|
||||
var differenceWith =
|
||||
/*#__PURE__*/
|
||||
_curry3(function differenceWith(pred, first, second) {
|
||||
var out = [];
|
||||
var idx = 0;
|
||||
var firstLen = first.length;
|
||||
|
||||
while (idx < firstLen) {
|
||||
if (!_includesWith(pred, first[idx], second) && !_includesWith(pred, first[idx], out)) {
|
||||
out.push(first[idx]);
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return out;
|
||||
});
|
||||
|
||||
module.exports = differenceWith;
|
35
node_modules/ramda/src/dissoc.js
generated
vendored
Normal file
35
node_modules/ramda/src/dissoc.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Returns a new object that does not contain a `prop` property.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.10.0
|
||||
* @category Object
|
||||
* @sig String -> {k: v} -> {k: v}
|
||||
* @param {String} prop The name of the property to dissociate
|
||||
* @param {Object} obj The object to clone
|
||||
* @return {Object} A new object equivalent to the original but without the specified property
|
||||
* @see R.assoc, R.omit
|
||||
* @example
|
||||
*
|
||||
* R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3}
|
||||
*/
|
||||
|
||||
|
||||
var dissoc =
|
||||
/*#__PURE__*/
|
||||
_curry2(function dissoc(prop, obj) {
|
||||
var result = {};
|
||||
|
||||
for (var p in obj) {
|
||||
result[p] = obj[p];
|
||||
}
|
||||
|
||||
delete result[prop];
|
||||
return result;
|
||||
});
|
||||
|
||||
module.exports = dissoc;
|
74
node_modules/ramda/src/dissocPath.js
generated
vendored
Normal file
74
node_modules/ramda/src/dissocPath.js
generated
vendored
Normal file
|
@ -0,0 +1,74 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _isInteger =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isInteger");
|
||||
|
||||
var _isArray =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isArray");
|
||||
|
||||
var assoc =
|
||||
/*#__PURE__*/
|
||||
require("./assoc");
|
||||
|
||||
var dissoc =
|
||||
/*#__PURE__*/
|
||||
require("./dissoc");
|
||||
|
||||
var remove =
|
||||
/*#__PURE__*/
|
||||
require("./remove");
|
||||
|
||||
var update =
|
||||
/*#__PURE__*/
|
||||
require("./update");
|
||||
/**
|
||||
* Makes a shallow clone of an object, omitting the property at the given path.
|
||||
* Note that this copies and flattens prototype properties onto the new object
|
||||
* as well. All non-primitive properties are copied by reference.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.11.0
|
||||
* @category Object
|
||||
* @typedefn Idx = String | Int
|
||||
* @sig [Idx] -> {k: v} -> {k: v}
|
||||
* @param {Array} path The path to the value to omit
|
||||
* @param {Object} obj The object to clone
|
||||
* @return {Object} A new object without the property at path
|
||||
* @see R.assocPath
|
||||
* @example
|
||||
*
|
||||
* R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}}
|
||||
*/
|
||||
|
||||
|
||||
var dissocPath =
|
||||
/*#__PURE__*/
|
||||
_curry2(function dissocPath(path, obj) {
|
||||
switch (path.length) {
|
||||
case 0:
|
||||
return obj;
|
||||
|
||||
case 1:
|
||||
return _isInteger(path[0]) && _isArray(obj) ? remove(path[0], 1, obj) : dissoc(path[0], obj);
|
||||
|
||||
default:
|
||||
var head = path[0];
|
||||
var tail = Array.prototype.slice.call(path, 1);
|
||||
|
||||
if (obj[head] == null) {
|
||||
return obj;
|
||||
} else if (_isInteger(head) && _isArray(obj)) {
|
||||
return update(head, dissocPath(tail, obj[head]), obj);
|
||||
} else {
|
||||
return assoc(head, dissocPath(tail, obj[head]), obj);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = dissocPath;
|
34
node_modules/ramda/src/divide.js
generated
vendored
Normal file
34
node_modules/ramda/src/divide.js
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Divides two numbers. Equivalent to `a / b`.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Math
|
||||
* @sig Number -> Number -> Number
|
||||
* @param {Number} a The first value.
|
||||
* @param {Number} b The second value.
|
||||
* @return {Number} The result of `a / b`.
|
||||
* @see R.multiply
|
||||
* @example
|
||||
*
|
||||
* R.divide(71, 100); //=> 0.71
|
||||
*
|
||||
* const half = R.divide(R.__, 2);
|
||||
* half(42); //=> 21
|
||||
*
|
||||
* const reciprocal = R.divide(1);
|
||||
* reciprocal(4); //=> 0.25
|
||||
*/
|
||||
|
||||
|
||||
var divide =
|
||||
/*#__PURE__*/
|
||||
_curry2(function divide(a, b) {
|
||||
return a / b;
|
||||
});
|
||||
|
||||
module.exports = divide;
|
50
node_modules/ramda/src/drop.js
generated
vendored
Normal file
50
node_modules/ramda/src/drop.js
generated
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xdrop =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xdrop");
|
||||
|
||||
var slice =
|
||||
/*#__PURE__*/
|
||||
require("./slice");
|
||||
/**
|
||||
* Returns all but the first `n` elements of the given list, string, or
|
||||
* transducer/transformer (or object with a `drop` method).
|
||||
*
|
||||
* Dispatches to the `drop` method of the second argument, if present.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig Number -> [a] -> [a]
|
||||
* @sig Number -> String -> String
|
||||
* @param {Number} n
|
||||
* @param {*} list
|
||||
* @return {*} A copy of list without the first `n` elements
|
||||
* @see R.take, R.transduce, R.dropLast, R.dropWhile
|
||||
* @example
|
||||
*
|
||||
* R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz']
|
||||
* R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz']
|
||||
* R.drop(3, ['foo', 'bar', 'baz']); //=> []
|
||||
* R.drop(4, ['foo', 'bar', 'baz']); //=> []
|
||||
* R.drop(3, 'ramda'); //=> 'da'
|
||||
*/
|
||||
|
||||
|
||||
var drop =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable(['drop'], _xdrop, function drop(n, xs) {
|
||||
return slice(Math.max(0, n), Infinity, xs);
|
||||
}));
|
||||
|
||||
module.exports = drop;
|
47
node_modules/ramda/src/dropLast.js
generated
vendored
Normal file
47
node_modules/ramda/src/dropLast.js
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _dropLast =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dropLast");
|
||||
|
||||
var _xdropLast =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xdropLast");
|
||||
/**
|
||||
* Returns a list containing all but the last `n` elements of the given `list`.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.16.0
|
||||
* @category List
|
||||
* @sig Number -> [a] -> [a]
|
||||
* @sig Number -> String -> String
|
||||
* @param {Number} n The number of elements of `list` to skip.
|
||||
* @param {Array} list The list of elements to consider.
|
||||
* @return {Array} A copy of the list with only the first `list.length - n` elements
|
||||
* @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile
|
||||
* @example
|
||||
*
|
||||
* R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar']
|
||||
* R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo']
|
||||
* R.dropLast(3, ['foo', 'bar', 'baz']); //=> []
|
||||
* R.dropLast(4, ['foo', 'bar', 'baz']); //=> []
|
||||
* R.dropLast(3, 'ramda'); //=> 'ra'
|
||||
*/
|
||||
|
||||
|
||||
var dropLast =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable([], _xdropLast, _dropLast));
|
||||
|
||||
module.exports = dropLast;
|
51
node_modules/ramda/src/dropLastWhile.js
generated
vendored
Normal file
51
node_modules/ramda/src/dropLastWhile.js
generated
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _dropLastWhile =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dropLastWhile");
|
||||
|
||||
var _xdropLastWhile =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xdropLastWhile");
|
||||
/**
|
||||
* Returns a new list excluding all the tailing elements of a given list which
|
||||
* satisfy the supplied predicate function. It passes each value from the right
|
||||
* to the supplied predicate function, skipping elements until the predicate
|
||||
* function returns a `falsy` value. The predicate function is applied to one argument:
|
||||
* *(value)*.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.16.0
|
||||
* @category List
|
||||
* @sig (a -> Boolean) -> [a] -> [a]
|
||||
* @sig (a -> Boolean) -> String -> String
|
||||
* @param {Function} predicate The function to be called on each element
|
||||
* @param {Array} xs The collection to iterate over.
|
||||
* @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`.
|
||||
* @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile
|
||||
* @example
|
||||
*
|
||||
* const lteThree = x => x <= 3;
|
||||
*
|
||||
* R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4]
|
||||
*
|
||||
* R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd'
|
||||
*/
|
||||
|
||||
|
||||
var dropLastWhile =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable([], _xdropLastWhile, _dropLastWhile));
|
||||
|
||||
module.exports = dropLastWhile;
|
50
node_modules/ramda/src/dropRepeats.js
generated
vendored
Normal file
50
node_modules/ramda/src/dropRepeats.js
generated
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xdropRepeatsWith =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xdropRepeatsWith");
|
||||
|
||||
var dropRepeatsWith =
|
||||
/*#__PURE__*/
|
||||
require("./dropRepeatsWith");
|
||||
|
||||
var equals =
|
||||
/*#__PURE__*/
|
||||
require("./equals");
|
||||
/**
|
||||
* Returns a new list without any consecutively repeating elements.
|
||||
* [`R.equals`](#equals) is used to determine equality.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.14.0
|
||||
* @category List
|
||||
* @sig [a] -> [a]
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Array} `list` without repeating elements.
|
||||
* @see R.transduce
|
||||
* @example
|
||||
*
|
||||
* R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2]
|
||||
*/
|
||||
|
||||
|
||||
var dropRepeats =
|
||||
/*#__PURE__*/
|
||||
_curry1(
|
||||
/*#__PURE__*/
|
||||
_dispatchable([],
|
||||
/*#__PURE__*/
|
||||
_xdropRepeatsWith(equals),
|
||||
/*#__PURE__*/
|
||||
dropRepeatsWith(equals)));
|
||||
|
||||
module.exports = dropRepeats;
|
63
node_modules/ramda/src/dropRepeatsWith.js
generated
vendored
Normal file
63
node_modules/ramda/src/dropRepeatsWith.js
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xdropRepeatsWith =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xdropRepeatsWith");
|
||||
|
||||
var last =
|
||||
/*#__PURE__*/
|
||||
require("./last");
|
||||
/**
|
||||
* Returns a new list without any consecutively repeating elements. Equality is
|
||||
* determined by applying the supplied predicate to each pair of consecutive elements. The
|
||||
* first element in a series of equal elements will be preserved.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.14.0
|
||||
* @category List
|
||||
* @sig ((a, a) -> Boolean) -> [a] -> [a]
|
||||
* @param {Function} pred A predicate used to test whether two items are equal.
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Array} `list` without repeating elements.
|
||||
* @see R.transduce
|
||||
* @example
|
||||
*
|
||||
* const l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3];
|
||||
* R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3]
|
||||
*/
|
||||
|
||||
|
||||
var dropRepeatsWith =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable([], _xdropRepeatsWith, function dropRepeatsWith(pred, list) {
|
||||
var result = [];
|
||||
var idx = 1;
|
||||
var len = list.length;
|
||||
|
||||
if (len !== 0) {
|
||||
result[0] = list[0];
|
||||
|
||||
while (idx < len) {
|
||||
if (!pred(last(result), list[idx])) {
|
||||
result[result.length] = list[idx];
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}));
|
||||
|
||||
module.exports = dropRepeatsWith;
|
61
node_modules/ramda/src/dropWhile.js
generated
vendored
Normal file
61
node_modules/ramda/src/dropWhile.js
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xdropWhile =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xdropWhile");
|
||||
|
||||
var slice =
|
||||
/*#__PURE__*/
|
||||
require("./slice");
|
||||
/**
|
||||
* Returns a new list excluding the leading elements of a given list which
|
||||
* satisfy the supplied predicate function. It passes each value to the supplied
|
||||
* predicate function, skipping elements while the predicate function returns
|
||||
* `true`. The predicate function is applied to one argument: *(value)*.
|
||||
*
|
||||
* Dispatches to the `dropWhile` method of the second argument, if present.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category List
|
||||
* @sig (a -> Boolean) -> [a] -> [a]
|
||||
* @sig (a -> Boolean) -> String -> String
|
||||
* @param {Function} fn The function called per iteration.
|
||||
* @param {Array} xs The collection to iterate over.
|
||||
* @return {Array} A new array.
|
||||
* @see R.takeWhile, R.transduce, R.addIndex
|
||||
* @example
|
||||
*
|
||||
* const lteTwo = x => x <= 2;
|
||||
*
|
||||
* R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1]
|
||||
*
|
||||
* R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da'
|
||||
*/
|
||||
|
||||
|
||||
var dropWhile =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable(['dropWhile'], _xdropWhile, function dropWhile(pred, xs) {
|
||||
var idx = 0;
|
||||
var len = xs.length;
|
||||
|
||||
while (idx < len && pred(xs[idx])) {
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return slice(idx, Infinity, xs);
|
||||
}));
|
||||
|
||||
module.exports = dropWhile;
|
56
node_modules/ramda/src/either.js
generated
vendored
Normal file
56
node_modules/ramda/src/either.js
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _isFunction =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isFunction");
|
||||
|
||||
var lift =
|
||||
/*#__PURE__*/
|
||||
require("./lift");
|
||||
|
||||
var or =
|
||||
/*#__PURE__*/
|
||||
require("./or");
|
||||
/**
|
||||
* A function wrapping calls to the two functions in an `||` operation,
|
||||
* returning the result of the first function if it is truth-y and the result
|
||||
* of the second function otherwise. Note that this is short-circuited,
|
||||
* meaning that the second function will not be invoked if the first returns a
|
||||
* truth-y value.
|
||||
*
|
||||
* In addition to functions, `R.either` also accepts any fantasy-land compatible
|
||||
* applicative functor.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.12.0
|
||||
* @category Logic
|
||||
* @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)
|
||||
* @param {Function} f a predicate
|
||||
* @param {Function} g another predicate
|
||||
* @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together.
|
||||
* @see R.or
|
||||
* @example
|
||||
*
|
||||
* const gt10 = x => x > 10;
|
||||
* const even = x => x % 2 === 0;
|
||||
* const f = R.either(gt10, even);
|
||||
* f(101); //=> true
|
||||
* f(8); //=> true
|
||||
*
|
||||
* R.either(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(55)
|
||||
* R.either([false, false, 'a'], [11]) // => [11, 11, "a"]
|
||||
*/
|
||||
|
||||
|
||||
var either =
|
||||
/*#__PURE__*/
|
||||
_curry2(function either(f, g) {
|
||||
return _isFunction(f) ? function _either() {
|
||||
return f.apply(this, arguments) || g.apply(this, arguments);
|
||||
} : lift(or)(f, g);
|
||||
});
|
||||
|
||||
module.exports = either;
|
54
node_modules/ramda/src/empty.js
generated
vendored
Normal file
54
node_modules/ramda/src/empty.js
generated
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var _isArguments =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isArguments");
|
||||
|
||||
var _isArray =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isArray");
|
||||
|
||||
var _isObject =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isObject");
|
||||
|
||||
var _isString =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isString");
|
||||
/**
|
||||
* Returns the empty value of its argument's type. Ramda defines the empty
|
||||
* value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other
|
||||
* types are supported if they define `<Type>.empty`,
|
||||
* `<Type>.prototype.empty` or implement the
|
||||
* [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid).
|
||||
*
|
||||
* Dispatches to the `empty` method of the first argument, if present.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.3.0
|
||||
* @category Function
|
||||
* @sig a -> a
|
||||
* @param {*} x
|
||||
* @return {*}
|
||||
* @example
|
||||
*
|
||||
* R.empty(Just(42)); //=> Nothing()
|
||||
* R.empty([1, 2, 3]); //=> []
|
||||
* R.empty('unicorns'); //=> ''
|
||||
* R.empty({x: 1, y: 2}); //=> {}
|
||||
*/
|
||||
|
||||
|
||||
var empty =
|
||||
/*#__PURE__*/
|
||||
_curry1(function empty(x) {
|
||||
return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () {
|
||||
return arguments;
|
||||
}() : void 0 // else
|
||||
;
|
||||
});
|
||||
|
||||
module.exports = empty;
|
42
node_modules/ramda/src/endsWith.js
generated
vendored
Normal file
42
node_modules/ramda/src/endsWith.js
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var equals =
|
||||
/*#__PURE__*/
|
||||
require("./equals");
|
||||
|
||||
var takeLast =
|
||||
/*#__PURE__*/
|
||||
require("./takeLast");
|
||||
/**
|
||||
* Checks if a list ends with the provided sublist.
|
||||
*
|
||||
* Similarly, checks if a string ends with the provided substring.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.24.0
|
||||
* @category List
|
||||
* @sig [a] -> [a] -> Boolean
|
||||
* @sig String -> String -> Boolean
|
||||
* @param {*} suffix
|
||||
* @param {*} list
|
||||
* @return {Boolean}
|
||||
* @see R.startsWith
|
||||
* @example
|
||||
*
|
||||
* R.endsWith('c', 'abc') //=> true
|
||||
* R.endsWith('b', 'abc') //=> false
|
||||
* R.endsWith(['c'], ['a', 'b', 'c']) //=> true
|
||||
* R.endsWith(['b'], ['a', 'b', 'c']) //=> false
|
||||
*/
|
||||
|
||||
|
||||
var endsWith =
|
||||
/*#__PURE__*/
|
||||
_curry2(function (suffix, list) {
|
||||
return equals(takeLast(suffix.length, list), suffix);
|
||||
});
|
||||
|
||||
module.exports = endsWith;
|
33
node_modules/ramda/src/eqBy.js
generated
vendored
Normal file
33
node_modules/ramda/src/eqBy.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
|
||||
var equals =
|
||||
/*#__PURE__*/
|
||||
require("./equals");
|
||||
/**
|
||||
* Takes a function and two values in its domain and returns `true` if the
|
||||
* values map to the same value in the codomain; `false` otherwise.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.18.0
|
||||
* @category Relation
|
||||
* @sig (a -> b) -> a -> a -> Boolean
|
||||
* @param {Function} f
|
||||
* @param {*} x
|
||||
* @param {*} y
|
||||
* @return {Boolean}
|
||||
* @example
|
||||
*
|
||||
* R.eqBy(Math.abs, 5, -5); //=> true
|
||||
*/
|
||||
|
||||
|
||||
var eqBy =
|
||||
/*#__PURE__*/
|
||||
_curry3(function eqBy(f, x, y) {
|
||||
return equals(f(x), f(y));
|
||||
});
|
||||
|
||||
module.exports = eqBy;
|
37
node_modules/ramda/src/eqProps.js
generated
vendored
Normal file
37
node_modules/ramda/src/eqProps.js
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
|
||||
var equals =
|
||||
/*#__PURE__*/
|
||||
require("./equals");
|
||||
/**
|
||||
* Reports whether two objects have the same value, in [`R.equals`](#equals)
|
||||
* terms, for the specified property. Useful as a curried predicate.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Object
|
||||
* @sig k -> {k: v} -> {k: v} -> Boolean
|
||||
* @param {String} prop The name of the property to compare
|
||||
* @param {Object} obj1
|
||||
* @param {Object} obj2
|
||||
* @return {Boolean}
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* const o1 = { a: 1, b: 2, c: 3, d: 4 };
|
||||
* const o2 = { a: 10, b: 20, c: 3, d: 40 };
|
||||
* R.eqProps('a', o1, o2); //=> false
|
||||
* R.eqProps('c', o1, o2); //=> true
|
||||
*/
|
||||
|
||||
|
||||
var eqProps =
|
||||
/*#__PURE__*/
|
||||
_curry3(function eqProps(prop, obj1, obj2) {
|
||||
return equals(obj1[prop], obj2[prop]);
|
||||
});
|
||||
|
||||
module.exports = eqProps;
|
41
node_modules/ramda/src/equals.js
generated
vendored
Normal file
41
node_modules/ramda/src/equals.js
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _equals =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_equals");
|
||||
/**
|
||||
* Returns `true` if its arguments are equivalent, `false` otherwise. Handles
|
||||
* cyclical data structures.
|
||||
*
|
||||
* Dispatches symmetrically to the `equals` methods of both arguments, if
|
||||
* present.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.15.0
|
||||
* @category Relation
|
||||
* @sig a -> b -> Boolean
|
||||
* @param {*} a
|
||||
* @param {*} b
|
||||
* @return {Boolean}
|
||||
* @example
|
||||
*
|
||||
* R.equals(1, 1); //=> true
|
||||
* R.equals(1, '1'); //=> false
|
||||
* R.equals([1, 2, 3], [1, 2, 3]); //=> true
|
||||
*
|
||||
* const a = {}; a.v = a;
|
||||
* const b = {}; b.v = b;
|
||||
* R.equals(a, b); //=> true
|
||||
*/
|
||||
|
||||
|
||||
var equals =
|
||||
/*#__PURE__*/
|
||||
_curry2(function equals(a, b) {
|
||||
return _equals(a, b, [], []);
|
||||
});
|
||||
|
||||
module.exports = equals;
|
48
node_modules/ramda/src/evolve.js
generated
vendored
Normal file
48
node_modules/ramda/src/evolve.js
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Creates a new object by recursively evolving a shallow copy of `object`,
|
||||
* according to the `transformation` functions. All non-primitive properties
|
||||
* are copied by reference.
|
||||
*
|
||||
* A `transformation` function will not be invoked if its corresponding key
|
||||
* does not exist in the evolved object.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category Object
|
||||
* @sig {k: (v -> v)} -> {k: v} -> {k: v}
|
||||
* @param {Object} transformations The object specifying transformation functions to apply
|
||||
* to the object.
|
||||
* @param {Object} object The object to be transformed.
|
||||
* @return {Object} The transformed object.
|
||||
* @example
|
||||
*
|
||||
* const tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123};
|
||||
* const transformations = {
|
||||
* firstName: R.trim,
|
||||
* lastName: R.trim, // Will not get invoked.
|
||||
* data: {elapsed: R.add(1), remaining: R.add(-1)}
|
||||
* };
|
||||
* R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123}
|
||||
*/
|
||||
|
||||
|
||||
var evolve =
|
||||
/*#__PURE__*/
|
||||
_curry2(function evolve(transformations, object) {
|
||||
var result = object instanceof Array ? [] : {};
|
||||
var transformation, key, type;
|
||||
|
||||
for (key in object) {
|
||||
transformation = transformations[key];
|
||||
type = typeof transformation;
|
||||
result[key] = type === 'function' ? transformation(object[key]) : transformation && type === 'object' ? evolve(transformation, object[key]) : object[key];
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
|
||||
module.exports = evolve;
|
72
node_modules/ramda/src/filter.js
generated
vendored
Normal file
72
node_modules/ramda/src/filter.js
generated
vendored
Normal file
|
@ -0,0 +1,72 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _filter =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_filter");
|
||||
|
||||
var _isObject =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isObject");
|
||||
|
||||
var _reduce =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_reduce");
|
||||
|
||||
var _xfilter =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xfilter");
|
||||
|
||||
var keys =
|
||||
/*#__PURE__*/
|
||||
require("./keys");
|
||||
/**
|
||||
* Takes a predicate and a `Filterable`, and returns a new filterable of the
|
||||
* same type containing the members of the given filterable which satisfy the
|
||||
* given predicate. Filterable objects include plain objects or any object
|
||||
* that has a filter method such as `Array`.
|
||||
*
|
||||
* Dispatches to the `filter` method of the second argument, if present.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig Filterable f => (a -> Boolean) -> f a -> f a
|
||||
* @param {Function} pred
|
||||
* @param {Array} filterable
|
||||
* @return {Array} Filterable
|
||||
* @see R.reject, R.transduce, R.addIndex
|
||||
* @example
|
||||
*
|
||||
* const isEven = n => n % 2 === 0;
|
||||
*
|
||||
* R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]
|
||||
*
|
||||
* R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}
|
||||
*/
|
||||
|
||||
|
||||
var filter =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable(['filter'], _xfilter, function (pred, filterable) {
|
||||
return _isObject(filterable) ? _reduce(function (acc, key) {
|
||||
if (pred(filterable[key])) {
|
||||
acc[key] = filterable[key];
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {}, keys(filterable)) : // else
|
||||
_filter(pred, filterable);
|
||||
}));
|
||||
|
||||
module.exports = filter;
|
55
node_modules/ramda/src/find.js
generated
vendored
Normal file
55
node_modules/ramda/src/find.js
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xfind =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xfind");
|
||||
/**
|
||||
* Returns the first element of the list which matches the predicate, or
|
||||
* `undefined` if no element matches.
|
||||
*
|
||||
* Dispatches to the `find` method of the second argument, if present.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig (a -> Boolean) -> [a] -> a | undefined
|
||||
* @param {Function} fn The predicate function used to determine if the element is the
|
||||
* desired one.
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Object} The element found, or `undefined`.
|
||||
* @see R.transduce
|
||||
* @example
|
||||
*
|
||||
* const xs = [{a: 1}, {a: 2}, {a: 3}];
|
||||
* R.find(R.propEq('a', 2))(xs); //=> {a: 2}
|
||||
* R.find(R.propEq('a', 4))(xs); //=> undefined
|
||||
*/
|
||||
|
||||
|
||||
var find =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable(['find'], _xfind, function find(fn, list) {
|
||||
var idx = 0;
|
||||
var len = list.length;
|
||||
|
||||
while (idx < len) {
|
||||
if (fn(list[idx])) {
|
||||
return list[idx];
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
}));
|
||||
|
||||
module.exports = find;
|
55
node_modules/ramda/src/findIndex.js
generated
vendored
Normal file
55
node_modules/ramda/src/findIndex.js
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xfindIndex =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xfindIndex");
|
||||
/**
|
||||
* Returns the index of the first element of the list which matches the
|
||||
* predicate, or `-1` if no element matches.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.1
|
||||
* @category List
|
||||
* @sig (a -> Boolean) -> [a] -> Number
|
||||
* @param {Function} fn The predicate function used to determine if the element is the
|
||||
* desired one.
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Number} The index of the element found, or `-1`.
|
||||
* @see R.transduce
|
||||
* @example
|
||||
*
|
||||
* const xs = [{a: 1}, {a: 2}, {a: 3}];
|
||||
* R.findIndex(R.propEq('a', 2))(xs); //=> 1
|
||||
* R.findIndex(R.propEq('a', 4))(xs); //=> -1
|
||||
*/
|
||||
|
||||
|
||||
var findIndex =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable([], _xfindIndex, function findIndex(fn, list) {
|
||||
var idx = 0;
|
||||
var len = list.length;
|
||||
|
||||
while (idx < len) {
|
||||
if (fn(list[idx])) {
|
||||
return idx;
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}));
|
||||
|
||||
module.exports = findIndex;
|
52
node_modules/ramda/src/findLast.js
generated
vendored
Normal file
52
node_modules/ramda/src/findLast.js
generated
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xfindLast =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xfindLast");
|
||||
/**
|
||||
* Returns the last element of the list which matches the predicate, or
|
||||
* `undefined` if no element matches.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.1
|
||||
* @category List
|
||||
* @sig (a -> Boolean) -> [a] -> a | undefined
|
||||
* @param {Function} fn The predicate function used to determine if the element is the
|
||||
* desired one.
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Object} The element found, or `undefined`.
|
||||
* @see R.transduce
|
||||
* @example
|
||||
*
|
||||
* const xs = [{a: 1, b: 0}, {a:1, b: 1}];
|
||||
* R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1}
|
||||
* R.findLast(R.propEq('a', 4))(xs); //=> undefined
|
||||
*/
|
||||
|
||||
|
||||
var findLast =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable([], _xfindLast, function findLast(fn, list) {
|
||||
var idx = list.length - 1;
|
||||
|
||||
while (idx >= 0) {
|
||||
if (fn(list[idx])) {
|
||||
return list[idx];
|
||||
}
|
||||
|
||||
idx -= 1;
|
||||
}
|
||||
}));
|
||||
|
||||
module.exports = findLast;
|
54
node_modules/ramda/src/findLastIndex.js
generated
vendored
Normal file
54
node_modules/ramda/src/findLastIndex.js
generated
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _dispatchable =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_dispatchable");
|
||||
|
||||
var _xfindLastIndex =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_xfindLastIndex");
|
||||
/**
|
||||
* Returns the index of the last element of the list which matches the
|
||||
* predicate, or `-1` if no element matches.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.1
|
||||
* @category List
|
||||
* @sig (a -> Boolean) -> [a] -> Number
|
||||
* @param {Function} fn The predicate function used to determine if the element is the
|
||||
* desired one.
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Number} The index of the element found, or `-1`.
|
||||
* @see R.transduce
|
||||
* @example
|
||||
*
|
||||
* const xs = [{a: 1, b: 0}, {a:1, b: 1}];
|
||||
* R.findLastIndex(R.propEq('a', 1))(xs); //=> 1
|
||||
* R.findLastIndex(R.propEq('a', 4))(xs); //=> -1
|
||||
*/
|
||||
|
||||
|
||||
var findLastIndex =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_dispatchable([], _xfindLastIndex, function findLastIndex(fn, list) {
|
||||
var idx = list.length - 1;
|
||||
|
||||
while (idx >= 0) {
|
||||
if (fn(list[idx])) {
|
||||
return idx;
|
||||
}
|
||||
|
||||
idx -= 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}));
|
||||
|
||||
module.exports = findLastIndex;
|
33
node_modules/ramda/src/flatten.js
generated
vendored
Normal file
33
node_modules/ramda/src/flatten.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var _makeFlat =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_makeFlat");
|
||||
/**
|
||||
* Returns a new list by pulling every item out of it (and all its sub-arrays)
|
||||
* and putting them in a new array, depth-first.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig [a] -> [b]
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Array} The flattened list.
|
||||
* @see R.unnest
|
||||
* @example
|
||||
*
|
||||
* R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]);
|
||||
* //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
||||
*/
|
||||
|
||||
|
||||
var flatten =
|
||||
/*#__PURE__*/
|
||||
_curry1(
|
||||
/*#__PURE__*/
|
||||
_makeFlat(true));
|
||||
|
||||
module.exports = flatten;
|
41
node_modules/ramda/src/flip.js
generated
vendored
Normal file
41
node_modules/ramda/src/flip.js
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var curryN =
|
||||
/*#__PURE__*/
|
||||
require("./curryN");
|
||||
/**
|
||||
* Returns a new function much like the supplied one, except that the first two
|
||||
* arguments' order is reversed.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Function
|
||||
* @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z)
|
||||
* @param {Function} fn The function to invoke with its first two parameters reversed.
|
||||
* @return {*} The result of invoking `fn` with its first two parameters' order reversed.
|
||||
* @example
|
||||
*
|
||||
* const mergeThree = (a, b, c) => [].concat(a, b, c);
|
||||
*
|
||||
* mergeThree(1, 2, 3); //=> [1, 2, 3]
|
||||
*
|
||||
* R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3]
|
||||
* @symb R.flip(f)(a, b, c) = f(b, a, c)
|
||||
*/
|
||||
|
||||
|
||||
var flip =
|
||||
/*#__PURE__*/
|
||||
_curry1(function flip(fn) {
|
||||
return curryN(fn.length, function (a, b) {
|
||||
var args = Array.prototype.slice.call(arguments, 0);
|
||||
args[0] = b;
|
||||
args[1] = a;
|
||||
return fn.apply(this, args);
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = flip;
|
60
node_modules/ramda/src/forEach.js
generated
vendored
Normal file
60
node_modules/ramda/src/forEach.js
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
var _checkForMethod =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_checkForMethod");
|
||||
|
||||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Iterate over an input `list`, calling a provided function `fn` for each
|
||||
* element in the list.
|
||||
*
|
||||
* `fn` receives one argument: *(value)*.
|
||||
*
|
||||
* Note: `R.forEach` does not skip deleted or unassigned indices (sparse
|
||||
* arrays), unlike the native `Array.prototype.forEach` method. For more
|
||||
* details on this behavior, see:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description
|
||||
*
|
||||
* Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns
|
||||
* the original array. In some libraries this function is named `each`.
|
||||
*
|
||||
* Dispatches to the `forEach` method of the second argument, if present.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.1
|
||||
* @category List
|
||||
* @sig (a -> *) -> [a] -> [a]
|
||||
* @param {Function} fn The function to invoke. Receives one argument, `value`.
|
||||
* @param {Array} list The list to iterate over.
|
||||
* @return {Array} The original list.
|
||||
* @see R.addIndex
|
||||
* @example
|
||||
*
|
||||
* const printXPlusFive = x => console.log(x + 5);
|
||||
* R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3]
|
||||
* // logs 6
|
||||
* // logs 7
|
||||
* // logs 8
|
||||
* @symb R.forEach(f, [a, b, c]) = [a, b, c]
|
||||
*/
|
||||
|
||||
|
||||
var forEach =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_checkForMethod('forEach', function forEach(fn, list) {
|
||||
var len = list.length;
|
||||
var idx = 0;
|
||||
|
||||
while (idx < len) {
|
||||
fn(list[idx]);
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return list;
|
||||
}));
|
||||
|
||||
module.exports = forEach;
|
47
node_modules/ramda/src/forEachObjIndexed.js
generated
vendored
Normal file
47
node_modules/ramda/src/forEachObjIndexed.js
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var keys =
|
||||
/*#__PURE__*/
|
||||
require("./keys");
|
||||
/**
|
||||
* Iterate over an input `object`, calling a provided function `fn` for each
|
||||
* key and value in the object.
|
||||
*
|
||||
* `fn` receives three argument: *(value, key, obj)*.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.23.0
|
||||
* @category Object
|
||||
* @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a
|
||||
* @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`.
|
||||
* @param {Object} obj The object to iterate over.
|
||||
* @return {Object} The original object.
|
||||
* @example
|
||||
*
|
||||
* const printKeyConcatValue = (value, key) => console.log(key + ':' + value);
|
||||
* R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2}
|
||||
* // logs x:1
|
||||
* // logs y:2
|
||||
* @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b}
|
||||
*/
|
||||
|
||||
|
||||
var forEachObjIndexed =
|
||||
/*#__PURE__*/
|
||||
_curry2(function forEachObjIndexed(fn, obj) {
|
||||
var keyList = keys(obj);
|
||||
var idx = 0;
|
||||
|
||||
while (idx < keyList.length) {
|
||||
var key = keyList[idx];
|
||||
fn(obj[key], key, obj);
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return obj;
|
||||
});
|
||||
|
||||
module.exports = forEachObjIndexed;
|
36
node_modules/ramda/src/fromPairs.js
generated
vendored
Normal file
36
node_modules/ramda/src/fromPairs.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
/**
|
||||
* Creates a new object from a list key-value pairs. If a key appears in
|
||||
* multiple pairs, the rightmost pair is included in the object.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.3.0
|
||||
* @category List
|
||||
* @sig [[k,v]] -> {k: v}
|
||||
* @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object.
|
||||
* @return {Object} The object made by pairing up `keys` and `values`.
|
||||
* @see R.toPairs, R.pair
|
||||
* @example
|
||||
*
|
||||
* R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3}
|
||||
*/
|
||||
|
||||
|
||||
var fromPairs =
|
||||
/*#__PURE__*/
|
||||
_curry1(function fromPairs(pairs) {
|
||||
var result = {};
|
||||
var idx = 0;
|
||||
|
||||
while (idx < pairs.length) {
|
||||
result[pairs[idx][0]] = pairs[idx][1];
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
|
||||
module.exports = fromPairs;
|
69
node_modules/ramda/src/groupBy.js
generated
vendored
Normal file
69
node_modules/ramda/src/groupBy.js
generated
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
var _checkForMethod =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_checkForMethod");
|
||||
|
||||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var reduceBy =
|
||||
/*#__PURE__*/
|
||||
require("./reduceBy");
|
||||
/**
|
||||
* Splits a list into sub-lists stored in an object, based on the result of
|
||||
* calling a String-returning function on each element, and grouping the
|
||||
* results according to values returned.
|
||||
*
|
||||
* Dispatches to the `groupBy` method of the second argument, if present.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig (a -> String) -> [a] -> {String: [a]}
|
||||
* @param {Function} fn Function :: a -> String
|
||||
* @param {Array} list The array to group
|
||||
* @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements
|
||||
* that produced that key when passed to `fn`.
|
||||
* @see R.reduceBy, R.transduce
|
||||
* @example
|
||||
*
|
||||
* const byGrade = R.groupBy(function(student) {
|
||||
* const score = student.score;
|
||||
* return score < 65 ? 'F' :
|
||||
* score < 70 ? 'D' :
|
||||
* score < 80 ? 'C' :
|
||||
* score < 90 ? 'B' : 'A';
|
||||
* });
|
||||
* const students = [{name: 'Abby', score: 84},
|
||||
* {name: 'Eddy', score: 58},
|
||||
* // ...
|
||||
* {name: 'Jack', score: 69}];
|
||||
* byGrade(students);
|
||||
* // {
|
||||
* // 'A': [{name: 'Dianne', score: 99}],
|
||||
* // 'B': [{name: 'Abby', score: 84}]
|
||||
* // // ...,
|
||||
* // 'F': [{name: 'Eddy', score: 58}]
|
||||
* // }
|
||||
*/
|
||||
|
||||
|
||||
var groupBy =
|
||||
/*#__PURE__*/
|
||||
_curry2(
|
||||
/*#__PURE__*/
|
||||
_checkForMethod('groupBy',
|
||||
/*#__PURE__*/
|
||||
reduceBy(function (acc, item) {
|
||||
if (acc == null) {
|
||||
acc = [];
|
||||
}
|
||||
|
||||
acc.push(item);
|
||||
return acc;
|
||||
}, null)));
|
||||
|
||||
module.exports = groupBy;
|
57
node_modules/ramda/src/groupWith.js
generated
vendored
Normal file
57
node_modules/ramda/src/groupWith.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Takes a list and returns a list of lists where each sublist's elements are
|
||||
* all satisfied pairwise comparison according to the provided function.
|
||||
* Only adjacent elements are passed to the comparison function.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.21.0
|
||||
* @category List
|
||||
* @sig ((a, a) → Boolean) → [a] → [[a]]
|
||||
* @param {Function} fn Function for determining whether two given (adjacent)
|
||||
* elements should be in the same group
|
||||
* @param {Array} list The array to group. Also accepts a string, which will be
|
||||
* treated as a list of characters.
|
||||
* @return {List} A list that contains sublists of elements,
|
||||
* whose concatenations are equal to the original list.
|
||||
* @example
|
||||
*
|
||||
* R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21])
|
||||
* //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]]
|
||||
*
|
||||
* R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21])
|
||||
* //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]]
|
||||
*
|
||||
* R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21])
|
||||
* //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]]
|
||||
*
|
||||
* R.groupWith(R.eqBy(isVowel), 'aestiou')
|
||||
* //=> ['ae', 'st', 'iou']
|
||||
*/
|
||||
|
||||
|
||||
var groupWith =
|
||||
/*#__PURE__*/
|
||||
_curry2(function (fn, list) {
|
||||
var res = [];
|
||||
var idx = 0;
|
||||
var len = list.length;
|
||||
|
||||
while (idx < len) {
|
||||
var nextidx = idx + 1;
|
||||
|
||||
while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) {
|
||||
nextidx += 1;
|
||||
}
|
||||
|
||||
res.push(list.slice(idx, nextidx));
|
||||
idx = nextidx;
|
||||
}
|
||||
|
||||
return res;
|
||||
});
|
||||
|
||||
module.exports = groupWith;
|
33
node_modules/ramda/src/gt.js
generated
vendored
Normal file
33
node_modules/ramda/src/gt.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Returns `true` if the first argument is greater than the second; `false`
|
||||
* otherwise.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Relation
|
||||
* @sig Ord a => a -> a -> Boolean
|
||||
* @param {*} a
|
||||
* @param {*} b
|
||||
* @return {Boolean}
|
||||
* @see R.lt
|
||||
* @example
|
||||
*
|
||||
* R.gt(2, 1); //=> true
|
||||
* R.gt(2, 2); //=> false
|
||||
* R.gt(2, 3); //=> false
|
||||
* R.gt('a', 'z'); //=> false
|
||||
* R.gt('z', 'a'); //=> true
|
||||
*/
|
||||
|
||||
|
||||
var gt =
|
||||
/*#__PURE__*/
|
||||
_curry2(function gt(a, b) {
|
||||
return a > b;
|
||||
});
|
||||
|
||||
module.exports = gt;
|
33
node_modules/ramda/src/gte.js
generated
vendored
Normal file
33
node_modules/ramda/src/gte.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Returns `true` if the first argument is greater than or equal to the second;
|
||||
* `false` otherwise.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Relation
|
||||
* @sig Ord a => a -> a -> Boolean
|
||||
* @param {Number} a
|
||||
* @param {Number} b
|
||||
* @return {Boolean}
|
||||
* @see R.lte
|
||||
* @example
|
||||
*
|
||||
* R.gte(2, 1); //=> true
|
||||
* R.gte(2, 2); //=> true
|
||||
* R.gte(2, 3); //=> false
|
||||
* R.gte('a', 'z'); //=> false
|
||||
* R.gte('z', 'a'); //=> true
|
||||
*/
|
||||
|
||||
|
||||
var gte =
|
||||
/*#__PURE__*/
|
||||
_curry2(function gte(a, b) {
|
||||
return a >= b;
|
||||
});
|
||||
|
||||
module.exports = gte;
|
40
node_modules/ramda/src/has.js
generated
vendored
Normal file
40
node_modules/ramda/src/has.js
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var hasPath =
|
||||
/*#__PURE__*/
|
||||
require("./hasPath");
|
||||
/**
|
||||
* Returns whether or not an object has an own property with the specified name
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.7.0
|
||||
* @category Object
|
||||
* @sig s -> {s: x} -> Boolean
|
||||
* @param {String} prop The name of the property to check for.
|
||||
* @param {Object} obj The object to query.
|
||||
* @return {Boolean} Whether the property exists.
|
||||
* @example
|
||||
*
|
||||
* const hasName = R.has('name');
|
||||
* hasName({name: 'alice'}); //=> true
|
||||
* hasName({name: 'bob'}); //=> true
|
||||
* hasName({}); //=> false
|
||||
*
|
||||
* const point = {x: 0, y: 0};
|
||||
* const pointHas = R.has(R.__, point);
|
||||
* pointHas('x'); //=> true
|
||||
* pointHas('y'); //=> true
|
||||
* pointHas('z'); //=> false
|
||||
*/
|
||||
|
||||
|
||||
var has =
|
||||
/*#__PURE__*/
|
||||
_curry2(function has(prop, obj) {
|
||||
return hasPath([prop], obj);
|
||||
});
|
||||
|
||||
module.exports = has;
|
38
node_modules/ramda/src/hasIn.js
generated
vendored
Normal file
38
node_modules/ramda/src/hasIn.js
generated
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Returns whether or not an object or its prototype chain has a property with
|
||||
* the specified name
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.7.0
|
||||
* @category Object
|
||||
* @sig s -> {s: x} -> Boolean
|
||||
* @param {String} prop The name of the property to check for.
|
||||
* @param {Object} obj The object to query.
|
||||
* @return {Boolean} Whether the property exists.
|
||||
* @example
|
||||
*
|
||||
* function Rectangle(width, height) {
|
||||
* this.width = width;
|
||||
* this.height = height;
|
||||
* }
|
||||
* Rectangle.prototype.area = function() {
|
||||
* return this.width * this.height;
|
||||
* };
|
||||
*
|
||||
* const square = new Rectangle(2, 2);
|
||||
* R.hasIn('width', square); //=> true
|
||||
* R.hasIn('area', square); //=> true
|
||||
*/
|
||||
|
||||
|
||||
var hasIn =
|
||||
/*#__PURE__*/
|
||||
_curry2(function hasIn(prop, obj) {
|
||||
return prop in obj;
|
||||
});
|
||||
|
||||
module.exports = hasIn;
|
57
node_modules/ramda/src/hasPath.js
generated
vendored
Normal file
57
node_modules/ramda/src/hasPath.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _has =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_has");
|
||||
|
||||
var isNil =
|
||||
/*#__PURE__*/
|
||||
require("./isNil");
|
||||
/**
|
||||
* Returns whether or not a path exists in an object. Only the object's
|
||||
* own properties are checked.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.26.0
|
||||
* @category Object
|
||||
* @typedefn Idx = String | Int
|
||||
* @sig [Idx] -> {a} -> Boolean
|
||||
* @param {Array} path The path to use.
|
||||
* @param {Object} obj The object to check the path in.
|
||||
* @return {Boolean} Whether the path exists.
|
||||
* @see R.has
|
||||
* @example
|
||||
*
|
||||
* R.hasPath(['a', 'b'], {a: {b: 2}}); // => true
|
||||
* R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true
|
||||
* R.hasPath(['a', 'b'], {a: {c: 2}}); // => false
|
||||
* R.hasPath(['a', 'b'], {}); // => false
|
||||
*/
|
||||
|
||||
|
||||
var hasPath =
|
||||
/*#__PURE__*/
|
||||
_curry2(function hasPath(_path, obj) {
|
||||
if (_path.length === 0 || isNil(obj)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var val = obj;
|
||||
var idx = 0;
|
||||
|
||||
while (idx < _path.length) {
|
||||
if (!isNil(val) && _has(_path[idx], val)) {
|
||||
val = val[_path[idx]];
|
||||
idx += 1;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
module.exports = hasPath;
|
30
node_modules/ramda/src/head.js
generated
vendored
Normal file
30
node_modules/ramda/src/head.js
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
var nth =
|
||||
/*#__PURE__*/
|
||||
require("./nth");
|
||||
/**
|
||||
* Returns the first element of the given list or string. In some libraries
|
||||
* this function is named `first`.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig [a] -> a | Undefined
|
||||
* @sig String -> String
|
||||
* @param {Array|String} list
|
||||
* @return {*}
|
||||
* @see R.tail, R.init, R.last
|
||||
* @example
|
||||
*
|
||||
* R.head(['fi', 'fo', 'fum']); //=> 'fi'
|
||||
* R.head([]); //=> undefined
|
||||
*
|
||||
* R.head('abc'); //=> 'a'
|
||||
* R.head(''); //=> ''
|
||||
*/
|
||||
|
||||
|
||||
var head =
|
||||
/*#__PURE__*/
|
||||
nth(0);
|
||||
module.exports = head;
|
39
node_modules/ramda/src/identical.js
generated
vendored
Normal file
39
node_modules/ramda/src/identical.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
var _objectIs =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_objectIs");
|
||||
|
||||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Returns true if its arguments are identical, false otherwise. Values are
|
||||
* identical if they reference the same memory. `NaN` is identical to `NaN`;
|
||||
* `0` and `-0` are not identical.
|
||||
*
|
||||
* Note this is merely a curried version of ES6 `Object.is`.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.15.0
|
||||
* @category Relation
|
||||
* @sig a -> a -> Boolean
|
||||
* @param {*} a
|
||||
* @param {*} b
|
||||
* @return {Boolean}
|
||||
* @example
|
||||
*
|
||||
* const o = {};
|
||||
* R.identical(o, o); //=> true
|
||||
* R.identical(1, 1); //=> true
|
||||
* R.identical(1, '1'); //=> false
|
||||
* R.identical([], []); //=> false
|
||||
* R.identical(0, -0); //=> false
|
||||
* R.identical(NaN, NaN); //=> true
|
||||
*/
|
||||
|
||||
|
||||
var identical =
|
||||
/*#__PURE__*/
|
||||
_curry2(_objectIs);
|
||||
|
||||
module.exports = identical;
|
33
node_modules/ramda/src/identity.js
generated
vendored
Normal file
33
node_modules/ramda/src/identity.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
var _curry1 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry1");
|
||||
|
||||
var _identity =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_identity");
|
||||
/**
|
||||
* A function that does nothing but return the parameter supplied to it. Good
|
||||
* as a default or placeholder function.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Function
|
||||
* @sig a -> a
|
||||
* @param {*} x The value to return.
|
||||
* @return {*} The input value, `x`.
|
||||
* @example
|
||||
*
|
||||
* R.identity(1); //=> 1
|
||||
*
|
||||
* const obj = {};
|
||||
* R.identity(obj) === obj; //=> true
|
||||
* @symb R.identity(a) = a
|
||||
*/
|
||||
|
||||
|
||||
var identity =
|
||||
/*#__PURE__*/
|
||||
_curry1(_identity);
|
||||
|
||||
module.exports = identity;
|
43
node_modules/ramda/src/ifElse.js
generated
vendored
Normal file
43
node_modules/ramda/src/ifElse.js
generated
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
|
||||
var curryN =
|
||||
/*#__PURE__*/
|
||||
require("./curryN");
|
||||
/**
|
||||
* Creates a function that will process either the `onTrue` or the `onFalse`
|
||||
* function depending upon the result of the `condition` predicate.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.8.0
|
||||
* @category Logic
|
||||
* @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *)
|
||||
* @param {Function} condition A predicate function
|
||||
* @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value.
|
||||
* @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value.
|
||||
* @return {Function} A new function that will process either the `onTrue` or the `onFalse`
|
||||
* function depending upon the result of the `condition` predicate.
|
||||
* @see R.unless, R.when, R.cond
|
||||
* @example
|
||||
*
|
||||
* const incCount = R.ifElse(
|
||||
* R.has('count'),
|
||||
* R.over(R.lensProp('count'), R.inc),
|
||||
* R.assoc('count', 1)
|
||||
* );
|
||||
* incCount({}); //=> { count: 1 }
|
||||
* incCount({ count: 1 }); //=> { count: 2 }
|
||||
*/
|
||||
|
||||
|
||||
var ifElse =
|
||||
/*#__PURE__*/
|
||||
_curry3(function ifElse(condition, onTrue, onFalse) {
|
||||
return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() {
|
||||
return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments);
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = ifElse;
|
24
node_modules/ramda/src/inc.js
generated
vendored
Normal file
24
node_modules/ramda/src/inc.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
var add =
|
||||
/*#__PURE__*/
|
||||
require("./add");
|
||||
/**
|
||||
* Increments its argument.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category Math
|
||||
* @sig Number -> Number
|
||||
* @param {Number} n
|
||||
* @return {Number} n + 1
|
||||
* @see R.dec
|
||||
* @example
|
||||
*
|
||||
* R.inc(42); //=> 43
|
||||
*/
|
||||
|
||||
|
||||
var inc =
|
||||
/*#__PURE__*/
|
||||
add(1);
|
||||
module.exports = inc;
|
36
node_modules/ramda/src/includes.js
generated
vendored
Normal file
36
node_modules/ramda/src/includes.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
var _includes =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_includes");
|
||||
|
||||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
/**
|
||||
* Returns `true` if the specified value is equal, in [`R.equals`](#equals)
|
||||
* terms, to at least one element of the given list; `false` otherwise.
|
||||
* Works also with strings.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.26.0
|
||||
* @category List
|
||||
* @sig a -> [a] -> Boolean
|
||||
* @param {Object} a The item to compare against.
|
||||
* @param {Array} list The array to consider.
|
||||
* @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.
|
||||
* @see R.any
|
||||
* @example
|
||||
*
|
||||
* R.includes(3, [1, 2, 3]); //=> true
|
||||
* R.includes(4, [1, 2, 3]); //=> false
|
||||
* R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true
|
||||
* R.includes([42], [[42]]); //=> true
|
||||
* R.includes('ba', 'banana'); //=>true
|
||||
*/
|
||||
|
||||
|
||||
var includes =
|
||||
/*#__PURE__*/
|
||||
_curry2(_includes);
|
||||
|
||||
module.exports = includes;
|
772
node_modules/ramda/src/index.js
generated
vendored
Normal file
772
node_modules/ramda/src/index.js
generated
vendored
Normal file
|
@ -0,0 +1,772 @@
|
|||
module.exports = {};
|
||||
module.exports.F =
|
||||
/*#__PURE__*/
|
||||
require("./F");
|
||||
module.exports.T =
|
||||
/*#__PURE__*/
|
||||
require("./T");
|
||||
module.exports.__ =
|
||||
/*#__PURE__*/
|
||||
require("./__");
|
||||
module.exports.add =
|
||||
/*#__PURE__*/
|
||||
require("./add");
|
||||
module.exports.addIndex =
|
||||
/*#__PURE__*/
|
||||
require("./addIndex");
|
||||
module.exports.adjust =
|
||||
/*#__PURE__*/
|
||||
require("./adjust");
|
||||
module.exports.all =
|
||||
/*#__PURE__*/
|
||||
require("./all");
|
||||
module.exports.allPass =
|
||||
/*#__PURE__*/
|
||||
require("./allPass");
|
||||
module.exports.always =
|
||||
/*#__PURE__*/
|
||||
require("./always");
|
||||
module.exports.and =
|
||||
/*#__PURE__*/
|
||||
require("./and");
|
||||
module.exports.any =
|
||||
/*#__PURE__*/
|
||||
require("./any");
|
||||
module.exports.anyPass =
|
||||
/*#__PURE__*/
|
||||
require("./anyPass");
|
||||
module.exports.ap =
|
||||
/*#__PURE__*/
|
||||
require("./ap");
|
||||
module.exports.aperture =
|
||||
/*#__PURE__*/
|
||||
require("./aperture");
|
||||
module.exports.append =
|
||||
/*#__PURE__*/
|
||||
require("./append");
|
||||
module.exports.apply =
|
||||
/*#__PURE__*/
|
||||
require("./apply");
|
||||
module.exports.applySpec =
|
||||
/*#__PURE__*/
|
||||
require("./applySpec");
|
||||
module.exports.applyTo =
|
||||
/*#__PURE__*/
|
||||
require("./applyTo");
|
||||
module.exports.ascend =
|
||||
/*#__PURE__*/
|
||||
require("./ascend");
|
||||
module.exports.assoc =
|
||||
/*#__PURE__*/
|
||||
require("./assoc");
|
||||
module.exports.assocPath =
|
||||
/*#__PURE__*/
|
||||
require("./assocPath");
|
||||
module.exports.binary =
|
||||
/*#__PURE__*/
|
||||
require("./binary");
|
||||
module.exports.bind =
|
||||
/*#__PURE__*/
|
||||
require("./bind");
|
||||
module.exports.both =
|
||||
/*#__PURE__*/
|
||||
require("./both");
|
||||
module.exports.call =
|
||||
/*#__PURE__*/
|
||||
require("./call");
|
||||
module.exports.chain =
|
||||
/*#__PURE__*/
|
||||
require("./chain");
|
||||
module.exports.clamp =
|
||||
/*#__PURE__*/
|
||||
require("./clamp");
|
||||
module.exports.clone =
|
||||
/*#__PURE__*/
|
||||
require("./clone");
|
||||
module.exports.comparator =
|
||||
/*#__PURE__*/
|
||||
require("./comparator");
|
||||
module.exports.complement =
|
||||
/*#__PURE__*/
|
||||
require("./complement");
|
||||
module.exports.compose =
|
||||
/*#__PURE__*/
|
||||
require("./compose");
|
||||
module.exports.composeK =
|
||||
/*#__PURE__*/
|
||||
require("./composeK");
|
||||
module.exports.composeP =
|
||||
/*#__PURE__*/
|
||||
require("./composeP");
|
||||
module.exports.composeWith =
|
||||
/*#__PURE__*/
|
||||
require("./composeWith");
|
||||
module.exports.concat =
|
||||
/*#__PURE__*/
|
||||
require("./concat");
|
||||
module.exports.cond =
|
||||
/*#__PURE__*/
|
||||
require("./cond");
|
||||
module.exports.construct =
|
||||
/*#__PURE__*/
|
||||
require("./construct");
|
||||
module.exports.constructN =
|
||||
/*#__PURE__*/
|
||||
require("./constructN");
|
||||
module.exports.contains =
|
||||
/*#__PURE__*/
|
||||
require("./contains");
|
||||
module.exports.converge =
|
||||
/*#__PURE__*/
|
||||
require("./converge");
|
||||
module.exports.countBy =
|
||||
/*#__PURE__*/
|
||||
require("./countBy");
|
||||
module.exports.curry =
|
||||
/*#__PURE__*/
|
||||
require("./curry");
|
||||
module.exports.curryN =
|
||||
/*#__PURE__*/
|
||||
require("./curryN");
|
||||
module.exports.dec =
|
||||
/*#__PURE__*/
|
||||
require("./dec");
|
||||
module.exports.defaultTo =
|
||||
/*#__PURE__*/
|
||||
require("./defaultTo");
|
||||
module.exports.descend =
|
||||
/*#__PURE__*/
|
||||
require("./descend");
|
||||
module.exports.difference =
|
||||
/*#__PURE__*/
|
||||
require("./difference");
|
||||
module.exports.differenceWith =
|
||||
/*#__PURE__*/
|
||||
require("./differenceWith");
|
||||
module.exports.dissoc =
|
||||
/*#__PURE__*/
|
||||
require("./dissoc");
|
||||
module.exports.dissocPath =
|
||||
/*#__PURE__*/
|
||||
require("./dissocPath");
|
||||
module.exports.divide =
|
||||
/*#__PURE__*/
|
||||
require("./divide");
|
||||
module.exports.drop =
|
||||
/*#__PURE__*/
|
||||
require("./drop");
|
||||
module.exports.dropLast =
|
||||
/*#__PURE__*/
|
||||
require("./dropLast");
|
||||
module.exports.dropLastWhile =
|
||||
/*#__PURE__*/
|
||||
require("./dropLastWhile");
|
||||
module.exports.dropRepeats =
|
||||
/*#__PURE__*/
|
||||
require("./dropRepeats");
|
||||
module.exports.dropRepeatsWith =
|
||||
/*#__PURE__*/
|
||||
require("./dropRepeatsWith");
|
||||
module.exports.dropWhile =
|
||||
/*#__PURE__*/
|
||||
require("./dropWhile");
|
||||
module.exports.either =
|
||||
/*#__PURE__*/
|
||||
require("./either");
|
||||
module.exports.empty =
|
||||
/*#__PURE__*/
|
||||
require("./empty");
|
||||
module.exports.endsWith =
|
||||
/*#__PURE__*/
|
||||
require("./endsWith");
|
||||
module.exports.eqBy =
|
||||
/*#__PURE__*/
|
||||
require("./eqBy");
|
||||
module.exports.eqProps =
|
||||
/*#__PURE__*/
|
||||
require("./eqProps");
|
||||
module.exports.equals =
|
||||
/*#__PURE__*/
|
||||
require("./equals");
|
||||
module.exports.evolve =
|
||||
/*#__PURE__*/
|
||||
require("./evolve");
|
||||
module.exports.filter =
|
||||
/*#__PURE__*/
|
||||
require("./filter");
|
||||
module.exports.find =
|
||||
/*#__PURE__*/
|
||||
require("./find");
|
||||
module.exports.findIndex =
|
||||
/*#__PURE__*/
|
||||
require("./findIndex");
|
||||
module.exports.findLast =
|
||||
/*#__PURE__*/
|
||||
require("./findLast");
|
||||
module.exports.findLastIndex =
|
||||
/*#__PURE__*/
|
||||
require("./findLastIndex");
|
||||
module.exports.flatten =
|
||||
/*#__PURE__*/
|
||||
require("./flatten");
|
||||
module.exports.flip =
|
||||
/*#__PURE__*/
|
||||
require("./flip");
|
||||
module.exports.forEach =
|
||||
/*#__PURE__*/
|
||||
require("./forEach");
|
||||
module.exports.forEachObjIndexed =
|
||||
/*#__PURE__*/
|
||||
require("./forEachObjIndexed");
|
||||
module.exports.fromPairs =
|
||||
/*#__PURE__*/
|
||||
require("./fromPairs");
|
||||
module.exports.groupBy =
|
||||
/*#__PURE__*/
|
||||
require("./groupBy");
|
||||
module.exports.groupWith =
|
||||
/*#__PURE__*/
|
||||
require("./groupWith");
|
||||
module.exports.gt =
|
||||
/*#__PURE__*/
|
||||
require("./gt");
|
||||
module.exports.gte =
|
||||
/*#__PURE__*/
|
||||
require("./gte");
|
||||
module.exports.has =
|
||||
/*#__PURE__*/
|
||||
require("./has");
|
||||
module.exports.hasIn =
|
||||
/*#__PURE__*/
|
||||
require("./hasIn");
|
||||
module.exports.hasPath =
|
||||
/*#__PURE__*/
|
||||
require("./hasPath");
|
||||
module.exports.head =
|
||||
/*#__PURE__*/
|
||||
require("./head");
|
||||
module.exports.identical =
|
||||
/*#__PURE__*/
|
||||
require("./identical");
|
||||
module.exports.identity =
|
||||
/*#__PURE__*/
|
||||
require("./identity");
|
||||
module.exports.ifElse =
|
||||
/*#__PURE__*/
|
||||
require("./ifElse");
|
||||
module.exports.inc =
|
||||
/*#__PURE__*/
|
||||
require("./inc");
|
||||
module.exports.includes =
|
||||
/*#__PURE__*/
|
||||
require("./includes");
|
||||
module.exports.indexBy =
|
||||
/*#__PURE__*/
|
||||
require("./indexBy");
|
||||
module.exports.indexOf =
|
||||
/*#__PURE__*/
|
||||
require("./indexOf");
|
||||
module.exports.init =
|
||||
/*#__PURE__*/
|
||||
require("./init");
|
||||
module.exports.innerJoin =
|
||||
/*#__PURE__*/
|
||||
require("./innerJoin");
|
||||
module.exports.insert =
|
||||
/*#__PURE__*/
|
||||
require("./insert");
|
||||
module.exports.insertAll =
|
||||
/*#__PURE__*/
|
||||
require("./insertAll");
|
||||
module.exports.intersection =
|
||||
/*#__PURE__*/
|
||||
require("./intersection");
|
||||
module.exports.intersperse =
|
||||
/*#__PURE__*/
|
||||
require("./intersperse");
|
||||
module.exports.into =
|
||||
/*#__PURE__*/
|
||||
require("./into");
|
||||
module.exports.invert =
|
||||
/*#__PURE__*/
|
||||
require("./invert");
|
||||
module.exports.invertObj =
|
||||
/*#__PURE__*/
|
||||
require("./invertObj");
|
||||
module.exports.invoker =
|
||||
/*#__PURE__*/
|
||||
require("./invoker");
|
||||
module.exports.is =
|
||||
/*#__PURE__*/
|
||||
require("./is");
|
||||
module.exports.isEmpty =
|
||||
/*#__PURE__*/
|
||||
require("./isEmpty");
|
||||
module.exports.isNil =
|
||||
/*#__PURE__*/
|
||||
require("./isNil");
|
||||
module.exports.join =
|
||||
/*#__PURE__*/
|
||||
require("./join");
|
||||
module.exports.juxt =
|
||||
/*#__PURE__*/
|
||||
require("./juxt");
|
||||
module.exports.keys =
|
||||
/*#__PURE__*/
|
||||
require("./keys");
|
||||
module.exports.keysIn =
|
||||
/*#__PURE__*/
|
||||
require("./keysIn");
|
||||
module.exports.last =
|
||||
/*#__PURE__*/
|
||||
require("./last");
|
||||
module.exports.lastIndexOf =
|
||||
/*#__PURE__*/
|
||||
require("./lastIndexOf");
|
||||
module.exports.length =
|
||||
/*#__PURE__*/
|
||||
require("./length");
|
||||
module.exports.lens =
|
||||
/*#__PURE__*/
|
||||
require("./lens");
|
||||
module.exports.lensIndex =
|
||||
/*#__PURE__*/
|
||||
require("./lensIndex");
|
||||
module.exports.lensPath =
|
||||
/*#__PURE__*/
|
||||
require("./lensPath");
|
||||
module.exports.lensProp =
|
||||
/*#__PURE__*/
|
||||
require("./lensProp");
|
||||
module.exports.lift =
|
||||
/*#__PURE__*/
|
||||
require("./lift");
|
||||
module.exports.liftN =
|
||||
/*#__PURE__*/
|
||||
require("./liftN");
|
||||
module.exports.lt =
|
||||
/*#__PURE__*/
|
||||
require("./lt");
|
||||
module.exports.lte =
|
||||
/*#__PURE__*/
|
||||
require("./lte");
|
||||
module.exports.map =
|
||||
/*#__PURE__*/
|
||||
require("./map");
|
||||
module.exports.mapAccum =
|
||||
/*#__PURE__*/
|
||||
require("./mapAccum");
|
||||
module.exports.mapAccumRight =
|
||||
/*#__PURE__*/
|
||||
require("./mapAccumRight");
|
||||
module.exports.mapObjIndexed =
|
||||
/*#__PURE__*/
|
||||
require("./mapObjIndexed");
|
||||
module.exports.match =
|
||||
/*#__PURE__*/
|
||||
require("./match");
|
||||
module.exports.mathMod =
|
||||
/*#__PURE__*/
|
||||
require("./mathMod");
|
||||
module.exports.max =
|
||||
/*#__PURE__*/
|
||||
require("./max");
|
||||
module.exports.maxBy =
|
||||
/*#__PURE__*/
|
||||
require("./maxBy");
|
||||
module.exports.mean =
|
||||
/*#__PURE__*/
|
||||
require("./mean");
|
||||
module.exports.median =
|
||||
/*#__PURE__*/
|
||||
require("./median");
|
||||
module.exports.memoizeWith =
|
||||
/*#__PURE__*/
|
||||
require("./memoizeWith");
|
||||
module.exports.merge =
|
||||
/*#__PURE__*/
|
||||
require("./merge");
|
||||
module.exports.mergeAll =
|
||||
/*#__PURE__*/
|
||||
require("./mergeAll");
|
||||
module.exports.mergeDeepLeft =
|
||||
/*#__PURE__*/
|
||||
require("./mergeDeepLeft");
|
||||
module.exports.mergeDeepRight =
|
||||
/*#__PURE__*/
|
||||
require("./mergeDeepRight");
|
||||
module.exports.mergeDeepWith =
|
||||
/*#__PURE__*/
|
||||
require("./mergeDeepWith");
|
||||
module.exports.mergeDeepWithKey =
|
||||
/*#__PURE__*/
|
||||
require("./mergeDeepWithKey");
|
||||
module.exports.mergeLeft =
|
||||
/*#__PURE__*/
|
||||
require("./mergeLeft");
|
||||
module.exports.mergeRight =
|
||||
/*#__PURE__*/
|
||||
require("./mergeRight");
|
||||
module.exports.mergeWith =
|
||||
/*#__PURE__*/
|
||||
require("./mergeWith");
|
||||
module.exports.mergeWithKey =
|
||||
/*#__PURE__*/
|
||||
require("./mergeWithKey");
|
||||
module.exports.min =
|
||||
/*#__PURE__*/
|
||||
require("./min");
|
||||
module.exports.minBy =
|
||||
/*#__PURE__*/
|
||||
require("./minBy");
|
||||
module.exports.modulo =
|
||||
/*#__PURE__*/
|
||||
require("./modulo");
|
||||
module.exports.move =
|
||||
/*#__PURE__*/
|
||||
require("./move");
|
||||
module.exports.multiply =
|
||||
/*#__PURE__*/
|
||||
require("./multiply");
|
||||
module.exports.nAry =
|
||||
/*#__PURE__*/
|
||||
require("./nAry");
|
||||
module.exports.negate =
|
||||
/*#__PURE__*/
|
||||
require("./negate");
|
||||
module.exports.none =
|
||||
/*#__PURE__*/
|
||||
require("./none");
|
||||
module.exports.not =
|
||||
/*#__PURE__*/
|
||||
require("./not");
|
||||
module.exports.nth =
|
||||
/*#__PURE__*/
|
||||
require("./nth");
|
||||
module.exports.nthArg =
|
||||
/*#__PURE__*/
|
||||
require("./nthArg");
|
||||
module.exports.o =
|
||||
/*#__PURE__*/
|
||||
require("./o");
|
||||
module.exports.objOf =
|
||||
/*#__PURE__*/
|
||||
require("./objOf");
|
||||
module.exports.of =
|
||||
/*#__PURE__*/
|
||||
require("./of");
|
||||
module.exports.omit =
|
||||
/*#__PURE__*/
|
||||
require("./omit");
|
||||
module.exports.once =
|
||||
/*#__PURE__*/
|
||||
require("./once");
|
||||
module.exports.or =
|
||||
/*#__PURE__*/
|
||||
require("./or");
|
||||
module.exports.otherwise =
|
||||
/*#__PURE__*/
|
||||
require("./otherwise");
|
||||
module.exports.over =
|
||||
/*#__PURE__*/
|
||||
require("./over");
|
||||
module.exports.pair =
|
||||
/*#__PURE__*/
|
||||
require("./pair");
|
||||
module.exports.partial =
|
||||
/*#__PURE__*/
|
||||
require("./partial");
|
||||
module.exports.partialRight =
|
||||
/*#__PURE__*/
|
||||
require("./partialRight");
|
||||
module.exports.partition =
|
||||
/*#__PURE__*/
|
||||
require("./partition");
|
||||
module.exports.path =
|
||||
/*#__PURE__*/
|
||||
require("./path");
|
||||
module.exports.paths =
|
||||
/*#__PURE__*/
|
||||
require("./paths");
|
||||
module.exports.pathEq =
|
||||
/*#__PURE__*/
|
||||
require("./pathEq");
|
||||
module.exports.pathOr =
|
||||
/*#__PURE__*/
|
||||
require("./pathOr");
|
||||
module.exports.pathSatisfies =
|
||||
/*#__PURE__*/
|
||||
require("./pathSatisfies");
|
||||
module.exports.pick =
|
||||
/*#__PURE__*/
|
||||
require("./pick");
|
||||
module.exports.pickAll =
|
||||
/*#__PURE__*/
|
||||
require("./pickAll");
|
||||
module.exports.pickBy =
|
||||
/*#__PURE__*/
|
||||
require("./pickBy");
|
||||
module.exports.pipe =
|
||||
/*#__PURE__*/
|
||||
require("./pipe");
|
||||
module.exports.pipeK =
|
||||
/*#__PURE__*/
|
||||
require("./pipeK");
|
||||
module.exports.pipeP =
|
||||
/*#__PURE__*/
|
||||
require("./pipeP");
|
||||
module.exports.pipeWith =
|
||||
/*#__PURE__*/
|
||||
require("./pipeWith");
|
||||
module.exports.pluck =
|
||||
/*#__PURE__*/
|
||||
require("./pluck");
|
||||
module.exports.prepend =
|
||||
/*#__PURE__*/
|
||||
require("./prepend");
|
||||
module.exports.product =
|
||||
/*#__PURE__*/
|
||||
require("./product");
|
||||
module.exports.project =
|
||||
/*#__PURE__*/
|
||||
require("./project");
|
||||
module.exports.prop =
|
||||
/*#__PURE__*/
|
||||
require("./prop");
|
||||
module.exports.propEq =
|
||||
/*#__PURE__*/
|
||||
require("./propEq");
|
||||
module.exports.propIs =
|
||||
/*#__PURE__*/
|
||||
require("./propIs");
|
||||
module.exports.propOr =
|
||||
/*#__PURE__*/
|
||||
require("./propOr");
|
||||
module.exports.propSatisfies =
|
||||
/*#__PURE__*/
|
||||
require("./propSatisfies");
|
||||
module.exports.props =
|
||||
/*#__PURE__*/
|
||||
require("./props");
|
||||
module.exports.range =
|
||||
/*#__PURE__*/
|
||||
require("./range");
|
||||
module.exports.reduce =
|
||||
/*#__PURE__*/
|
||||
require("./reduce");
|
||||
module.exports.reduceBy =
|
||||
/*#__PURE__*/
|
||||
require("./reduceBy");
|
||||
module.exports.reduceRight =
|
||||
/*#__PURE__*/
|
||||
require("./reduceRight");
|
||||
module.exports.reduceWhile =
|
||||
/*#__PURE__*/
|
||||
require("./reduceWhile");
|
||||
module.exports.reduced =
|
||||
/*#__PURE__*/
|
||||
require("./reduced");
|
||||
module.exports.reject =
|
||||
/*#__PURE__*/
|
||||
require("./reject");
|
||||
module.exports.remove =
|
||||
/*#__PURE__*/
|
||||
require("./remove");
|
||||
module.exports.repeat =
|
||||
/*#__PURE__*/
|
||||
require("./repeat");
|
||||
module.exports.replace =
|
||||
/*#__PURE__*/
|
||||
require("./replace");
|
||||
module.exports.reverse =
|
||||
/*#__PURE__*/
|
||||
require("./reverse");
|
||||
module.exports.scan =
|
||||
/*#__PURE__*/
|
||||
require("./scan");
|
||||
module.exports.sequence =
|
||||
/*#__PURE__*/
|
||||
require("./sequence");
|
||||
module.exports.set =
|
||||
/*#__PURE__*/
|
||||
require("./set");
|
||||
module.exports.slice =
|
||||
/*#__PURE__*/
|
||||
require("./slice");
|
||||
module.exports.sort =
|
||||
/*#__PURE__*/
|
||||
require("./sort");
|
||||
module.exports.sortBy =
|
||||
/*#__PURE__*/
|
||||
require("./sortBy");
|
||||
module.exports.sortWith =
|
||||
/*#__PURE__*/
|
||||
require("./sortWith");
|
||||
module.exports.split =
|
||||
/*#__PURE__*/
|
||||
require("./split");
|
||||
module.exports.splitAt =
|
||||
/*#__PURE__*/
|
||||
require("./splitAt");
|
||||
module.exports.splitEvery =
|
||||
/*#__PURE__*/
|
||||
require("./splitEvery");
|
||||
module.exports.splitWhen =
|
||||
/*#__PURE__*/
|
||||
require("./splitWhen");
|
||||
module.exports.startsWith =
|
||||
/*#__PURE__*/
|
||||
require("./startsWith");
|
||||
module.exports.subtract =
|
||||
/*#__PURE__*/
|
||||
require("./subtract");
|
||||
module.exports.sum =
|
||||
/*#__PURE__*/
|
||||
require("./sum");
|
||||
module.exports.symmetricDifference =
|
||||
/*#__PURE__*/
|
||||
require("./symmetricDifference");
|
||||
module.exports.symmetricDifferenceWith =
|
||||
/*#__PURE__*/
|
||||
require("./symmetricDifferenceWith");
|
||||
module.exports.tail =
|
||||
/*#__PURE__*/
|
||||
require("./tail");
|
||||
module.exports.take =
|
||||
/*#__PURE__*/
|
||||
require("./take");
|
||||
module.exports.takeLast =
|
||||
/*#__PURE__*/
|
||||
require("./takeLast");
|
||||
module.exports.takeLastWhile =
|
||||
/*#__PURE__*/
|
||||
require("./takeLastWhile");
|
||||
module.exports.takeWhile =
|
||||
/*#__PURE__*/
|
||||
require("./takeWhile");
|
||||
module.exports.tap =
|
||||
/*#__PURE__*/
|
||||
require("./tap");
|
||||
module.exports.test =
|
||||
/*#__PURE__*/
|
||||
require("./test");
|
||||
module.exports.andThen =
|
||||
/*#__PURE__*/
|
||||
require("./andThen");
|
||||
module.exports.times =
|
||||
/*#__PURE__*/
|
||||
require("./times");
|
||||
module.exports.toLower =
|
||||
/*#__PURE__*/
|
||||
require("./toLower");
|
||||
module.exports.toPairs =
|
||||
/*#__PURE__*/
|
||||
require("./toPairs");
|
||||
module.exports.toPairsIn =
|
||||
/*#__PURE__*/
|
||||
require("./toPairsIn");
|
||||
module.exports.toString =
|
||||
/*#__PURE__*/
|
||||
require("./toString");
|
||||
module.exports.toUpper =
|
||||
/*#__PURE__*/
|
||||
require("./toUpper");
|
||||
module.exports.transduce =
|
||||
/*#__PURE__*/
|
||||
require("./transduce");
|
||||
module.exports.transpose =
|
||||
/*#__PURE__*/
|
||||
require("./transpose");
|
||||
module.exports.traverse =
|
||||
/*#__PURE__*/
|
||||
require("./traverse");
|
||||
module.exports.trim =
|
||||
/*#__PURE__*/
|
||||
require("./trim");
|
||||
module.exports.tryCatch =
|
||||
/*#__PURE__*/
|
||||
require("./tryCatch");
|
||||
module.exports.type =
|
||||
/*#__PURE__*/
|
||||
require("./type");
|
||||
module.exports.unapply =
|
||||
/*#__PURE__*/
|
||||
require("./unapply");
|
||||
module.exports.unary =
|
||||
/*#__PURE__*/
|
||||
require("./unary");
|
||||
module.exports.uncurryN =
|
||||
/*#__PURE__*/
|
||||
require("./uncurryN");
|
||||
module.exports.unfold =
|
||||
/*#__PURE__*/
|
||||
require("./unfold");
|
||||
module.exports.union =
|
||||
/*#__PURE__*/
|
||||
require("./union");
|
||||
module.exports.unionWith =
|
||||
/*#__PURE__*/
|
||||
require("./unionWith");
|
||||
module.exports.uniq =
|
||||
/*#__PURE__*/
|
||||
require("./uniq");
|
||||
module.exports.uniqBy =
|
||||
/*#__PURE__*/
|
||||
require("./uniqBy");
|
||||
module.exports.uniqWith =
|
||||
/*#__PURE__*/
|
||||
require("./uniqWith");
|
||||
module.exports.unless =
|
||||
/*#__PURE__*/
|
||||
require("./unless");
|
||||
module.exports.unnest =
|
||||
/*#__PURE__*/
|
||||
require("./unnest");
|
||||
module.exports.until =
|
||||
/*#__PURE__*/
|
||||
require("./until");
|
||||
module.exports.update =
|
||||
/*#__PURE__*/
|
||||
require("./update");
|
||||
module.exports.useWith =
|
||||
/*#__PURE__*/
|
||||
require("./useWith");
|
||||
module.exports.values =
|
||||
/*#__PURE__*/
|
||||
require("./values");
|
||||
module.exports.valuesIn =
|
||||
/*#__PURE__*/
|
||||
require("./valuesIn");
|
||||
module.exports.view =
|
||||
/*#__PURE__*/
|
||||
require("./view");
|
||||
module.exports.when =
|
||||
/*#__PURE__*/
|
||||
require("./when");
|
||||
module.exports.where =
|
||||
/*#__PURE__*/
|
||||
require("./where");
|
||||
module.exports.whereEq =
|
||||
/*#__PURE__*/
|
||||
require("./whereEq");
|
||||
module.exports.without =
|
||||
/*#__PURE__*/
|
||||
require("./without");
|
||||
module.exports.xor =
|
||||
/*#__PURE__*/
|
||||
require("./xor");
|
||||
module.exports.xprod =
|
||||
/*#__PURE__*/
|
||||
require("./xprod");
|
||||
module.exports.zip =
|
||||
/*#__PURE__*/
|
||||
require("./zip");
|
||||
module.exports.zipObj =
|
||||
/*#__PURE__*/
|
||||
require("./zipObj");
|
||||
module.exports.zipWith =
|
||||
/*#__PURE__*/
|
||||
require("./zipWith");
|
||||
module.exports.thunkify =
|
||||
/*#__PURE__*/
|
||||
require("./thunkify");
|
257
node_modules/ramda/src/index.mjs
generated
vendored
Normal file
257
node_modules/ramda/src/index.mjs
generated
vendored
Normal file
|
@ -0,0 +1,257 @@
|
|||
export { default as F } from "./F.js";
|
||||
export { default as T } from "./T.js";
|
||||
export { default as __ } from "./__.js";
|
||||
export { default as add } from "./add.js";
|
||||
export { default as addIndex } from "./addIndex.js";
|
||||
export { default as adjust } from "./adjust.js";
|
||||
export { default as all } from "./all.js";
|
||||
export { default as allPass } from "./allPass.js";
|
||||
export { default as always } from "./always.js";
|
||||
export { default as and } from "./and.js";
|
||||
export { default as any } from "./any.js";
|
||||
export { default as anyPass } from "./anyPass.js";
|
||||
export { default as ap } from "./ap.js";
|
||||
export { default as aperture } from "./aperture.js";
|
||||
export { default as append } from "./append.js";
|
||||
export { default as apply } from "./apply.js";
|
||||
export { default as applySpec } from "./applySpec.js";
|
||||
export { default as applyTo } from "./applyTo.js";
|
||||
export { default as ascend } from "./ascend.js";
|
||||
export { default as assoc } from "./assoc.js";
|
||||
export { default as assocPath } from "./assocPath.js";
|
||||
export { default as binary } from "./binary.js";
|
||||
export { default as bind } from "./bind.js";
|
||||
export { default as both } from "./both.js";
|
||||
export { default as call } from "./call.js";
|
||||
export { default as chain } from "./chain.js";
|
||||
export { default as clamp } from "./clamp.js";
|
||||
export { default as clone } from "./clone.js";
|
||||
export { default as comparator } from "./comparator.js";
|
||||
export { default as complement } from "./complement.js";
|
||||
export { default as compose } from "./compose.js";
|
||||
export { default as composeK } from "./composeK.js";
|
||||
export { default as composeP } from "./composeP.js";
|
||||
export { default as composeWith } from "./composeWith.js";
|
||||
export { default as concat } from "./concat.js";
|
||||
export { default as cond } from "./cond.js";
|
||||
export { default as construct } from "./construct.js";
|
||||
export { default as constructN } from "./constructN.js";
|
||||
export { default as contains } from "./contains.js";
|
||||
export { default as converge } from "./converge.js";
|
||||
export { default as countBy } from "./countBy.js";
|
||||
export { default as curry } from "./curry.js";
|
||||
export { default as curryN } from "./curryN.js";
|
||||
export { default as dec } from "./dec.js";
|
||||
export { default as defaultTo } from "./defaultTo.js";
|
||||
export { default as descend } from "./descend.js";
|
||||
export { default as difference } from "./difference.js";
|
||||
export { default as differenceWith } from "./differenceWith.js";
|
||||
export { default as dissoc } from "./dissoc.js";
|
||||
export { default as dissocPath } from "./dissocPath.js";
|
||||
export { default as divide } from "./divide.js";
|
||||
export { default as drop } from "./drop.js";
|
||||
export { default as dropLast } from "./dropLast.js";
|
||||
export { default as dropLastWhile } from "./dropLastWhile.js";
|
||||
export { default as dropRepeats } from "./dropRepeats.js";
|
||||
export { default as dropRepeatsWith } from "./dropRepeatsWith.js";
|
||||
export { default as dropWhile } from "./dropWhile.js";
|
||||
export { default as either } from "./either.js";
|
||||
export { default as empty } from "./empty.js";
|
||||
export { default as endsWith } from "./endsWith.js";
|
||||
export { default as eqBy } from "./eqBy.js";
|
||||
export { default as eqProps } from "./eqProps.js";
|
||||
export { default as equals } from "./equals.js";
|
||||
export { default as evolve } from "./evolve.js";
|
||||
export { default as filter } from "./filter.js";
|
||||
export { default as find } from "./find.js";
|
||||
export { default as findIndex } from "./findIndex.js";
|
||||
export { default as findLast } from "./findLast.js";
|
||||
export { default as findLastIndex } from "./findLastIndex.js";
|
||||
export { default as flatten } from "./flatten.js";
|
||||
export { default as flip } from "./flip.js";
|
||||
export { default as forEach } from "./forEach.js";
|
||||
export { default as forEachObjIndexed } from "./forEachObjIndexed.js";
|
||||
export { default as fromPairs } from "./fromPairs.js";
|
||||
export { default as groupBy } from "./groupBy.js";
|
||||
export { default as groupWith } from "./groupWith.js";
|
||||
export { default as gt } from "./gt.js";
|
||||
export { default as gte } from "./gte.js";
|
||||
export { default as has } from "./has.js";
|
||||
export { default as hasIn } from "./hasIn.js";
|
||||
export { default as hasPath } from "./hasPath.js";
|
||||
export { default as head } from "./head.js";
|
||||
export { default as identical } from "./identical.js";
|
||||
export { default as identity } from "./identity.js";
|
||||
export { default as ifElse } from "./ifElse.js";
|
||||
export { default as inc } from "./inc.js";
|
||||
export { default as includes } from "./includes.js";
|
||||
export { default as indexBy } from "./indexBy.js";
|
||||
export { default as indexOf } from "./indexOf.js";
|
||||
export { default as init } from "./init.js";
|
||||
export { default as innerJoin } from "./innerJoin.js";
|
||||
export { default as insert } from "./insert.js";
|
||||
export { default as insertAll } from "./insertAll.js";
|
||||
export { default as intersection } from "./intersection.js";
|
||||
export { default as intersperse } from "./intersperse.js";
|
||||
export { default as into } from "./into.js";
|
||||
export { default as invert } from "./invert.js";
|
||||
export { default as invertObj } from "./invertObj.js";
|
||||
export { default as invoker } from "./invoker.js";
|
||||
export { default as is } from "./is.js";
|
||||
export { default as isEmpty } from "./isEmpty.js";
|
||||
export { default as isNil } from "./isNil.js";
|
||||
export { default as join } from "./join.js";
|
||||
export { default as juxt } from "./juxt.js";
|
||||
export { default as keys } from "./keys.js";
|
||||
export { default as keysIn } from "./keysIn.js";
|
||||
export { default as last } from "./last.js";
|
||||
export { default as lastIndexOf } from "./lastIndexOf.js";
|
||||
export { default as length } from "./length.js";
|
||||
export { default as lens } from "./lens.js";
|
||||
export { default as lensIndex } from "./lensIndex.js";
|
||||
export { default as lensPath } from "./lensPath.js";
|
||||
export { default as lensProp } from "./lensProp.js";
|
||||
export { default as lift } from "./lift.js";
|
||||
export { default as liftN } from "./liftN.js";
|
||||
export { default as lt } from "./lt.js";
|
||||
export { default as lte } from "./lte.js";
|
||||
export { default as map } from "./map.js";
|
||||
export { default as mapAccum } from "./mapAccum.js";
|
||||
export { default as mapAccumRight } from "./mapAccumRight.js";
|
||||
export { default as mapObjIndexed } from "./mapObjIndexed.js";
|
||||
export { default as match } from "./match.js";
|
||||
export { default as mathMod } from "./mathMod.js";
|
||||
export { default as max } from "./max.js";
|
||||
export { default as maxBy } from "./maxBy.js";
|
||||
export { default as mean } from "./mean.js";
|
||||
export { default as median } from "./median.js";
|
||||
export { default as memoizeWith } from "./memoizeWith.js";
|
||||
export { default as merge } from "./merge.js";
|
||||
export { default as mergeAll } from "./mergeAll.js";
|
||||
export { default as mergeDeepLeft } from "./mergeDeepLeft.js";
|
||||
export { default as mergeDeepRight } from "./mergeDeepRight.js";
|
||||
export { default as mergeDeepWith } from "./mergeDeepWith.js";
|
||||
export { default as mergeDeepWithKey } from "./mergeDeepWithKey.js";
|
||||
export { default as mergeLeft } from "./mergeLeft.js";
|
||||
export { default as mergeRight } from "./mergeRight.js";
|
||||
export { default as mergeWith } from "./mergeWith.js";
|
||||
export { default as mergeWithKey } from "./mergeWithKey.js";
|
||||
export { default as min } from "./min.js";
|
||||
export { default as minBy } from "./minBy.js";
|
||||
export { default as modulo } from "./modulo.js";
|
||||
export { default as move } from "./move.js";
|
||||
export { default as multiply } from "./multiply.js";
|
||||
export { default as nAry } from "./nAry.js";
|
||||
export { default as negate } from "./negate.js";
|
||||
export { default as none } from "./none.js";
|
||||
export { default as not } from "./not.js";
|
||||
export { default as nth } from "./nth.js";
|
||||
export { default as nthArg } from "./nthArg.js";
|
||||
export { default as o } from "./o.js";
|
||||
export { default as objOf } from "./objOf.js";
|
||||
export { default as of } from "./of.js";
|
||||
export { default as omit } from "./omit.js";
|
||||
export { default as once } from "./once.js";
|
||||
export { default as or } from "./or.js";
|
||||
export { default as otherwise } from "./otherwise.js";
|
||||
export { default as over } from "./over.js";
|
||||
export { default as pair } from "./pair.js";
|
||||
export { default as partial } from "./partial.js";
|
||||
export { default as partialRight } from "./partialRight.js";
|
||||
export { default as partition } from "./partition.js";
|
||||
export { default as path } from "./path.js";
|
||||
export { default as paths } from "./paths.js";
|
||||
export { default as pathEq } from "./pathEq.js";
|
||||
export { default as pathOr } from "./pathOr.js";
|
||||
export { default as pathSatisfies } from "./pathSatisfies.js";
|
||||
export { default as pick } from "./pick.js";
|
||||
export { default as pickAll } from "./pickAll.js";
|
||||
export { default as pickBy } from "./pickBy.js";
|
||||
export { default as pipe } from "./pipe.js";
|
||||
export { default as pipeK } from "./pipeK.js";
|
||||
export { default as pipeP } from "./pipeP.js";
|
||||
export { default as pipeWith } from "./pipeWith.js";
|
||||
export { default as pluck } from "./pluck.js";
|
||||
export { default as prepend } from "./prepend.js";
|
||||
export { default as product } from "./product.js";
|
||||
export { default as project } from "./project.js";
|
||||
export { default as prop } from "./prop.js";
|
||||
export { default as propEq } from "./propEq.js";
|
||||
export { default as propIs } from "./propIs.js";
|
||||
export { default as propOr } from "./propOr.js";
|
||||
export { default as propSatisfies } from "./propSatisfies.js";
|
||||
export { default as props } from "./props.js";
|
||||
export { default as range } from "./range.js";
|
||||
export { default as reduce } from "./reduce.js";
|
||||
export { default as reduceBy } from "./reduceBy.js";
|
||||
export { default as reduceRight } from "./reduceRight.js";
|
||||
export { default as reduceWhile } from "./reduceWhile.js";
|
||||
export { default as reduced } from "./reduced.js";
|
||||
export { default as reject } from "./reject.js";
|
||||
export { default as remove } from "./remove.js";
|
||||
export { default as repeat } from "./repeat.js";
|
||||
export { default as replace } from "./replace.js";
|
||||
export { default as reverse } from "./reverse.js";
|
||||
export { default as scan } from "./scan.js";
|
||||
export { default as sequence } from "./sequence.js";
|
||||
export { default as set } from "./set.js";
|
||||
export { default as slice } from "./slice.js";
|
||||
export { default as sort } from "./sort.js";
|
||||
export { default as sortBy } from "./sortBy.js";
|
||||
export { default as sortWith } from "./sortWith.js";
|
||||
export { default as split } from "./split.js";
|
||||
export { default as splitAt } from "./splitAt.js";
|
||||
export { default as splitEvery } from "./splitEvery.js";
|
||||
export { default as splitWhen } from "./splitWhen.js";
|
||||
export { default as startsWith } from "./startsWith.js";
|
||||
export { default as subtract } from "./subtract.js";
|
||||
export { default as sum } from "./sum.js";
|
||||
export { default as symmetricDifference } from "./symmetricDifference.js";
|
||||
export { default as symmetricDifferenceWith } from "./symmetricDifferenceWith.js";
|
||||
export { default as tail } from "./tail.js";
|
||||
export { default as take } from "./take.js";
|
||||
export { default as takeLast } from "./takeLast.js";
|
||||
export { default as takeLastWhile } from "./takeLastWhile.js";
|
||||
export { default as takeWhile } from "./takeWhile.js";
|
||||
export { default as tap } from "./tap.js";
|
||||
export { default as test } from "./test.js";
|
||||
export { default as andThen } from "./andThen.js";
|
||||
export { default as times } from "./times.js";
|
||||
export { default as toLower } from "./toLower.js";
|
||||
export { default as toPairs } from "./toPairs.js";
|
||||
export { default as toPairsIn } from "./toPairsIn.js";
|
||||
export { default as toString } from "./toString.js";
|
||||
export { default as toUpper } from "./toUpper.js";
|
||||
export { default as transduce } from "./transduce.js";
|
||||
export { default as transpose } from "./transpose.js";
|
||||
export { default as traverse } from "./traverse.js";
|
||||
export { default as trim } from "./trim.js";
|
||||
export { default as tryCatch } from "./tryCatch.js";
|
||||
export { default as type } from "./type.js";
|
||||
export { default as unapply } from "./unapply.js";
|
||||
export { default as unary } from "./unary.js";
|
||||
export { default as uncurryN } from "./uncurryN.js";
|
||||
export { default as unfold } from "./unfold.js";
|
||||
export { default as union } from "./union.js";
|
||||
export { default as unionWith } from "./unionWith.js";
|
||||
export { default as uniq } from "./uniq.js";
|
||||
export { default as uniqBy } from "./uniqBy.js";
|
||||
export { default as uniqWith } from "./uniqWith.js";
|
||||
export { default as unless } from "./unless.js";
|
||||
export { default as unnest } from "./unnest.js";
|
||||
export { default as until } from "./until.js";
|
||||
export { default as update } from "./update.js";
|
||||
export { default as useWith } from "./useWith.js";
|
||||
export { default as values } from "./values.js";
|
||||
export { default as valuesIn } from "./valuesIn.js";
|
||||
export { default as view } from "./view.js";
|
||||
export { default as when } from "./when.js";
|
||||
export { default as where } from "./where.js";
|
||||
export { default as whereEq } from "./whereEq.js";
|
||||
export { default as without } from "./without.js";
|
||||
export { default as xor } from "./xor.js";
|
||||
export { default as xprod } from "./xprod.js";
|
||||
export { default as zip } from "./zip.js";
|
||||
export { default as zipObj } from "./zipObj.js";
|
||||
export { default as zipWith } from "./zipWith.js";
|
||||
export { default as thunkify } from "./thunkify.js";
|
33
node_modules/ramda/src/indexBy.js
generated
vendored
Normal file
33
node_modules/ramda/src/indexBy.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
var reduceBy =
|
||||
/*#__PURE__*/
|
||||
require("./reduceBy");
|
||||
/**
|
||||
* Given a function that generates a key, turns a list of objects into an
|
||||
* object indexing the objects by the given key. Note that if multiple
|
||||
* objects generate the same value for the indexing key only the last value
|
||||
* will be included in the generated object.
|
||||
*
|
||||
* Acts as a transducer if a transformer is given in list position.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.19.0
|
||||
* @category List
|
||||
* @sig (a -> String) -> [{k: v}] -> {k: {k: v}}
|
||||
* @param {Function} fn Function :: a -> String
|
||||
* @param {Array} array The array of objects to index
|
||||
* @return {Object} An object indexing each array element by the given property.
|
||||
* @example
|
||||
*
|
||||
* const list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}];
|
||||
* R.indexBy(R.prop('id'), list);
|
||||
* //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}}
|
||||
*/
|
||||
|
||||
|
||||
var indexBy =
|
||||
/*#__PURE__*/
|
||||
reduceBy(function (acc, elem) {
|
||||
return elem;
|
||||
}, null);
|
||||
module.exports = indexBy;
|
39
node_modules/ramda/src/indexOf.js
generated
vendored
Normal file
39
node_modules/ramda/src/indexOf.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
var _curry2 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry2");
|
||||
|
||||
var _indexOf =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_indexOf");
|
||||
|
||||
var _isArray =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_isArray");
|
||||
/**
|
||||
* Returns the position of the first occurrence of an item in an array, or -1
|
||||
* if the item is not included in the array. [`R.equals`](#equals) is used to
|
||||
* determine equality.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category List
|
||||
* @sig a -> [a] -> Number
|
||||
* @param {*} target The item to find.
|
||||
* @param {Array} xs The array to search in.
|
||||
* @return {Number} the index of the target, or -1 if the target is not found.
|
||||
* @see R.lastIndexOf
|
||||
* @example
|
||||
*
|
||||
* R.indexOf(3, [1,2,3,4]); //=> 2
|
||||
* R.indexOf(10, [1,2,3,4]); //=> -1
|
||||
*/
|
||||
|
||||
|
||||
var indexOf =
|
||||
/*#__PURE__*/
|
||||
_curry2(function indexOf(target, xs) {
|
||||
return typeof xs.indexOf === 'function' && !_isArray(xs) ? xs.indexOf(target) : _indexOf(xs, target, 0);
|
||||
});
|
||||
|
||||
module.exports = indexOf;
|
33
node_modules/ramda/src/init.js
generated
vendored
Normal file
33
node_modules/ramda/src/init.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
var slice =
|
||||
/*#__PURE__*/
|
||||
require("./slice");
|
||||
/**
|
||||
* Returns all but the last element of the given list or string.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category List
|
||||
* @sig [a] -> [a]
|
||||
* @sig String -> String
|
||||
* @param {*} list
|
||||
* @return {*}
|
||||
* @see R.last, R.head, R.tail
|
||||
* @example
|
||||
*
|
||||
* R.init([1, 2, 3]); //=> [1, 2]
|
||||
* R.init([1, 2]); //=> [1]
|
||||
* R.init([1]); //=> []
|
||||
* R.init([]); //=> []
|
||||
*
|
||||
* R.init('abc'); //=> 'ab'
|
||||
* R.init('ab'); //=> 'a'
|
||||
* R.init('a'); //=> ''
|
||||
* R.init(''); //=> ''
|
||||
*/
|
||||
|
||||
|
||||
var init =
|
||||
/*#__PURE__*/
|
||||
slice(0, -1);
|
||||
module.exports = init;
|
57
node_modules/ramda/src/innerJoin.js
generated
vendored
Normal file
57
node_modules/ramda/src/innerJoin.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
var _includesWith =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_includesWith");
|
||||
|
||||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
|
||||
var _filter =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_filter");
|
||||
/**
|
||||
* Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list
|
||||
* `xs'` comprising each of the elements of `xs` which is equal to one or more
|
||||
* elements of `ys` according to `pred`.
|
||||
*
|
||||
* `pred` must be a binary function expecting an element from each list.
|
||||
*
|
||||
* `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should
|
||||
* not be significant, but since `xs'` is ordered the implementation guarantees
|
||||
* that its values are in the same order as they appear in `xs`. Duplicates are
|
||||
* not removed, so `xs'` may contain duplicates if `xs` contains duplicates.
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.24.0
|
||||
* @category Relation
|
||||
* @sig ((a, b) -> Boolean) -> [a] -> [b] -> [a]
|
||||
* @param {Function} pred
|
||||
* @param {Array} xs
|
||||
* @param {Array} ys
|
||||
* @return {Array}
|
||||
* @see R.intersection
|
||||
* @example
|
||||
*
|
||||
* R.innerJoin(
|
||||
* (record, id) => record.id === id,
|
||||
* [{id: 824, name: 'Richie Furay'},
|
||||
* {id: 956, name: 'Dewey Martin'},
|
||||
* {id: 313, name: 'Bruce Palmer'},
|
||||
* {id: 456, name: 'Stephen Stills'},
|
||||
* {id: 177, name: 'Neil Young'}],
|
||||
* [177, 456, 999]
|
||||
* );
|
||||
* //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}]
|
||||
*/
|
||||
|
||||
|
||||
var innerJoin =
|
||||
/*#__PURE__*/
|
||||
_curry3(function innerJoin(pred, xs, ys) {
|
||||
return _filter(function (x) {
|
||||
return _includesWith(pred, x, ys);
|
||||
}, xs);
|
||||
});
|
||||
|
||||
module.exports = innerJoin;
|
34
node_modules/ramda/src/insert.js
generated
vendored
Normal file
34
node_modules/ramda/src/insert.js
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
/**
|
||||
* Inserts the supplied element into the list, at the specified `index`. _Note that
|
||||
|
||||
* this is not destructive_: it returns a copy of the list with the changes.
|
||||
* <small>No lists have been harmed in the application of this function.</small>
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.2.2
|
||||
* @category List
|
||||
* @sig Number -> a -> [a] -> [a]
|
||||
* @param {Number} index The position to insert the element
|
||||
* @param {*} elt The element to insert into the Array
|
||||
* @param {Array} list The list to insert into
|
||||
* @return {Array} A new Array with `elt` inserted at `index`.
|
||||
* @example
|
||||
*
|
||||
* R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4]
|
||||
*/
|
||||
|
||||
|
||||
var insert =
|
||||
/*#__PURE__*/
|
||||
_curry3(function insert(idx, elt, list) {
|
||||
idx = idx < list.length && idx >= 0 ? idx : list.length;
|
||||
var result = Array.prototype.slice.call(list, 0);
|
||||
result.splice(idx, 0, elt);
|
||||
return result;
|
||||
});
|
||||
|
||||
module.exports = insert;
|
31
node_modules/ramda/src/insertAll.js
generated
vendored
Normal file
31
node_modules/ramda/src/insertAll.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
var _curry3 =
|
||||
/*#__PURE__*/
|
||||
require("./internal/_curry3");
|
||||
/**
|
||||
* Inserts the sub-list into the list, at the specified `index`. _Note that this is not
|
||||
* destructive_: it returns a copy of the list with the changes.
|
||||
* <small>No lists have been harmed in the application of this function.</small>
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.9.0
|
||||
* @category List
|
||||
* @sig Number -> [a] -> [a] -> [a]
|
||||
* @param {Number} index The position to insert the sub-list
|
||||
* @param {Array} elts The sub-list to insert into the Array
|
||||
* @param {Array} list The list to insert the sub-list into
|
||||
* @return {Array} A new Array with `elts` inserted starting at `index`.
|
||||
* @example
|
||||
*
|
||||
* R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4]
|
||||
*/
|
||||
|
||||
|
||||
var insertAll =
|
||||
/*#__PURE__*/
|
||||
_curry3(function insertAll(idx, elts, list) {
|
||||
idx = idx < list.length && idx >= 0 ? idx : list.length;
|
||||
return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx));
|
||||
});
|
||||
|
||||
module.exports = insertAll;
|
203
node_modules/ramda/src/internal/_Set.js
generated
vendored
Normal file
203
node_modules/ramda/src/internal/_Set.js
generated
vendored
Normal file
|
@ -0,0 +1,203 @@
|
|||
var _includes =
|
||||
/*#__PURE__*/
|
||||
require("./_includes");
|
||||
|
||||
var _Set =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function _Set() {
|
||||
/* globals Set */
|
||||
this._nativeSet = typeof Set === 'function' ? new Set() : null;
|
||||
this._items = {};
|
||||
}
|
||||
|
||||
// until we figure out why jsdoc chokes on this
|
||||
// @param item The item to add to the Set
|
||||
// @returns {boolean} true if the item did not exist prior, otherwise false
|
||||
//
|
||||
_Set.prototype.add = function (item) {
|
||||
return !hasOrAdd(item, true, this);
|
||||
}; //
|
||||
// @param item The item to check for existence in the Set
|
||||
// @returns {boolean} true if the item exists in the Set, otherwise false
|
||||
//
|
||||
|
||||
|
||||
_Set.prototype.has = function (item) {
|
||||
return hasOrAdd(item, false, this);
|
||||
}; //
|
||||
// Combines the logic for checking whether an item is a member of the set and
|
||||
// for adding a new item to the set.
|
||||
//
|
||||
// @param item The item to check or add to the Set instance.
|
||||
// @param shouldAdd If true, the item will be added to the set if it doesn't
|
||||
// already exist.
|
||||
// @param set The set instance to check or add to.
|
||||
// @return {boolean} true if the item already existed, otherwise false.
|
||||
//
|
||||
|
||||
|
||||
return _Set;
|
||||
}();
|
||||
|
||||
function hasOrAdd(item, shouldAdd, set) {
|
||||
var type = typeof item;
|
||||
var prevSize, newSize;
|
||||
|
||||
switch (type) {
|
||||
case 'string':
|
||||
case 'number':
|
||||
// distinguish between +0 and -0
|
||||
if (item === 0 && 1 / item === -Infinity) {
|
||||
if (set._items['-0']) {
|
||||
return true;
|
||||
} else {
|
||||
if (shouldAdd) {
|
||||
set._items['-0'] = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
} // these types can all utilise the native Set
|
||||
|
||||
|
||||
if (set._nativeSet !== null) {
|
||||
if (shouldAdd) {
|
||||
prevSize = set._nativeSet.size;
|
||||
|
||||
set._nativeSet.add(item);
|
||||
|
||||
newSize = set._nativeSet.size;
|
||||
return newSize === prevSize;
|
||||
} else {
|
||||
return set._nativeSet.has(item);
|
||||
}
|
||||
} else {
|
||||
if (!(type in set._items)) {
|
||||
if (shouldAdd) {
|
||||
set._items[type] = {};
|
||||
set._items[type][item] = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
} else if (item in set._items[type]) {
|
||||
return true;
|
||||
} else {
|
||||
if (shouldAdd) {
|
||||
set._items[type][item] = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
case 'boolean':
|
||||
// set._items['boolean'] holds a two element array
|
||||
// representing [ falseExists, trueExists ]
|
||||
if (type in set._items) {
|
||||
var bIdx = item ? 1 : 0;
|
||||
|
||||
if (set._items[type][bIdx]) {
|
||||
return true;
|
||||
} else {
|
||||
if (shouldAdd) {
|
||||
set._items[type][bIdx] = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (shouldAdd) {
|
||||
set._items[type] = item ? [false, true] : [true, false];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
case 'function':
|
||||
// compare functions for reference equality
|
||||
if (set._nativeSet !== null) {
|
||||
if (shouldAdd) {
|
||||
prevSize = set._nativeSet.size;
|
||||
|
||||
set._nativeSet.add(item);
|
||||
|
||||
newSize = set._nativeSet.size;
|
||||
return newSize === prevSize;
|
||||
} else {
|
||||
return set._nativeSet.has(item);
|
||||
}
|
||||
} else {
|
||||
if (!(type in set._items)) {
|
||||
if (shouldAdd) {
|
||||
set._items[type] = [item];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_includes(item, set._items[type])) {
|
||||
if (shouldAdd) {
|
||||
set._items[type].push(item);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
case 'undefined':
|
||||
if (set._items[type]) {
|
||||
return true;
|
||||
} else {
|
||||
if (shouldAdd) {
|
||||
set._items[type] = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
case 'object':
|
||||
if (item === null) {
|
||||
if (!set._items['null']) {
|
||||
if (shouldAdd) {
|
||||
set._items['null'] = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* falls through */
|
||||
|
||||
default:
|
||||
// reduce the search size of heterogeneous sets by creating buckets
|
||||
// for each type.
|
||||
type = Object.prototype.toString.call(item);
|
||||
|
||||
if (!(type in set._items)) {
|
||||
if (shouldAdd) {
|
||||
set._items[type] = [item];
|
||||
}
|
||||
|
||||
return false;
|
||||
} // scan through all previously applied items
|
||||
|
||||
|
||||
if (!_includes(item, set._items[type])) {
|
||||
if (shouldAdd) {
|
||||
set._items[type].push(item);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
} // A simple Set type that honours R.equals semantics
|
||||
|
||||
|
||||
module.exports = _Set;
|
14
node_modules/ramda/src/internal/_aperture.js
generated
vendored
Normal file
14
node_modules/ramda/src/internal/_aperture.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
function _aperture(n, list) {
|
||||
var idx = 0;
|
||||
var limit = list.length - (n - 1);
|
||||
var acc = new Array(limit >= 0 ? limit : 0);
|
||||
|
||||
while (idx < limit) {
|
||||
acc[idx] = Array.prototype.slice.call(list, idx, idx + n);
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
module.exports = _aperture;
|
64
node_modules/ramda/src/internal/_arity.js
generated
vendored
Normal file
64
node_modules/ramda/src/internal/_arity.js
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
function _arity(n, fn) {
|
||||
/* eslint-disable no-unused-vars */
|
||||
switch (n) {
|
||||
case 0:
|
||||
return function () {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
case 1:
|
||||
return function (a0) {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
case 2:
|
||||
return function (a0, a1) {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
case 3:
|
||||
return function (a0, a1, a2) {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
case 4:
|
||||
return function (a0, a1, a2, a3) {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
case 5:
|
||||
return function (a0, a1, a2, a3, a4) {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
case 6:
|
||||
return function (a0, a1, a2, a3, a4, a5) {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
case 7:
|
||||
return function (a0, a1, a2, a3, a4, a5, a6) {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
case 8:
|
||||
return function (a0, a1, a2, a3, a4, a5, a6, a7) {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
case 9:
|
||||
return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
case 10:
|
||||
return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
default:
|
||||
throw new Error('First argument to _arity must be a non-negative integer no greater than ten');
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _arity;
|
12
node_modules/ramda/src/internal/_arrayFromIterator.js
generated
vendored
Normal file
12
node_modules/ramda/src/internal/_arrayFromIterator.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
function _arrayFromIterator(iter) {
|
||||
var list = [];
|
||||
var next;
|
||||
|
||||
while (!(next = iter.next()).done) {
|
||||
list.push(next.value);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
module.exports = _arrayFromIterator;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue