forked from waja/action-debian-package
update
This commit is contained in:
parent
d9becc67b6
commit
9308795b8b
964 changed files with 104265 additions and 16 deletions
201
node_modules/ramda/es/internal/_Set.js
generated
vendored
Normal file
201
node_modules/ramda/es/internal/_Set.js
generated
vendored
Normal file
|
@ -0,0 +1,201 @@
|
|||
import _includes from "./_includes.js";
|
||||
|
||||
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
|
||||
|
||||
|
||||
export default _Set;
|
12
node_modules/ramda/es/internal/_aperture.js
generated
vendored
Normal file
12
node_modules/ramda/es/internal/_aperture.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
export default 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;
|
||||
}
|
62
node_modules/ramda/es/internal/_arity.js
generated
vendored
Normal file
62
node_modules/ramda/es/internal/_arity.js
generated
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
export default 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');
|
||||
}
|
||||
}
|
10
node_modules/ramda/es/internal/_arrayFromIterator.js
generated
vendored
Normal file
10
node_modules/ramda/es/internal/_arrayFromIterator.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
export default function _arrayFromIterator(iter) {
|
||||
var list = [];
|
||||
var next;
|
||||
|
||||
while (!(next = iter.next()).done) {
|
||||
list.push(next.value);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
7
node_modules/ramda/es/internal/_assertPromise.js
generated
vendored
Normal file
7
node_modules/ramda/es/internal/_assertPromise.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
import _isFunction from "./_isFunction.js";
|
||||
import _toString from "./_toString.js";
|
||||
export default function _assertPromise(name, p) {
|
||||
if (p == null || !_isFunction(p.then)) {
|
||||
throw new TypeError('`' + name + '` expected a Promise, received ' + _toString(p, []));
|
||||
}
|
||||
}
|
24
node_modules/ramda/es/internal/_checkForMethod.js
generated
vendored
Normal file
24
node_modules/ramda/es/internal/_checkForMethod.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
import _isArray from "./_isArray.js";
|
||||
/**
|
||||
* This checks whether a function has a [methodname] function. If it isn't an
|
||||
* array it will execute that function otherwise it will default to the ramda
|
||||
* implementation.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} fn ramda implemtation
|
||||
* @param {String} methodname property to check for a custom implementation
|
||||
* @return {Object} Whatever the return value of the method is.
|
||||
*/
|
||||
|
||||
export default function _checkForMethod(methodname, fn) {
|
||||
return function () {
|
||||
var length = arguments.length;
|
||||
|
||||
if (length === 0) {
|
||||
return fn();
|
||||
}
|
||||
|
||||
var obj = arguments[length - 1];
|
||||
return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));
|
||||
};
|
||||
}
|
53
node_modules/ramda/es/internal/_clone.js
generated
vendored
Normal file
53
node_modules/ramda/es/internal/_clone.js
generated
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
import _cloneRegExp from "./_cloneRegExp.js";
|
||||
import type from "../type.js";
|
||||
/**
|
||||
* Copies an object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to be copied
|
||||
* @param {Array} refFrom Array containing the source references
|
||||
* @param {Array} refTo Array containing the copied source references
|
||||
* @param {Boolean} deep Whether or not to perform deep cloning.
|
||||
* @return {*} The copied value.
|
||||
*/
|
||||
|
||||
export default function _clone(value, refFrom, refTo, deep) {
|
||||
var copy = function copy(copiedValue) {
|
||||
var len = refFrom.length;
|
||||
var idx = 0;
|
||||
|
||||
while (idx < len) {
|
||||
if (value === refFrom[idx]) {
|
||||
return refTo[idx];
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
refFrom[idx + 1] = value;
|
||||
refTo[idx + 1] = copiedValue;
|
||||
|
||||
for (var key in value) {
|
||||
copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key];
|
||||
}
|
||||
|
||||
return copiedValue;
|
||||
};
|
||||
|
||||
switch (type(value)) {
|
||||
case 'Object':
|
||||
return copy({});
|
||||
|
||||
case 'Array':
|
||||
return copy([]);
|
||||
|
||||
case 'Date':
|
||||
return new Date(value.valueOf());
|
||||
|
||||
case 'RegExp':
|
||||
return _cloneRegExp(value);
|
||||
|
||||
default:
|
||||
return value;
|
||||
}
|
||||
}
|
3
node_modules/ramda/es/internal/_cloneRegExp.js
generated
vendored
Normal file
3
node_modules/ramda/es/internal/_cloneRegExp.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function _cloneRegExp(pattern) {
|
||||
return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : ''));
|
||||
}
|
5
node_modules/ramda/es/internal/_complement.js
generated
vendored
Normal file
5
node_modules/ramda/es/internal/_complement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export default function _complement(f) {
|
||||
return function () {
|
||||
return !f.apply(this, arguments);
|
||||
};
|
||||
}
|
34
node_modules/ramda/es/internal/_concat.js
generated
vendored
Normal file
34
node_modules/ramda/es/internal/_concat.js
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* Private `concat` function to merge two array-like objects.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Arguments} [set1=[]] An array-like object.
|
||||
* @param {Array|Arguments} [set2=[]] An array-like object.
|
||||
* @return {Array} A new, merged array.
|
||||
* @example
|
||||
*
|
||||
* _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]
|
||||
*/
|
||||
export default function _concat(set1, set2) {
|
||||
set1 = set1 || [];
|
||||
set2 = set2 || [];
|
||||
var idx;
|
||||
var len1 = set1.length;
|
||||
var len2 = set2.length;
|
||||
var result = [];
|
||||
idx = 0;
|
||||
|
||||
while (idx < len1) {
|
||||
result[result.length] = set1[idx];
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
idx = 0;
|
||||
|
||||
while (idx < len2) {
|
||||
result[result.length] = set2[idx];
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
9
node_modules/ramda/es/internal/_createPartialApplicator.js
generated
vendored
Normal file
9
node_modules/ramda/es/internal/_createPartialApplicator.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
import _arity from "./_arity.js";
|
||||
import _curry2 from "./_curry2.js";
|
||||
export default function _createPartialApplicator(concat) {
|
||||
return _curry2(function (fn, args) {
|
||||
return _arity(Math.max(0, fn.length - args.length), function () {
|
||||
return fn.apply(this, concat(args, arguments));
|
||||
});
|
||||
});
|
||||
}
|
19
node_modules/ramda/es/internal/_curry1.js
generated
vendored
Normal file
19
node_modules/ramda/es/internal/_curry1.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
import _isPlaceholder from "./_isPlaceholder.js";
|
||||
/**
|
||||
* Optimized internal one-arity curry function.
|
||||
*
|
||||
* @private
|
||||
* @category Function
|
||||
* @param {Function} fn The function to curry.
|
||||
* @return {Function} The curried function.
|
||||
*/
|
||||
|
||||
export default function _curry1(fn) {
|
||||
return function f1(a) {
|
||||
if (arguments.length === 0 || _isPlaceholder(a)) {
|
||||
return f1;
|
||||
} else {
|
||||
return fn.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
}
|
31
node_modules/ramda/es/internal/_curry2.js
generated
vendored
Normal file
31
node_modules/ramda/es/internal/_curry2.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
import _curry1 from "./_curry1.js";
|
||||
import _isPlaceholder from "./_isPlaceholder.js";
|
||||
/**
|
||||
* Optimized internal two-arity curry function.
|
||||
*
|
||||
* @private
|
||||
* @category Function
|
||||
* @param {Function} fn The function to curry.
|
||||
* @return {Function} The curried function.
|
||||
*/
|
||||
|
||||
export default function _curry2(fn) {
|
||||
return function f2(a, b) {
|
||||
switch (arguments.length) {
|
||||
case 0:
|
||||
return f2;
|
||||
|
||||
case 1:
|
||||
return _isPlaceholder(a) ? f2 : _curry1(function (_b) {
|
||||
return fn(a, _b);
|
||||
});
|
||||
|
||||
default:
|
||||
return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {
|
||||
return fn(_a, b);
|
||||
}) : _isPlaceholder(b) ? _curry1(function (_b) {
|
||||
return fn(a, _b);
|
||||
}) : fn(a, b);
|
||||
}
|
||||
};
|
||||
}
|
49
node_modules/ramda/es/internal/_curry3.js
generated
vendored
Normal file
49
node_modules/ramda/es/internal/_curry3.js
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
import _curry1 from "./_curry1.js";
|
||||
import _curry2 from "./_curry2.js";
|
||||
import _isPlaceholder from "./_isPlaceholder.js";
|
||||
/**
|
||||
* Optimized internal three-arity curry function.
|
||||
*
|
||||
* @private
|
||||
* @category Function
|
||||
* @param {Function} fn The function to curry.
|
||||
* @return {Function} The curried function.
|
||||
*/
|
||||
|
||||
export default function _curry3(fn) {
|
||||
return function f3(a, b, c) {
|
||||
switch (arguments.length) {
|
||||
case 0:
|
||||
return f3;
|
||||
|
||||
case 1:
|
||||
return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {
|
||||
return fn(a, _b, _c);
|
||||
});
|
||||
|
||||
case 2:
|
||||
return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {
|
||||
return fn(_a, b, _c);
|
||||
}) : _isPlaceholder(b) ? _curry2(function (_b, _c) {
|
||||
return fn(a, _b, _c);
|
||||
}) : _curry1(function (_c) {
|
||||
return fn(a, b, _c);
|
||||
});
|
||||
|
||||
default:
|
||||
return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {
|
||||
return fn(_a, _b, c);
|
||||
}) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {
|
||||
return fn(_a, b, _c);
|
||||
}) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {
|
||||
return fn(a, _b, _c);
|
||||
}) : _isPlaceholder(a) ? _curry1(function (_a) {
|
||||
return fn(_a, b, c);
|
||||
}) : _isPlaceholder(b) ? _curry1(function (_b) {
|
||||
return fn(a, _b, c);
|
||||
}) : _isPlaceholder(c) ? _curry1(function (_c) {
|
||||
return fn(a, b, _c);
|
||||
}) : fn(a, b, c);
|
||||
}
|
||||
};
|
||||
}
|
42
node_modules/ramda/es/internal/_curryN.js
generated
vendored
Normal file
42
node_modules/ramda/es/internal/_curryN.js
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
import _arity from "./_arity.js";
|
||||
import _isPlaceholder from "./_isPlaceholder.js";
|
||||
/**
|
||||
* Internal curryN function.
|
||||
*
|
||||
* @private
|
||||
* @category Function
|
||||
* @param {Number} length The arity of the curried function.
|
||||
* @param {Array} received An array of arguments received thus far.
|
||||
* @param {Function} fn The function to curry.
|
||||
* @return {Function} The curried function.
|
||||
*/
|
||||
|
||||
export default function _curryN(length, received, fn) {
|
||||
return function () {
|
||||
var combined = [];
|
||||
var argsIdx = 0;
|
||||
var left = length;
|
||||
var combinedIdx = 0;
|
||||
|
||||
while (combinedIdx < received.length || argsIdx < arguments.length) {
|
||||
var result;
|
||||
|
||||
if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) {
|
||||
result = received[combinedIdx];
|
||||
} else {
|
||||
result = arguments[argsIdx];
|
||||
argsIdx += 1;
|
||||
}
|
||||
|
||||
combined[combinedIdx] = result;
|
||||
|
||||
if (!_isPlaceholder(result)) {
|
||||
left -= 1;
|
||||
}
|
||||
|
||||
combinedIdx += 1;
|
||||
}
|
||||
|
||||
return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn));
|
||||
};
|
||||
}
|
46
node_modules/ramda/es/internal/_dispatchable.js
generated
vendored
Normal file
46
node_modules/ramda/es/internal/_dispatchable.js
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
import _isArray from "./_isArray.js";
|
||||
import _isTransformer from "./_isTransformer.js";
|
||||
/**
|
||||
* Returns a function that dispatches with different strategies based on the
|
||||
* object in list position (last argument). If it is an array, executes [fn].
|
||||
* Otherwise, if it has a function with one of the given method names, it will
|
||||
* execute that function (functor case). Otherwise, if it is a transformer,
|
||||
* uses transducer [xf] to return a new transformer (transducer case).
|
||||
* Otherwise, it will default to executing [fn].
|
||||
*
|
||||
* @private
|
||||
* @param {Array} methodNames properties to check for a custom implementation
|
||||
* @param {Function} xf transducer to initialize if object is transformer
|
||||
* @param {Function} fn default ramda implementation
|
||||
* @return {Function} A function that dispatches on object in list position
|
||||
*/
|
||||
|
||||
export default function _dispatchable(methodNames, xf, fn) {
|
||||
return function () {
|
||||
if (arguments.length === 0) {
|
||||
return fn();
|
||||
}
|
||||
|
||||
var args = Array.prototype.slice.call(arguments, 0);
|
||||
var obj = args.pop();
|
||||
|
||||
if (!_isArray(obj)) {
|
||||
var idx = 0;
|
||||
|
||||
while (idx < methodNames.length) {
|
||||
if (typeof obj[methodNames[idx]] === 'function') {
|
||||
return obj[methodNames[idx]].apply(obj, args);
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
if (_isTransformer(obj)) {
|
||||
var transducer = xf.apply(null, args);
|
||||
return transducer(obj);
|
||||
}
|
||||
}
|
||||
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
}
|
4
node_modules/ramda/es/internal/_dropLast.js
generated
vendored
Normal file
4
node_modules/ramda/es/internal/_dropLast.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import take from "../take.js";
|
||||
export default function dropLast(n, xs) {
|
||||
return take(n < xs.length ? xs.length - n : 0, xs);
|
||||
}
|
10
node_modules/ramda/es/internal/_dropLastWhile.js
generated
vendored
Normal file
10
node_modules/ramda/es/internal/_dropLastWhile.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
import slice from "../slice.js";
|
||||
export default function dropLastWhile(pred, xs) {
|
||||
var idx = xs.length - 1;
|
||||
|
||||
while (idx >= 0 && pred(xs[idx])) {
|
||||
idx -= 1;
|
||||
}
|
||||
|
||||
return slice(0, idx + 1, xs);
|
||||
}
|
166
node_modules/ramda/es/internal/_equals.js
generated
vendored
Normal file
166
node_modules/ramda/es/internal/_equals.js
generated
vendored
Normal file
|
@ -0,0 +1,166 @@
|
|||
import _arrayFromIterator from "./_arrayFromIterator.js";
|
||||
import _includesWith from "./_includesWith.js";
|
||||
import _functionName from "./_functionName.js";
|
||||
import _has from "./_has.js";
|
||||
import _objectIs from "./_objectIs.js";
|
||||
import keys from "../keys.js";
|
||||
import type from "../type.js";
|
||||
/**
|
||||
* private _uniqContentEquals function.
|
||||
* That function is checking equality of 2 iterator contents with 2 assumptions
|
||||
* - iterators lengths are the same
|
||||
* - iterators values are unique
|
||||
*
|
||||
* false-positive result will be returned for comparision of, e.g.
|
||||
* - [1,2,3] and [1,2,3,4]
|
||||
* - [1,1,1] and [1,2,3]
|
||||
* */
|
||||
|
||||
function _uniqContentEquals(aIterator, bIterator, stackA, stackB) {
|
||||
var a = _arrayFromIterator(aIterator);
|
||||
|
||||
var b = _arrayFromIterator(bIterator);
|
||||
|
||||
function eq(_a, _b) {
|
||||
return _equals(_a, _b, stackA.slice(), stackB.slice());
|
||||
} // if *a* array contains any element that is not included in *b*
|
||||
|
||||
|
||||
return !_includesWith(function (b, aItem) {
|
||||
return !_includesWith(eq, aItem, b);
|
||||
}, b, a);
|
||||
}
|
||||
|
||||
export default function _equals(a, b, stackA, stackB) {
|
||||
if (_objectIs(a, b)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var typeA = type(a);
|
||||
|
||||
if (typeA !== type(b)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a == null || b == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {
|
||||
return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);
|
||||
}
|
||||
|
||||
if (typeof a.equals === 'function' || typeof b.equals === 'function') {
|
||||
return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);
|
||||
}
|
||||
|
||||
switch (typeA) {
|
||||
case 'Arguments':
|
||||
case 'Array':
|
||||
case 'Object':
|
||||
if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {
|
||||
return a === b;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'Boolean':
|
||||
case 'Number':
|
||||
case 'String':
|
||||
if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'Date':
|
||||
if (!_objectIs(a.valueOf(), b.valueOf())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'Error':
|
||||
return a.name === b.name && a.message === b.message;
|
||||
|
||||
case 'RegExp':
|
||||
if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
var idx = stackA.length - 1;
|
||||
|
||||
while (idx >= 0) {
|
||||
if (stackA[idx] === a) {
|
||||
return stackB[idx] === b;
|
||||
}
|
||||
|
||||
idx -= 1;
|
||||
}
|
||||
|
||||
switch (typeA) {
|
||||
case 'Map':
|
||||
if (a.size !== b.size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));
|
||||
|
||||
case 'Set':
|
||||
if (a.size !== b.size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));
|
||||
|
||||
case 'Arguments':
|
||||
case 'Array':
|
||||
case 'Object':
|
||||
case 'Boolean':
|
||||
case 'Number':
|
||||
case 'String':
|
||||
case 'Date':
|
||||
case 'Error':
|
||||
case 'RegExp':
|
||||
case 'Int8Array':
|
||||
case 'Uint8Array':
|
||||
case 'Uint8ClampedArray':
|
||||
case 'Int16Array':
|
||||
case 'Uint16Array':
|
||||
case 'Int32Array':
|
||||
case 'Uint32Array':
|
||||
case 'Float32Array':
|
||||
case 'Float64Array':
|
||||
case 'ArrayBuffer':
|
||||
break;
|
||||
|
||||
default:
|
||||
// Values of other types are only equal if identical.
|
||||
return false;
|
||||
}
|
||||
|
||||
var keysA = keys(a);
|
||||
|
||||
if (keysA.length !== keys(b).length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var extendedStackA = stackA.concat([a]);
|
||||
var extendedStackB = stackB.concat([b]);
|
||||
idx = keysA.length - 1;
|
||||
|
||||
while (idx >= 0) {
|
||||
var key = keysA[idx];
|
||||
|
||||
if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
idx -= 1;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
15
node_modules/ramda/es/internal/_filter.js
generated
vendored
Normal file
15
node_modules/ramda/es/internal/_filter.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
export default function _filter(fn, list) {
|
||||
var idx = 0;
|
||||
var len = list.length;
|
||||
var result = [];
|
||||
|
||||
while (idx < len) {
|
||||
if (fn(list[idx])) {
|
||||
result[result.length] = list[idx];
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
32
node_modules/ramda/es/internal/_flatCat.js
generated
vendored
Normal file
32
node_modules/ramda/es/internal/_flatCat.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
import _forceReduced from "./_forceReduced.js";
|
||||
import _isArrayLike from "./_isArrayLike.js";
|
||||
import _reduce from "./_reduce.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var preservingReduced = function (xf) {
|
||||
return {
|
||||
'@@transducer/init': _xfBase.init,
|
||||
'@@transducer/result': function (result) {
|
||||
return xf['@@transducer/result'](result);
|
||||
},
|
||||
'@@transducer/step': function (result, input) {
|
||||
var ret = xf['@@transducer/step'](result, input);
|
||||
return ret['@@transducer/reduced'] ? _forceReduced(ret) : ret;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
var _flatCat = function _xcat(xf) {
|
||||
var rxf = preservingReduced(xf);
|
||||
return {
|
||||
'@@transducer/init': _xfBase.init,
|
||||
'@@transducer/result': function (result) {
|
||||
return rxf['@@transducer/result'](result);
|
||||
},
|
||||
'@@transducer/step': function (result, input) {
|
||||
return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export default _flatCat;
|
6
node_modules/ramda/es/internal/_forceReduced.js
generated
vendored
Normal file
6
node_modules/ramda/es/internal/_forceReduced.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
export default function _forceReduced(x) {
|
||||
return {
|
||||
'@@transducer/value': x,
|
||||
'@@transducer/reduced': true
|
||||
};
|
||||
}
|
5
node_modules/ramda/es/internal/_functionName.js
generated
vendored
Normal file
5
node_modules/ramda/es/internal/_functionName.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export default function _functionName(f) {
|
||||
// String(x => x) evaluates to "x => x", so the pattern may not match.
|
||||
var match = String(f).match(/^function (\w*)/);
|
||||
return match == null ? '' : match[1];
|
||||
}
|
14
node_modules/ramda/es/internal/_functionsWith.js
generated
vendored
Normal file
14
node_modules/ramda/es/internal/_functionsWith.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
import _filter from "./_filter.js";
|
||||
/**
|
||||
* @private
|
||||
* @param {Function} fn The strategy for extracting function names from an object
|
||||
* @return {Function} A function that takes an object and returns an array of function names.
|
||||
*/
|
||||
|
||||
export default function _functionsWith(fn) {
|
||||
return function (obj) {
|
||||
return _filter(function (key) {
|
||||
return typeof obj[key] === 'function';
|
||||
}, fn(obj));
|
||||
};
|
||||
}
|
3
node_modules/ramda/es/internal/_has.js
generated
vendored
Normal file
3
node_modules/ramda/es/internal/_has.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function _has(prop, obj) {
|
||||
return Object.prototype.hasOwnProperty.call(obj, prop);
|
||||
}
|
3
node_modules/ramda/es/internal/_identity.js
generated
vendored
Normal file
3
node_modules/ramda/es/internal/_identity.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function _identity(x) {
|
||||
return x;
|
||||
}
|
4
node_modules/ramda/es/internal/_includes.js
generated
vendored
Normal file
4
node_modules/ramda/es/internal/_includes.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import _indexOf from "./_indexOf.js";
|
||||
export default function _includes(a, list) {
|
||||
return _indexOf(list, a, 0) >= 0;
|
||||
}
|
14
node_modules/ramda/es/internal/_includesWith.js
generated
vendored
Normal file
14
node_modules/ramda/es/internal/_includesWith.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
export default function _includesWith(pred, x, list) {
|
||||
var idx = 0;
|
||||
var len = list.length;
|
||||
|
||||
while (idx < len) {
|
||||
if (pred(x, list[idx])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
67
node_modules/ramda/es/internal/_indexOf.js
generated
vendored
Normal file
67
node_modules/ramda/es/internal/_indexOf.js
generated
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
import equals from "../equals.js";
|
||||
export default function _indexOf(list, a, idx) {
|
||||
var inf, item; // Array.prototype.indexOf doesn't exist below IE9
|
||||
|
||||
if (typeof list.indexOf === 'function') {
|
||||
switch (typeof a) {
|
||||
case 'number':
|
||||
if (a === 0) {
|
||||
// manually crawl the list to distinguish between +0 and -0
|
||||
inf = 1 / a;
|
||||
|
||||
while (idx < list.length) {
|
||||
item = list[idx];
|
||||
|
||||
if (item === 0 && 1 / item === inf) {
|
||||
return idx;
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
} else if (a !== a) {
|
||||
// NaN
|
||||
while (idx < list.length) {
|
||||
item = list[idx];
|
||||
|
||||
if (typeof item === 'number' && item !== item) {
|
||||
return idx;
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
} // non-zero numbers can utilise Set
|
||||
|
||||
|
||||
return list.indexOf(a, idx);
|
||||
// all these types can utilise Set
|
||||
|
||||
case 'string':
|
||||
case 'boolean':
|
||||
case 'function':
|
||||
case 'undefined':
|
||||
return list.indexOf(a, idx);
|
||||
|
||||
case 'object':
|
||||
if (a === null) {
|
||||
// null can utilise Set
|
||||
return list.indexOf(a, idx);
|
||||
}
|
||||
|
||||
}
|
||||
} // anything else not covered above, defer to R.equals
|
||||
|
||||
|
||||
while (idx < list.length) {
|
||||
if (equals(list[idx], a)) {
|
||||
return idx;
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
14
node_modules/ramda/es/internal/_isArguments.js
generated
vendored
Normal file
14
node_modules/ramda/es/internal/_isArguments.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
import _has from "./_has.js";
|
||||
var toString = Object.prototype.toString;
|
||||
|
||||
var _isArguments =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {
|
||||
return toString.call(x) === '[object Arguments]';
|
||||
} : function _isArguments(x) {
|
||||
return _has('callee', x);
|
||||
};
|
||||
}();
|
||||
|
||||
export default _isArguments;
|
15
node_modules/ramda/es/internal/_isArray.js
generated
vendored
Normal file
15
node_modules/ramda/es/internal/_isArray.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Tests whether or not an object is an array.
|
||||
*
|
||||
* @private
|
||||
* @param {*} val The object to test.
|
||||
* @return {Boolean} `true` if `val` is an array, `false` otherwise.
|
||||
* @example
|
||||
*
|
||||
* _isArray([]); //=> true
|
||||
* _isArray(null); //=> false
|
||||
* _isArray({}); //=> false
|
||||
*/
|
||||
export default Array.isArray || function _isArray(val) {
|
||||
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';
|
||||
};
|
56
node_modules/ramda/es/internal/_isArrayLike.js
generated
vendored
Normal file
56
node_modules/ramda/es/internal/_isArrayLike.js
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
import _curry1 from "./_curry1.js";
|
||||
import _isArray from "./_isArray.js";
|
||||
import _isString from "./_isString.js";
|
||||
/**
|
||||
* Tests whether or not an object is similar to an array.
|
||||
*
|
||||
* @private
|
||||
* @category Type
|
||||
* @category List
|
||||
* @sig * -> Boolean
|
||||
* @param {*} x The object to test.
|
||||
* @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.
|
||||
* @example
|
||||
*
|
||||
* _isArrayLike([]); //=> true
|
||||
* _isArrayLike(true); //=> false
|
||||
* _isArrayLike({}); //=> false
|
||||
* _isArrayLike({length: 10}); //=> false
|
||||
* _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true
|
||||
*/
|
||||
|
||||
var _isArrayLike =
|
||||
/*#__PURE__*/
|
||||
_curry1(function isArrayLike(x) {
|
||||
if (_isArray(x)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof x !== 'object') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_isString(x)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (x.nodeType === 1) {
|
||||
return !!x.length;
|
||||
}
|
||||
|
||||
if (x.length === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (x.length > 0) {
|
||||
return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
export default _isArrayLike;
|
4
node_modules/ramda/es/internal/_isFunction.js
generated
vendored
Normal file
4
node_modules/ramda/es/internal/_isFunction.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
export default function _isFunction(x) {
|
||||
var type = Object.prototype.toString.call(x);
|
||||
return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]';
|
||||
}
|
11
node_modules/ramda/es/internal/_isInteger.js
generated
vendored
Normal file
11
node_modules/ramda/es/internal/_isInteger.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Determine if the passed argument is an integer.
|
||||
*
|
||||
* @private
|
||||
* @param {*} n
|
||||
* @category Type
|
||||
* @return {Boolean}
|
||||
*/
|
||||
export default Number.isInteger || function _isInteger(n) {
|
||||
return n << 0 === n;
|
||||
};
|
3
node_modules/ramda/es/internal/_isNumber.js
generated
vendored
Normal file
3
node_modules/ramda/es/internal/_isNumber.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function _isNumber(x) {
|
||||
return Object.prototype.toString.call(x) === '[object Number]';
|
||||
}
|
3
node_modules/ramda/es/internal/_isObject.js
generated
vendored
Normal file
3
node_modules/ramda/es/internal/_isObject.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function _isObject(x) {
|
||||
return Object.prototype.toString.call(x) === '[object Object]';
|
||||
}
|
3
node_modules/ramda/es/internal/_isPlaceholder.js
generated
vendored
Normal file
3
node_modules/ramda/es/internal/_isPlaceholder.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function _isPlaceholder(a) {
|
||||
return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
|
||||
}
|
3
node_modules/ramda/es/internal/_isRegExp.js
generated
vendored
Normal file
3
node_modules/ramda/es/internal/_isRegExp.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function _isRegExp(x) {
|
||||
return Object.prototype.toString.call(x) === '[object RegExp]';
|
||||
}
|
3
node_modules/ramda/es/internal/_isString.js
generated
vendored
Normal file
3
node_modules/ramda/es/internal/_isString.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function _isString(x) {
|
||||
return Object.prototype.toString.call(x) === '[object String]';
|
||||
}
|
3
node_modules/ramda/es/internal/_isTransformer.js
generated
vendored
Normal file
3
node_modules/ramda/es/internal/_isTransformer.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function _isTransformer(obj) {
|
||||
return obj != null && typeof obj['@@transducer/step'] === 'function';
|
||||
}
|
35
node_modules/ramda/es/internal/_makeFlat.js
generated
vendored
Normal file
35
node_modules/ramda/es/internal/_makeFlat.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
import _isArrayLike from "./_isArrayLike.js";
|
||||
/**
|
||||
* `_makeFlat` is a helper function that returns a one-level or fully recursive
|
||||
* function based on the flag passed in.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
|
||||
export default function _makeFlat(recursive) {
|
||||
return function flatt(list) {
|
||||
var value, jlen, j;
|
||||
var result = [];
|
||||
var idx = 0;
|
||||
var ilen = list.length;
|
||||
|
||||
while (idx < ilen) {
|
||||
if (_isArrayLike(list[idx])) {
|
||||
value = recursive ? flatt(list[idx]) : list[idx];
|
||||
j = 0;
|
||||
jlen = value.length;
|
||||
|
||||
while (j < jlen) {
|
||||
result[result.length] = value[j];
|
||||
j += 1;
|
||||
}
|
||||
} else {
|
||||
result[result.length] = list[idx];
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
}
|
12
node_modules/ramda/es/internal/_map.js
generated
vendored
Normal file
12
node_modules/ramda/es/internal/_map.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
export default function _map(fn, functor) {
|
||||
var idx = 0;
|
||||
var len = functor.length;
|
||||
var result = Array(len);
|
||||
|
||||
while (idx < len) {
|
||||
result[idx] = fn(functor[idx]);
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
29
node_modules/ramda/es/internal/_objectAssign.js
generated
vendored
Normal file
29
node_modules/ramda/es/internal/_objectAssign.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
import _has from "./_has.js"; // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
|
||||
|
||||
function _objectAssign(target) {
|
||||
if (target == null) {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
|
||||
var output = Object(target);
|
||||
var idx = 1;
|
||||
var length = arguments.length;
|
||||
|
||||
while (idx < length) {
|
||||
var source = arguments[idx];
|
||||
|
||||
if (source != null) {
|
||||
for (var nextKey in source) {
|
||||
if (_has(nextKey, source)) {
|
||||
output[nextKey] = source[nextKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
export default typeof Object.assign === 'function' ? Object.assign : _objectAssign;
|
14
node_modules/ramda/es/internal/_objectIs.js
generated
vendored
Normal file
14
node_modules/ramda/es/internal/_objectIs.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
||||
function _objectIs(a, b) {
|
||||
// SameValue algorithm
|
||||
if (a === b) {
|
||||
// Steps 1-5, 7-10
|
||||
// Steps 6.b-6.e: +0 != -0
|
||||
return a !== 0 || 1 / a === 1 / b;
|
||||
} else {
|
||||
// Step 6.a: NaN == NaN
|
||||
return a !== a && b !== b;
|
||||
}
|
||||
}
|
||||
|
||||
export default typeof Object.is === 'function' ? Object.is : _objectIs;
|
3
node_modules/ramda/es/internal/_of.js
generated
vendored
Normal file
3
node_modules/ramda/es/internal/_of.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function _of(x) {
|
||||
return [x];
|
||||
}
|
5
node_modules/ramda/es/internal/_pipe.js
generated
vendored
Normal file
5
node_modules/ramda/es/internal/_pipe.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export default function _pipe(f, g) {
|
||||
return function () {
|
||||
return g.call(this, f.apply(this, arguments));
|
||||
};
|
||||
}
|
8
node_modules/ramda/es/internal/_pipeP.js
generated
vendored
Normal file
8
node_modules/ramda/es/internal/_pipeP.js
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
export default function _pipeP(f, g) {
|
||||
return function () {
|
||||
var ctx = this;
|
||||
return f.apply(ctx, arguments).then(function (x) {
|
||||
return g.call(ctx, x);
|
||||
});
|
||||
};
|
||||
}
|
5
node_modules/ramda/es/internal/_quote.js
generated
vendored
Normal file
5
node_modules/ramda/es/internal/_quote.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export default function _quote(s) {
|
||||
var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace
|
||||
.replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0');
|
||||
return '"' + escaped.replace(/"/g, '\\"') + '"';
|
||||
}
|
71
node_modules/ramda/es/internal/_reduce.js
generated
vendored
Normal file
71
node_modules/ramda/es/internal/_reduce.js
generated
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
import _isArrayLike from "./_isArrayLike.js";
|
||||
import _xwrap from "./_xwrap.js";
|
||||
import bind from "../bind.js";
|
||||
|
||||
function _arrayReduce(xf, acc, list) {
|
||||
var idx = 0;
|
||||
var len = list.length;
|
||||
|
||||
while (idx < len) {
|
||||
acc = xf['@@transducer/step'](acc, list[idx]);
|
||||
|
||||
if (acc && acc['@@transducer/reduced']) {
|
||||
acc = acc['@@transducer/value'];
|
||||
break;
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return xf['@@transducer/result'](acc);
|
||||
}
|
||||
|
||||
function _iterableReduce(xf, acc, iter) {
|
||||
var step = iter.next();
|
||||
|
||||
while (!step.done) {
|
||||
acc = xf['@@transducer/step'](acc, step.value);
|
||||
|
||||
if (acc && acc['@@transducer/reduced']) {
|
||||
acc = acc['@@transducer/value'];
|
||||
break;
|
||||
}
|
||||
|
||||
step = iter.next();
|
||||
}
|
||||
|
||||
return xf['@@transducer/result'](acc);
|
||||
}
|
||||
|
||||
function _methodReduce(xf, acc, obj, methodName) {
|
||||
return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));
|
||||
}
|
||||
|
||||
var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';
|
||||
export default function _reduce(fn, acc, list) {
|
||||
if (typeof fn === 'function') {
|
||||
fn = _xwrap(fn);
|
||||
}
|
||||
|
||||
if (_isArrayLike(list)) {
|
||||
return _arrayReduce(fn, acc, list);
|
||||
}
|
||||
|
||||
if (typeof list['fantasy-land/reduce'] === 'function') {
|
||||
return _methodReduce(fn, acc, list, 'fantasy-land/reduce');
|
||||
}
|
||||
|
||||
if (list[symIterator] != null) {
|
||||
return _iterableReduce(fn, acc, list[symIterator]());
|
||||
}
|
||||
|
||||
if (typeof list.next === 'function') {
|
||||
return _iterableReduce(fn, acc, list);
|
||||
}
|
||||
|
||||
if (typeof list.reduce === 'function') {
|
||||
return _methodReduce(fn, acc, list, 'reduce');
|
||||
}
|
||||
|
||||
throw new TypeError('reduce: list must be array or iterable');
|
||||
}
|
6
node_modules/ramda/es/internal/_reduced.js
generated
vendored
Normal file
6
node_modules/ramda/es/internal/_reduced.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
export default function _reduced(x) {
|
||||
return x && x['@@transducer/reduced'] ? x : {
|
||||
'@@transducer/value': x,
|
||||
'@@transducer/reduced': true
|
||||
};
|
||||
}
|
46
node_modules/ramda/es/internal/_stepCat.js
generated
vendored
Normal file
46
node_modules/ramda/es/internal/_stepCat.js
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
import _objectAssign from "./_objectAssign.js";
|
||||
import _identity from "./_identity.js";
|
||||
import _isArrayLike from "./_isArrayLike.js";
|
||||
import _isTransformer from "./_isTransformer.js";
|
||||
import objOf from "../objOf.js";
|
||||
var _stepCatArray = {
|
||||
'@@transducer/init': Array,
|
||||
'@@transducer/step': function (xs, x) {
|
||||
xs.push(x);
|
||||
return xs;
|
||||
},
|
||||
'@@transducer/result': _identity
|
||||
};
|
||||
var _stepCatString = {
|
||||
'@@transducer/init': String,
|
||||
'@@transducer/step': function (a, b) {
|
||||
return a + b;
|
||||
},
|
||||
'@@transducer/result': _identity
|
||||
};
|
||||
var _stepCatObject = {
|
||||
'@@transducer/init': Object,
|
||||
'@@transducer/step': function (result, input) {
|
||||
return _objectAssign(result, _isArrayLike(input) ? objOf(input[0], input[1]) : input);
|
||||
},
|
||||
'@@transducer/result': _identity
|
||||
};
|
||||
export default function _stepCat(obj) {
|
||||
if (_isTransformer(obj)) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
if (_isArrayLike(obj)) {
|
||||
return _stepCatArray;
|
||||
}
|
||||
|
||||
if (typeof obj === 'string') {
|
||||
return _stepCatString;
|
||||
}
|
||||
|
||||
if (typeof obj === 'object') {
|
||||
return _stepCatObject;
|
||||
}
|
||||
|
||||
throw new Error('Cannot create transformer for ' + obj);
|
||||
}
|
14
node_modules/ramda/es/internal/_toISOString.js
generated
vendored
Normal file
14
node_modules/ramda/es/internal/_toISOString.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Polyfill from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>.
|
||||
*/
|
||||
var pad = function pad(n) {
|
||||
return (n < 10 ? '0' : '') + n;
|
||||
};
|
||||
|
||||
var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {
|
||||
return d.toISOString();
|
||||
} : function _toISOString(d) {
|
||||
return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';
|
||||
};
|
||||
|
||||
export default _toISOString;
|
58
node_modules/ramda/es/internal/_toString.js
generated
vendored
Normal file
58
node_modules/ramda/es/internal/_toString.js
generated
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
import _includes from "./_includes.js";
|
||||
import _map from "./_map.js";
|
||||
import _quote from "./_quote.js";
|
||||
import _toISOString from "./_toISOString.js";
|
||||
import keys from "../keys.js";
|
||||
import reject from "../reject.js";
|
||||
export default function _toString(x, seen) {
|
||||
var recur = function recur(y) {
|
||||
var xs = seen.concat([x]);
|
||||
return _includes(y, xs) ? '<Circular>' : _toString(y, xs);
|
||||
}; // mapPairs :: (Object, [String]) -> [String]
|
||||
|
||||
|
||||
var mapPairs = function (obj, keys) {
|
||||
return _map(function (k) {
|
||||
return _quote(k) + ': ' + recur(obj[k]);
|
||||
}, keys.slice().sort());
|
||||
};
|
||||
|
||||
switch (Object.prototype.toString.call(x)) {
|
||||
case '[object Arguments]':
|
||||
return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';
|
||||
|
||||
case '[object Array]':
|
||||
return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) {
|
||||
return /^\d+$/.test(k);
|
||||
}, keys(x)))).join(', ') + ']';
|
||||
|
||||
case '[object Boolean]':
|
||||
return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();
|
||||
|
||||
case '[object Date]':
|
||||
return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')';
|
||||
|
||||
case '[object Null]':
|
||||
return 'null';
|
||||
|
||||
case '[object Number]':
|
||||
return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10);
|
||||
|
||||
case '[object String]':
|
||||
return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x);
|
||||
|
||||
case '[object Undefined]':
|
||||
return 'undefined';
|
||||
|
||||
default:
|
||||
if (typeof x.toString === 'function') {
|
||||
var repr = x.toString();
|
||||
|
||||
if (repr !== '[object Object]') {
|
||||
return repr;
|
||||
}
|
||||
}
|
||||
|
||||
return '{' + mapPairs(x, keys(x)).join(', ') + '}';
|
||||
}
|
||||
}
|
42
node_modules/ramda/es/internal/_xall.js
generated
vendored
Normal file
42
node_modules/ramda/es/internal/_xall.js
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _reduced from "./_reduced.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XAll =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XAll(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
this.all = true;
|
||||
}
|
||||
|
||||
XAll.prototype['@@transducer/init'] = _xfBase.init;
|
||||
|
||||
XAll.prototype['@@transducer/result'] = function (result) {
|
||||
if (this.all) {
|
||||
result = this.xf['@@transducer/step'](result, true);
|
||||
}
|
||||
|
||||
return this.xf['@@transducer/result'](result);
|
||||
};
|
||||
|
||||
XAll.prototype['@@transducer/step'] = function (result, input) {
|
||||
if (!this.f(input)) {
|
||||
this.all = false;
|
||||
result = _reduced(this.xf['@@transducer/step'](result, false));
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
return XAll;
|
||||
}();
|
||||
|
||||
var _xall =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xall(f, xf) {
|
||||
return new XAll(f, xf);
|
||||
});
|
||||
|
||||
export default _xall;
|
42
node_modules/ramda/es/internal/_xany.js
generated
vendored
Normal file
42
node_modules/ramda/es/internal/_xany.js
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _reduced from "./_reduced.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XAny =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XAny(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
this.any = false;
|
||||
}
|
||||
|
||||
XAny.prototype['@@transducer/init'] = _xfBase.init;
|
||||
|
||||
XAny.prototype['@@transducer/result'] = function (result) {
|
||||
if (!this.any) {
|
||||
result = this.xf['@@transducer/step'](result, false);
|
||||
}
|
||||
|
||||
return this.xf['@@transducer/result'](result);
|
||||
};
|
||||
|
||||
XAny.prototype['@@transducer/step'] = function (result, input) {
|
||||
if (this.f(input)) {
|
||||
this.any = true;
|
||||
result = _reduced(this.xf['@@transducer/step'](result, true));
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
return XAny;
|
||||
}();
|
||||
|
||||
var _xany =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xany(f, xf) {
|
||||
return new XAny(f, xf);
|
||||
});
|
||||
|
||||
export default _xany;
|
50
node_modules/ramda/es/internal/_xaperture.js
generated
vendored
Normal file
50
node_modules/ramda/es/internal/_xaperture.js
generated
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
import _concat from "./_concat.js";
|
||||
import _curry2 from "./_curry2.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XAperture =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XAperture(n, xf) {
|
||||
this.xf = xf;
|
||||
this.pos = 0;
|
||||
this.full = false;
|
||||
this.acc = new Array(n);
|
||||
}
|
||||
|
||||
XAperture.prototype['@@transducer/init'] = _xfBase.init;
|
||||
|
||||
XAperture.prototype['@@transducer/result'] = function (result) {
|
||||
this.acc = null;
|
||||
return this.xf['@@transducer/result'](result);
|
||||
};
|
||||
|
||||
XAperture.prototype['@@transducer/step'] = function (result, input) {
|
||||
this.store(input);
|
||||
return this.full ? this.xf['@@transducer/step'](result, this.getCopy()) : result;
|
||||
};
|
||||
|
||||
XAperture.prototype.store = function (input) {
|
||||
this.acc[this.pos] = input;
|
||||
this.pos += 1;
|
||||
|
||||
if (this.pos === this.acc.length) {
|
||||
this.pos = 0;
|
||||
this.full = true;
|
||||
}
|
||||
};
|
||||
|
||||
XAperture.prototype.getCopy = function () {
|
||||
return _concat(Array.prototype.slice.call(this.acc, this.pos), Array.prototype.slice.call(this.acc, 0, this.pos));
|
||||
};
|
||||
|
||||
return XAperture;
|
||||
}();
|
||||
|
||||
var _xaperture =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xaperture(n, xf) {
|
||||
return new XAperture(n, xf);
|
||||
});
|
||||
|
||||
export default _xaperture;
|
11
node_modules/ramda/es/internal/_xchain.js
generated
vendored
Normal file
11
node_modules/ramda/es/internal/_xchain.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _flatCat from "./_flatCat.js";
|
||||
import map from "../map.js";
|
||||
|
||||
var _xchain =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xchain(f, xf) {
|
||||
return map(f, _flatCat(xf));
|
||||
});
|
||||
|
||||
export default _xchain;
|
33
node_modules/ramda/es/internal/_xdrop.js
generated
vendored
Normal file
33
node_modules/ramda/es/internal/_xdrop.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XDrop =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XDrop(n, xf) {
|
||||
this.xf = xf;
|
||||
this.n = n;
|
||||
}
|
||||
|
||||
XDrop.prototype['@@transducer/init'] = _xfBase.init;
|
||||
XDrop.prototype['@@transducer/result'] = _xfBase.result;
|
||||
|
||||
XDrop.prototype['@@transducer/step'] = function (result, input) {
|
||||
if (this.n > 0) {
|
||||
this.n -= 1;
|
||||
return result;
|
||||
}
|
||||
|
||||
return this.xf['@@transducer/step'](result, input);
|
||||
};
|
||||
|
||||
return XDrop;
|
||||
}();
|
||||
|
||||
var _xdrop =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xdrop(n, xf) {
|
||||
return new XDrop(n, xf);
|
||||
});
|
||||
|
||||
export default _xdrop;
|
49
node_modules/ramda/es/internal/_xdropLast.js
generated
vendored
Normal file
49
node_modules/ramda/es/internal/_xdropLast.js
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XDropLast =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XDropLast(n, xf) {
|
||||
this.xf = xf;
|
||||
this.pos = 0;
|
||||
this.full = false;
|
||||
this.acc = new Array(n);
|
||||
}
|
||||
|
||||
XDropLast.prototype['@@transducer/init'] = _xfBase.init;
|
||||
|
||||
XDropLast.prototype['@@transducer/result'] = function (result) {
|
||||
this.acc = null;
|
||||
return this.xf['@@transducer/result'](result);
|
||||
};
|
||||
|
||||
XDropLast.prototype['@@transducer/step'] = function (result, input) {
|
||||
if (this.full) {
|
||||
result = this.xf['@@transducer/step'](result, this.acc[this.pos]);
|
||||
}
|
||||
|
||||
this.store(input);
|
||||
return result;
|
||||
};
|
||||
|
||||
XDropLast.prototype.store = function (input) {
|
||||
this.acc[this.pos] = input;
|
||||
this.pos += 1;
|
||||
|
||||
if (this.pos === this.acc.length) {
|
||||
this.pos = 0;
|
||||
this.full = true;
|
||||
}
|
||||
};
|
||||
|
||||
return XDropLast;
|
||||
}();
|
||||
|
||||
var _xdropLast =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xdropLast(n, xf) {
|
||||
return new XDropLast(n, xf);
|
||||
});
|
||||
|
||||
export default _xdropLast;
|
45
node_modules/ramda/es/internal/_xdropLastWhile.js
generated
vendored
Normal file
45
node_modules/ramda/es/internal/_xdropLastWhile.js
generated
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _reduce from "./_reduce.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XDropLastWhile =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XDropLastWhile(fn, xf) {
|
||||
this.f = fn;
|
||||
this.retained = [];
|
||||
this.xf = xf;
|
||||
}
|
||||
|
||||
XDropLastWhile.prototype['@@transducer/init'] = _xfBase.init;
|
||||
|
||||
XDropLastWhile.prototype['@@transducer/result'] = function (result) {
|
||||
this.retained = null;
|
||||
return this.xf['@@transducer/result'](result);
|
||||
};
|
||||
|
||||
XDropLastWhile.prototype['@@transducer/step'] = function (result, input) {
|
||||
return this.f(input) ? this.retain(result, input) : this.flush(result, input);
|
||||
};
|
||||
|
||||
XDropLastWhile.prototype.flush = function (result, input) {
|
||||
result = _reduce(this.xf['@@transducer/step'], result, this.retained);
|
||||
this.retained = [];
|
||||
return this.xf['@@transducer/step'](result, input);
|
||||
};
|
||||
|
||||
XDropLastWhile.prototype.retain = function (result, input) {
|
||||
this.retained.push(input);
|
||||
return result;
|
||||
};
|
||||
|
||||
return XDropLastWhile;
|
||||
}();
|
||||
|
||||
var _xdropLastWhile =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xdropLastWhile(fn, xf) {
|
||||
return new XDropLastWhile(fn, xf);
|
||||
});
|
||||
|
||||
export default _xdropLastWhile;
|
39
node_modules/ramda/es/internal/_xdropRepeatsWith.js
generated
vendored
Normal file
39
node_modules/ramda/es/internal/_xdropRepeatsWith.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XDropRepeatsWith =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XDropRepeatsWith(pred, xf) {
|
||||
this.xf = xf;
|
||||
this.pred = pred;
|
||||
this.lastValue = undefined;
|
||||
this.seenFirstValue = false;
|
||||
}
|
||||
|
||||
XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase.init;
|
||||
XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase.result;
|
||||
|
||||
XDropRepeatsWith.prototype['@@transducer/step'] = function (result, input) {
|
||||
var sameAsLast = false;
|
||||
|
||||
if (!this.seenFirstValue) {
|
||||
this.seenFirstValue = true;
|
||||
} else if (this.pred(this.lastValue, input)) {
|
||||
sameAsLast = true;
|
||||
}
|
||||
|
||||
this.lastValue = input;
|
||||
return sameAsLast ? result : this.xf['@@transducer/step'](result, input);
|
||||
};
|
||||
|
||||
return XDropRepeatsWith;
|
||||
}();
|
||||
|
||||
var _xdropRepeatsWith =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xdropRepeatsWith(pred, xf) {
|
||||
return new XDropRepeatsWith(pred, xf);
|
||||
});
|
||||
|
||||
export default _xdropRepeatsWith;
|
36
node_modules/ramda/es/internal/_xdropWhile.js
generated
vendored
Normal file
36
node_modules/ramda/es/internal/_xdropWhile.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XDropWhile =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XDropWhile(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
XDropWhile.prototype['@@transducer/init'] = _xfBase.init;
|
||||
XDropWhile.prototype['@@transducer/result'] = _xfBase.result;
|
||||
|
||||
XDropWhile.prototype['@@transducer/step'] = function (result, input) {
|
||||
if (this.f) {
|
||||
if (this.f(input)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
this.f = null;
|
||||
}
|
||||
|
||||
return this.xf['@@transducer/step'](result, input);
|
||||
};
|
||||
|
||||
return XDropWhile;
|
||||
}();
|
||||
|
||||
var _xdropWhile =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xdropWhile(f, xf) {
|
||||
return new XDropWhile(f, xf);
|
||||
});
|
||||
|
||||
export default _xdropWhile;
|
8
node_modules/ramda/es/internal/_xfBase.js
generated
vendored
Normal file
8
node_modules/ramda/es/internal/_xfBase.js
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
export default {
|
||||
init: function () {
|
||||
return this.xf['@@transducer/init']();
|
||||
},
|
||||
result: function (result) {
|
||||
return this.xf['@@transducer/result'](result);
|
||||
}
|
||||
};
|
28
node_modules/ramda/es/internal/_xfilter.js
generated
vendored
Normal file
28
node_modules/ramda/es/internal/_xfilter.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XFilter =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XFilter(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
XFilter.prototype['@@transducer/init'] = _xfBase.init;
|
||||
XFilter.prototype['@@transducer/result'] = _xfBase.result;
|
||||
|
||||
XFilter.prototype['@@transducer/step'] = function (result, input) {
|
||||
return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;
|
||||
};
|
||||
|
||||
return XFilter;
|
||||
}();
|
||||
|
||||
var _xfilter =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xfilter(f, xf) {
|
||||
return new XFilter(f, xf);
|
||||
});
|
||||
|
||||
export default _xfilter;
|
42
node_modules/ramda/es/internal/_xfind.js
generated
vendored
Normal file
42
node_modules/ramda/es/internal/_xfind.js
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _reduced from "./_reduced.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XFind =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XFind(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
this.found = false;
|
||||
}
|
||||
|
||||
XFind.prototype['@@transducer/init'] = _xfBase.init;
|
||||
|
||||
XFind.prototype['@@transducer/result'] = function (result) {
|
||||
if (!this.found) {
|
||||
result = this.xf['@@transducer/step'](result, void 0);
|
||||
}
|
||||
|
||||
return this.xf['@@transducer/result'](result);
|
||||
};
|
||||
|
||||
XFind.prototype['@@transducer/step'] = function (result, input) {
|
||||
if (this.f(input)) {
|
||||
this.found = true;
|
||||
result = _reduced(this.xf['@@transducer/step'](result, input));
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
return XFind;
|
||||
}();
|
||||
|
||||
var _xfind =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xfind(f, xf) {
|
||||
return new XFind(f, xf);
|
||||
});
|
||||
|
||||
export default _xfind;
|
45
node_modules/ramda/es/internal/_xfindIndex.js
generated
vendored
Normal file
45
node_modules/ramda/es/internal/_xfindIndex.js
generated
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _reduced from "./_reduced.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XFindIndex =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XFindIndex(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
this.idx = -1;
|
||||
this.found = false;
|
||||
}
|
||||
|
||||
XFindIndex.prototype['@@transducer/init'] = _xfBase.init;
|
||||
|
||||
XFindIndex.prototype['@@transducer/result'] = function (result) {
|
||||
if (!this.found) {
|
||||
result = this.xf['@@transducer/step'](result, -1);
|
||||
}
|
||||
|
||||
return this.xf['@@transducer/result'](result);
|
||||
};
|
||||
|
||||
XFindIndex.prototype['@@transducer/step'] = function (result, input) {
|
||||
this.idx += 1;
|
||||
|
||||
if (this.f(input)) {
|
||||
this.found = true;
|
||||
result = _reduced(this.xf['@@transducer/step'](result, this.idx));
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
return XFindIndex;
|
||||
}();
|
||||
|
||||
var _xfindIndex =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xfindIndex(f, xf) {
|
||||
return new XFindIndex(f, xf);
|
||||
});
|
||||
|
||||
export default _xfindIndex;
|
35
node_modules/ramda/es/internal/_xfindLast.js
generated
vendored
Normal file
35
node_modules/ramda/es/internal/_xfindLast.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XFindLast =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XFindLast(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
XFindLast.prototype['@@transducer/init'] = _xfBase.init;
|
||||
|
||||
XFindLast.prototype['@@transducer/result'] = function (result) {
|
||||
return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last));
|
||||
};
|
||||
|
||||
XFindLast.prototype['@@transducer/step'] = function (result, input) {
|
||||
if (this.f(input)) {
|
||||
this.last = input;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
return XFindLast;
|
||||
}();
|
||||
|
||||
var _xfindLast =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xfindLast(f, xf) {
|
||||
return new XFindLast(f, xf);
|
||||
});
|
||||
|
||||
export default _xfindLast;
|
39
node_modules/ramda/es/internal/_xfindLastIndex.js
generated
vendored
Normal file
39
node_modules/ramda/es/internal/_xfindLastIndex.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XFindLastIndex =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XFindLastIndex(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
this.idx = -1;
|
||||
this.lastIdx = -1;
|
||||
}
|
||||
|
||||
XFindLastIndex.prototype['@@transducer/init'] = _xfBase.init;
|
||||
|
||||
XFindLastIndex.prototype['@@transducer/result'] = function (result) {
|
||||
return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.lastIdx));
|
||||
};
|
||||
|
||||
XFindLastIndex.prototype['@@transducer/step'] = function (result, input) {
|
||||
this.idx += 1;
|
||||
|
||||
if (this.f(input)) {
|
||||
this.lastIdx = this.idx;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
return XFindLastIndex;
|
||||
}();
|
||||
|
||||
var _xfindLastIndex =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xfindLastIndex(f, xf) {
|
||||
return new XFindLastIndex(f, xf);
|
||||
});
|
||||
|
||||
export default _xfindLastIndex;
|
28
node_modules/ramda/es/internal/_xmap.js
generated
vendored
Normal file
28
node_modules/ramda/es/internal/_xmap.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XMap =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XMap(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
XMap.prototype['@@transducer/init'] = _xfBase.init;
|
||||
XMap.prototype['@@transducer/result'] = _xfBase.result;
|
||||
|
||||
XMap.prototype['@@transducer/step'] = function (result, input) {
|
||||
return this.xf['@@transducer/step'](result, this.f(input));
|
||||
};
|
||||
|
||||
return XMap;
|
||||
}();
|
||||
|
||||
var _xmap =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xmap(f, xf) {
|
||||
return new XMap(f, xf);
|
||||
});
|
||||
|
||||
export default _xmap;
|
52
node_modules/ramda/es/internal/_xreduceBy.js
generated
vendored
Normal file
52
node_modules/ramda/es/internal/_xreduceBy.js
generated
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
import _curryN from "./_curryN.js";
|
||||
import _has from "./_has.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XReduceBy =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XReduceBy(valueFn, valueAcc, keyFn, xf) {
|
||||
this.valueFn = valueFn;
|
||||
this.valueAcc = valueAcc;
|
||||
this.keyFn = keyFn;
|
||||
this.xf = xf;
|
||||
this.inputs = {};
|
||||
}
|
||||
|
||||
XReduceBy.prototype['@@transducer/init'] = _xfBase.init;
|
||||
|
||||
XReduceBy.prototype['@@transducer/result'] = function (result) {
|
||||
var key;
|
||||
|
||||
for (key in this.inputs) {
|
||||
if (_has(key, this.inputs)) {
|
||||
result = this.xf['@@transducer/step'](result, this.inputs[key]);
|
||||
|
||||
if (result['@@transducer/reduced']) {
|
||||
result = result['@@transducer/value'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.inputs = null;
|
||||
return this.xf['@@transducer/result'](result);
|
||||
};
|
||||
|
||||
XReduceBy.prototype['@@transducer/step'] = function (result, input) {
|
||||
var key = this.keyFn(input);
|
||||
this.inputs[key] = this.inputs[key] || [key, this.valueAcc];
|
||||
this.inputs[key][1] = this.valueFn(this.inputs[key][1], input);
|
||||
return result;
|
||||
};
|
||||
|
||||
return XReduceBy;
|
||||
}();
|
||||
|
||||
var _xreduceBy =
|
||||
/*#__PURE__*/
|
||||
_curryN(4, [], function _xreduceBy(valueFn, valueAcc, keyFn, xf) {
|
||||
return new XReduceBy(valueFn, valueAcc, keyFn, xf);
|
||||
});
|
||||
|
||||
export default _xreduceBy;
|
32
node_modules/ramda/es/internal/_xtake.js
generated
vendored
Normal file
32
node_modules/ramda/es/internal/_xtake.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _reduced from "./_reduced.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XTake =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XTake(n, xf) {
|
||||
this.xf = xf;
|
||||
this.n = n;
|
||||
this.i = 0;
|
||||
}
|
||||
|
||||
XTake.prototype['@@transducer/init'] = _xfBase.init;
|
||||
XTake.prototype['@@transducer/result'] = _xfBase.result;
|
||||
|
||||
XTake.prototype['@@transducer/step'] = function (result, input) {
|
||||
this.i += 1;
|
||||
var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input);
|
||||
return this.n >= 0 && this.i >= this.n ? _reduced(ret) : ret;
|
||||
};
|
||||
|
||||
return XTake;
|
||||
}();
|
||||
|
||||
var _xtake =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xtake(n, xf) {
|
||||
return new XTake(n, xf);
|
||||
});
|
||||
|
||||
export default _xtake;
|
29
node_modules/ramda/es/internal/_xtakeWhile.js
generated
vendored
Normal file
29
node_modules/ramda/es/internal/_xtakeWhile.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _reduced from "./_reduced.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XTakeWhile =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XTakeWhile(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
XTakeWhile.prototype['@@transducer/init'] = _xfBase.init;
|
||||
XTakeWhile.prototype['@@transducer/result'] = _xfBase.result;
|
||||
|
||||
XTakeWhile.prototype['@@transducer/step'] = function (result, input) {
|
||||
return this.f(input) ? this.xf['@@transducer/step'](result, input) : _reduced(result);
|
||||
};
|
||||
|
||||
return XTakeWhile;
|
||||
}();
|
||||
|
||||
var _xtakeWhile =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xtakeWhile(f, xf) {
|
||||
return new XTakeWhile(f, xf);
|
||||
});
|
||||
|
||||
export default _xtakeWhile;
|
29
node_modules/ramda/es/internal/_xtap.js
generated
vendored
Normal file
29
node_modules/ramda/es/internal/_xtap.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
import _curry2 from "./_curry2.js";
|
||||
import _xfBase from "./_xfBase.js";
|
||||
|
||||
var XTap =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XTap(f, xf) {
|
||||
this.xf = xf;
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
XTap.prototype['@@transducer/init'] = _xfBase.init;
|
||||
XTap.prototype['@@transducer/result'] = _xfBase.result;
|
||||
|
||||
XTap.prototype['@@transducer/step'] = function (result, input) {
|
||||
this.f(input);
|
||||
return this.xf['@@transducer/step'](result, input);
|
||||
};
|
||||
|
||||
return XTap;
|
||||
}();
|
||||
|
||||
var _xtap =
|
||||
/*#__PURE__*/
|
||||
_curry2(function _xtap(f, xf) {
|
||||
return new XTap(f, xf);
|
||||
});
|
||||
|
||||
export default _xtap;
|
25
node_modules/ramda/es/internal/_xwrap.js
generated
vendored
Normal file
25
node_modules/ramda/es/internal/_xwrap.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
var XWrap =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function XWrap(fn) {
|
||||
this.f = fn;
|
||||
}
|
||||
|
||||
XWrap.prototype['@@transducer/init'] = function () {
|
||||
throw new Error('init not implemented on XWrap');
|
||||
};
|
||||
|
||||
XWrap.prototype['@@transducer/result'] = function (acc) {
|
||||
return acc;
|
||||
};
|
||||
|
||||
XWrap.prototype['@@transducer/step'] = function (acc, x) {
|
||||
return this.f(acc, x);
|
||||
};
|
||||
|
||||
return XWrap;
|
||||
}();
|
||||
|
||||
export default function _xwrap(fn) {
|
||||
return new XWrap(fn);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue