UNPKG

ramda-adjunct

Version:

Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.

1,314 lines (1,124 loc) 446 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("ramda")); else if(typeof define === 'function' && define.amd) define(["ramda"], factory); else if(typeof exports === 'object') exports["RA"] = factory(require("ramda")); else root["RA"] = factory(root["ramda"]); })(global, (__WEBPACK_EXTERNAL_MODULE__4871__) => { return /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ 19: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), /* harmony export */ isNaNPonyfill: () => (/* binding */ isNaNPonyfill) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isFunction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3800); /* harmony import */ var _internal_ponyfills_Number_isNaN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7221); var isNaNPonyfill = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, _internal_ponyfills_Number_isNaN_js__WEBPACK_IMPORTED_MODULE_2__["default"]); /** * Checks whether the passed value is `NaN` and its type is `Number`. * It is a more robust version of the original, global isNaN(). * * * @func isNaN * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/0.6.0|v0.6.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.isNotNaN|isNotNaN} * @example * * RA.isNaN(NaN); // => true * RA.isNaN(Number.NaN); // => true * RA.isNaN(0 / 0); // => true * * // e.g. these would have been true with global isNaN(). * RA.isNaN('NaN'); // => false * RA.isNaN(undefined); // => false * RA.isNaN({}); // => false * RA.isNaN('blabla'); // => false * * RA.isNaN(true); // => false * RA.isNaN(null); // => false * RA.isNaN(37); // => false * RA.isNaN('37'); // => false * RA.isNaN('37.37'); // => false * RA.isNaN(''); // => false * RA.isNaN(' '); // => false */ var _isNaN = (0,_isFunction_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Number.isNaN) ? (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, Number.isNaN) : isNaNPonyfill; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_isNaN); /***/ }), /***/ 30: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /** * Returns the smallest integer greater than or equal to a given number. * * Note: ceil(null) returns integer 0 and does not give a NaN error. * * @func ceil * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.15.0|v2.15.0} * @category Math * @sig Number -> Number * @param {number} number The number to ceil * @return {number} The smallest integer greater than or equal to the given number * @example * * RA.ceil(.95); //=> 1 * RA.ceil(4); //=> 4 * RA.ceil(7.004); //=> 8 * RA.ceil(-0.95); //=> -0 * RA.ceil(-4); //=> -4 * RA.ceil(-7.004); //=> -7 * RA.ceil(null); //=> 0 */ var ceil = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.bind)(Math.ceil, Math)); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ceil); /***/ }), /***/ 97: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isTruthy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1092); /** * A falsy value is a value that translates to false when evaluated in a Boolean context. * Falsy values are `false`, `0`, `""`, `null`, `undefined`, and `NaN`. * * @func isFalsy * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.2.0|v2.2..0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link https://developer.mozilla.org/en-US/docs/Glossary/Falsy|falsy}, {@link RA.isTruthy|isTruthy} * @example * * RA.isFalsy(false); // => true * RA.isFalsy(0); // => true * RA.isFalsy(''); // => true * RA.isFalsy(null); // => true * RA.isFalsy(undefined); // => true * RA.isFalsy(NaN); // => true */ var isFalsy = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.complement)(_isTruthy_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isFalsy); /***/ }), /***/ 108: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isNilOrEmpty_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9251); /** * Returns `false` if the given value is its type's empty value, `null` or `undefined`. * * @func isNotNilOrEmpty * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.18.0|v2.18.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.isNilOrEmpty|isNilOrEmpty} * @example * * RA.isNotNilOrEmpty([1, 2, 3]); //=> true * RA.isNotNilOrEmpty([]); //=> false * RA.isNotNilOrEmpty(''); //=> false * RA.isNotNilOrEmpty(null); //=> false * RA.isNotNilOrEmpty(undefined): //=> false * RA.isNotNilOrEmpty({}); //=> false * RA.isNotNilOrEmpty({length: 0}); //=> true */ var isNotNilOrEmpty = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.complement)(_isNilOrEmpty_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isNotNilOrEmpty); /***/ }), /***/ 141: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /** * A function that returns `null`. * * @func stubNull * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/1.6.0|v1.6.0} * @category Function * @sig ... -> null * @return {null} * @example * * RA.stubNull(); //=> null * RA.stubNull(1, 2, 3); //=> null */ var stubNull = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.always)(null); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubNull); /***/ }), /***/ 147: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _curryRightN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4961); /** * Returns a curried equivalent of the provided function. * This function is like curry, except that the provided arguments order is reversed. * * @func curryRight * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/1.12.0|v1.12.0} * @category Function * @sig (* -> a) -> (* -> a) * @param {Function} fn The function to curry * @return {Function} A new, curried function * @see {@link http://ramdajs.com/docs/#curry|R.curry}, {@link RA.curryRightN|curryRightN} * @example * * const concatStrings = (a, b, c) => a + b + c; * const concatStringsCurried = RA.curryRight(concatStrings); * * concatStringCurried('a')('b')('c'); // => 'cba' */ var curryRight = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.converge)(_curryRightN_js__WEBPACK_IMPORTED_MODULE_1__["default"], [ramda__WEBPACK_IMPORTED_MODULE_0__.length, ramda__WEBPACK_IMPORTED_MODULE_0__.identity]); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (curryRight); /***/ }), /***/ 155: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isInteger32_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9713); /** * Checks whether the passed value is {@link https://github.com/getify/You-Dont-Know-JS/blob/9959fc904d584bbf0b02cf41c192f74ff4238581/types-grammar/ch4.md#the-curious-case-of-the-|a sentinel value}. * * @func isSentinelValue * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.33.0|v2.33.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @example * * RA.isSentinelValue(-1); //=> true * * RA.isSentinelValue('-1'); //=> false * RA.isSentinelValue(1); //=> false * RA.isSentinelValue([-1]); //=> false */ var isSentinelValue = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, function (val) { return (0,_isInteger32_js__WEBPACK_IMPORTED_MODULE_1__["default"])(val) && ~val === 0; }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSentinelValue); /***/ }), /***/ 221: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /** * Y-combinator * * The Y combinator is an interesting function which only works with functional languages, * showing how recursion can still be done even without any variable or function declarations, * only functions and parameters * * @func Y * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.3.0|v2.3.0} * @category Function * @sig (a, ... -> b -> b) -> (a, ... -> b) * @param {Function} le Recursive function maker * @return {Function} * @see {@link http://kestas.kuliukas.com/YCombinatorExplained/|Y combinator explained} * @example * * const makeFact = givenFact => (n) => { * if (n < 2) { return 1 } * return n * givenFact(n - 1); * }; * * const factorial = RA.Y(makeFact); * * factorial(5); //=> 120 */ var Y = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, function (le) { return function (f) { return f(f); }(function (g) { return le(function (x) { return g(g)(x); }); }); }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Y); /***/ }), /***/ 249: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _internal_ap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7061); /** * "lifts" a function to be the specified arity, so that it may "map over" objects that satisfy * the fantasy land Apply spec of algebraic structures. * * Lifting is specific for {@link https://github.com/scalaz/scalaz|scalaz} and {@link http://www.functionaljava.org/|functional java} implementations. * Old version of fantasy land spec were not compatible with this approach, * but as of fantasy land 1.0.0 Apply spec also adopted this approach. * * This function acts as interop for ramda <= 0.23.0 and {@link https://monet.github.io/monet.js/|monet.js}. * * More info {@link https://github.com/fantasyland/fantasy-land/issues/50|here}. * * @func liftFN * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/1.2.0|v1.2.0} * @category Function * @sig Apply a => Number -> (a... -> a) -> (a... -> a) * @param {number} arity The arity of the lifter function * @param {Function} fn The function to lift into higher context * @return {Function} The lifted function * @see {@link http://ramdajs.com/docs/#lift|R.lift}, {@link http://ramdajs.com/docs/#ap|R.ap} * @example * * const { Maybe } = require('monet'); * * const add3 = (a, b, c) => a + b + c; * const madd3 = RA.liftFN(3, add3); * * madd3(Maybe.Some(10), Maybe.Some(15), Maybe.Some(17)); //=> Maybe.Some(42) * madd3(Maybe.Some(10), Maybe.Nothing(), Maybe.Some(17)); //=> Maybe.Nothing() */ var liftFN = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curry)(function (arity, fn) { var lifted = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(arity, fn); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(arity, function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var accumulator = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(lifted, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.head)(args)); var apps = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.slice)(1, Infinity, args); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.reduce)(_internal_ap_js__WEBPACK_IMPORTED_MODULE_1__["default"], accumulator, apps); }); }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (liftFN); /***/ }), /***/ 252: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), /* harmony export */ repeatStrInvoker: () => (/* binding */ repeatStrInvoker), /* harmony export */ repeatStrPonyfill: () => (/* binding */ repeatStrPonyfill) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _internal_ponyfills_String_repeat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1237); /* harmony import */ var _isFunction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3800); var repeatStrPonyfill = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curry)(_internal_ponyfills_String_repeat_js__WEBPACK_IMPORTED_MODULE_1__["default"]); var repeatStrInvoker = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flip)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.invoker)(1, 'repeat')); /** * Constructs and returns a new string which contains the specified * number of copies of the string on which it was called, concatenated together. * * @func repeatStr * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.11.0|v2.11.0} * @category List * @sig String -> Number -> String * @param {string} value String value to be repeated * @param {number} count An integer between 0 and +∞: [0, +∞), indicating the number of times to repeat the string in the newly-created string that is to be returned * @return {string} A new string containing the specified number of copies of the given string * @example * * RA.repeatStr('a', 3); //=> 'aaa' */ var repeatStr = (0,_isFunction_js__WEBPACK_IMPORTED_MODULE_2__["default"])(String.prototype.repeat) ? repeatStrInvoker : repeatStrPonyfill; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (repeatStr); /***/ }), /***/ 270: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _toUinteger32_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7575); /** * Checks whether the passed value is an unsigned 32 bit integer. * * @func isUinteger32 * @aliases isUint32 * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/3.2.0|v3.2.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.toUinteger32|toUinteger32} * @example * * RA.isUinteger32(0); //=> true * RA.isUinteger32(2 ** 32 - 1); //=> true * * RA.isUinteger32(Infinity); //=> false * RA.isUinteger32(NaN); //=> false * RA.isUinteger32(-1); //=> false * RA.isUinteger32(2 ** 32); //=> false */ var isUinteger32 = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, function (val) { return (0,_toUinteger32_js__WEBPACK_IMPORTED_MODULE_1__["default"])(val) === val; }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUinteger32); /***/ }), /***/ 356: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _internal_isCoercible_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9884); /** * Converts value to a number. * * @func toNumber * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.36.0|v2.36.0} * @category Type * @param {*} val The value to convert * @return {Number} * @example * * RA.toNumber(3.2); //=> 3.2 * RA.toNumber(Number.MIN_VALUE); //=> 5e-324 * RA.toNumber(Infinity); //=> Infinity * RA.toNumber('3.2'); //=> 3.2 * RA.toNumber(Symbol('3.2')); //=> NaN */ var toNumber = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.ifElse)(_internal_isCoercible_js__WEBPACK_IMPORTED_MODULE_1__["default"], Number, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.always)(NaN)); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toNumber); /***/ }), /***/ 392: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /** * Weaves a configuration into function returning the runnable monad like `Reader` or `Free`. * This allows us to pre-bind the configuration in advance and use the weaved function * without need to explicitly pass the configuration on every call. * * @func weave * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/1.7.0|v1.7.0} * @category Function * @sig (*... -> *) -> * -> (*... -> *) * @param {Function} fn The function to weave * @param {*} config The configuration to weave into fn * @return {Function} Auto-curried weaved function * @example * * const { Reader: reader } = require('monet'); * * const log = value => reader( * config => config.log(value) * ); * * // no weaving * log('test').run(console); //=> prints 'test' * * // weaving * const wlog = RA.weave(log, console); * wlog('test'); //=> prints 'test' */ var weave = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(2, function (fn, config) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(fn.length, function () { return fn.apply(void 0, arguments).run(config); }); }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (weave); /***/ }), /***/ 397: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /** * Returns true if both arguments are falsy; false otherwise. * * @func nor * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.20.0|v2.20.0} * @category Logic * @sig a -> b -> a ⊽ b * @param {*} a * @param {*} b * @return {boolean} true if both arguments are falsy * @see {@link RA.neither|neither} * @example * * RA.nor(true, true); //=> false * RA.nor(false, true); //=> false * RA.nor(true, false); //=> false * RA.nor(false, false); //=> true * RA.nor(1, 1); //=> false * RA.nor(1, 0); //=> false * RA.nor(0, 1); //=> false * RA.nor(0, 0); //=> true */ var nor = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.complement)(ramda__WEBPACK_IMPORTED_MODULE_0__.or); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (nor); /***/ }), /***/ 406: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9705); /** * Escapes the RegExp special characters. * * @func escapeRegExp * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.21.0|v2.21.0} * @category String * @sig String -> String * @param {string} val the value to escape * @return {string} * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping|MDN Regular Expressions Escaping} * @example * * RA.escapeRegExp('[ramda-adjunct](https://github.com/char0n/ramda-adjunct)'); //=> '\[ramda\-adjunct\]\(https://github\.com/char0n/ramda\-adjunct\)' */ var escapeRegExp = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.when)(_isString_js__WEBPACK_IMPORTED_MODULE_1__["default"], (0,ramda__WEBPACK_IMPORTED_MODULE_0__.replace)(/[.*+?^${}()|[\]\\-]/g, '\\$&')); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (escapeRegExp); /***/ }), /***/ 430: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _lensSatisfies_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(607); /** * Returns `true` if data structure focused by the given lens doesn't satisfy the predicate. * Note that the predicate is expected to return boolean value. * * @func lensNotSatisfy * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/1.13.0|1.13.0} * @category Relation * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Boolean b => (a -> b) -> Lens s a -> s -> b * @see {@link RA.lensSatisfies|lensSatisfies} * @param {Function} predicate The predicate function * @param {Function} lens Van Laarhoven lens * @param {*} data The data structure * @return {boolean} `false` if the focused data structure satisfies the predicate, `true` otherwise * * @example * * RA.lensNotSatisfy(RA.isTrue, R.lensIndex(0), [false, true, 1]); // => true * RA.lensNotSatisfy(RA.isTrue, R.lensIndex(1), [false, true, 1]); // => false * RA.lensNotSatisfy(RA.isTrue, R.lensIndex(2), [false, true, 1]); // => true * RA.lensNotSatisfy(R.identity, R.lensProp('x'), { x: 1 }); // => true */ var lensNotSatisfy = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.complement)(_lensSatisfies_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lensNotSatisfy); /***/ }), /***/ 451: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _internal_compareLength_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2329); /** * Returns `true` if the supplied list or string has a length greater than `valueLength`. * * @func lengthGt * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.8.0|v2.8.0} * @category List * @sig Number -> [*] -> Boolean * @param {number} valueLength The length of the list or string * @param {Array|string} value The list or string * @return {boolean} * @see {@link RA.lengthEq|lengthEq}, {@link RA.lengthNotEq|lengthNotEq}, {@link RA.lengthLt|lengthLt}, {@link RA.lengthLte|lengthLte}, {@link RA.lengthGte|lengthGte}, {@link http://ramdajs.com/docs/#gt|gt}, {@link http://ramdajs.com/docs/#length|length} * @example * * RA.lengthGt(3, [1,2,3,4]); //=> true * RA.lengthGt(3, [1,2,3]); //=> false */ var lengthGt = (0,_internal_compareLength_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,ramda__WEBPACK_IMPORTED_MODULE_0__.flip)(ramda__WEBPACK_IMPORTED_MODULE_0__.gt)); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lengthGt); /***/ }), /***/ 481: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); var pathToAscendSort = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pipe)(ramda__WEBPACK_IMPORTED_MODULE_0__.path, ramda__WEBPACK_IMPORTED_MODULE_0__.ascend); var mapPathsToAscendSort = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(pathToAscendSort); /** * Sort a list of objects by a list of paths (if first path value is equivalent, sort by second, etc). * * @func sortByPaths * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/3.1.0|v3.1.0} * @category List * @sig [[k]] -> [{k: v}] -> [{k: v}] * @param {Array.<Array.<string>>} paths A list of paths in the list param to sort by * @param {Array.<object>} list A list of objects to be sorted * @return {Array.<object>} A new list sorted by the paths in the paths param * @example * * const alice = { * name: 'Alice', * address: { * street: 31, * zipCode: 97777, * }, * }; * const bob = { * name: 'Bob', * address: { * street: 31, * zipCode: 55555, * }, * }; * const clara = { * name: 'Clara', * address: { * street: 32, * zipCode: 90210, * }, * }; * const people = [clara, bob, alice] * * RA.sortByPaths([ * ['address', 'street'], * ['address', 'zipCode'], * ], people); // => [bob, alice, clara] * * RA.sortByPaths([ * ['address', 'zipCode'], * ['address', 'street'], * ], people); // => [bob, clara, alice] */ var sortByPaths = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.useWith)(ramda__WEBPACK_IMPORTED_MODULE_0__.sortWith, [mapPathsToAscendSort, ramda__WEBPACK_IMPORTED_MODULE_0__.identity]); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (sortByPaths); /***/ }), /***/ 495: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isAsyncFunction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1586); /** * Checks if input value is complement of `Async Function` * * @func isNotAsyncFunction * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.isFunction|isFunction}, {@link RA.isAsyncFunction|isAsyncFunction}, {@link RA.isGeneratorFunction|isGeneratorFunction} * @example * * RA.isNotAsyncFunction(async function test() { }); //=> false * RA.isNotAsyncFunction(null); //=> true * RA.isNotAsyncFunction(function test() { }); //=> true * RA.isNotAsyncFunction(() => {}); //=> true */ var isNotAsyncFunction = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.complement)(_isAsyncFunction_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isNotAsyncFunction); /***/ }), /***/ 607: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isTrue_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5828); /** * Returns `true` if data structure focused by the given lens satisfies the predicate. * Note that the predicate is expected to return boolean value and will be evaluated * as `false` unless the predicate returns `true`. * * @func lensSatisfies * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/1.13.0|1.13.0} * @category Relation * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Boolean b => (a -> b) -> Lens s a -> s -> b * @see {@link RA.lensNotSatisfy|lensNotSatisfy} * @param {Function} predicate The predicate function * @param {Function} lens Van Laarhoven lens * @param {*} data The data structure * @return {boolean} `true` if the focused data structure satisfies the predicate, `false` otherwise * * @example * * RA.lensSatisfies(RA.isTrue, R.lensIndex(0), [false, true, 1]); // => false * RA.lensSatisfies(RA.isTrue, R.lensIndex(1), [false, true, 1]); // => true * RA.lensSatisfies(RA.isTrue, R.lensIndex(2), [false, true, 1]); // => false * RA.lensSatisfies(R.identity, R.lensProp('x'), { x: 1 }); // => false */ var lensSatisfies = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(3, function (predicate, lens, data) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pipe)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.view)(lens), predicate, _isTrue_js__WEBPACK_IMPORTED_MODULE_1__["default"])(data); }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lensSatisfies); /***/ }), /***/ 612: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /** * Accepts a function with any arity and returns a function with arity of zero. * The returned function ignores any arguments supplied to it. * * @func dropArgs * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.10.0|v2.10.0} * @category Logic * @sig (...a -> b)-> () -> b * @param {Function} fn The function with any arity * @return {Function} Returns function with arity of zero * @see {@link http://ramdajs.com/docs/#nAry|R.nAry} * @example * * const fn = (a = 1, b = 2) => a + b; * * RA.dropArgs(fn)('ignore1', 'ignore2'); //=> 3 */ var dropArgs = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.nAry)(0); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (dropArgs); /***/ }), /***/ 627: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** * Creates a new object with the own properties of the provided object, but a * single key is renamed from `oldKey` to `newKey`. * * Keep in mind that in the case of keys conflict is behavior undefined and * the result may vary between various JS engines! * * @func renameKey * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/4.1.0|v4.1.0} * @category Object * @sig (String a, String b) => a -> b -> {a: *} -> {b: *} * @param {!string} oldKey * @param {!string} newKey * @param {!Object} obj * @return {!Object} New object with renamed key * @see {@link https://github.com/ramda/ramda/wiki/Cookbook#rename-key-of-an-object|Ramda Cookbook}, {@link RA.renameKeyWith|renameKeyWith} * @example * * const input = { firstName: 'Elisia', age: 22, type: 'human' }; * * RA.renameKey('firstName', 'name')(input); * //=> { name: 'Elisia', age: 22, type: 'human' } */ var renameKey = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curry)(function (oldKey, newKey, obj) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.renameKeys)(_defineProperty({}, oldKey, newKey), obj); }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (renameKey); /***/ }), /***/ 633: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isFloat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3020); /** * Checks whether the passed value is complement of a `float`. * * @func isNotFloat * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/1.14.0|v1.14.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.isFloat|isFloat} * @example * * RA.isNotFloat(0); //=> true * RA.isNotFloat(1); //=> true * RA.isNotFloat(-100000); //=> true * * RA.isNotFloat(0.1); //=> false * RA.isNotFloat(Math.PI); //=> false * * RA.isNotFloat(NaN); //=> true * RA.isNotFloat(Infinity); //=> true * RA.isNotFloat(-Infinity); //=> true * RA.isNotFloat('10'); //=> true * RA.isNotFloat(true); //=> true * RA.isNotFloat(false); //=> true * RA.isNotFloat([1]); //=> true */ var isNotFloat = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.complement)(_isFloat_js__WEBPACK_IMPORTED_MODULE_1__["default"])); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isNotFloat); /***/ }), /***/ 691: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isFunction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3800); /** * Checks if input value is complement of `Function`. * * @func isNotFunction * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.isFunction|isFunction}, {@link RA.isAsyncFunction|isNotAsyncFunction}, {@link RA.isGeneratorFunction|isGeneratorFunction} * @example * * RA.isNotFunction(function test() { }); //=> false * RA.isNotFunction(function* test() { }); //=> false * RA.isNotFunction(async function test() { }); //=> false * RA.isNotFunction(() => {}); //=> false * RA.isNotFunction(null); //=> true * RA.isNotFunction('abc'); //=> true */ var isNotFunction = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.complement)(_isFunction_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isNotFunction); /***/ }), /***/ 752: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /** * Returns the largest integer less than or equal to a given number. * * Note: floor(null) returns integer 0 and do not give a NaN error. * * @func floor * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.15.0|v2.15.0} * @category Math * @sig Number -> Number * @param {number} number The number to floor * @return {number} A number representing the largest integer less than or equal to the specified number * @example * * RA.floor(45.95); //=> 45 * RA.floor(45.05); //=> 45 * RA.floor(4); //=> 4 * RA.floor(-45.05); //=> -46 * RA.floor(-45.95); //=> -46 * RA.floor(null); //=> 0 */ var floor = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.bind)(Math.floor, Math)); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (floor); /***/ }), /***/ 821: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /** * Checks if input value is the Boolean primitive `false`. Will return false for all values created * using the `Boolean` function as a constructor. * * @func isFalse * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.6.0|v2.6.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.isTrue|isTrue}, {@link RA.isTruthy|isTruthy}, {@link RA.isFalsy|isFalsy} * @example * * RA.isFalse(false); // => true * RA.isFalse(Boolean(false)); // => true * RA.isFalse(true); // => false * RA.isFalse(0); // => false * RA.isFalse(''); // => false * RA.isFalse(null); // => false * RA.isFalse(undefined); // => false * RA.isFalse(NaN); // => false * RA.isFalse([]); // => false * RA.isFalse(new Boolean(false)); // => false */ var isFalse = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.identical)(false)); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isFalse); /***/ }), /***/ 862: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /** * Returns a new list containing the contents of the given list, followed by the given element. * Like {@link http://ramdajs.com/docs/#append|R.append} but with argument order reversed. * * @func appendFlipped * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.5.0|v2.5.0} * @category List * @sig [a] -> a -> [a] * @param {Array} list The list of elements to add a new item to * @param {*} el The element to add to the end of the new list * @return {Array} A new list containing the elements of the old list followed by `el` * @see {@link http://ramdajs.com/docs/#append|R.append} * @example * * RA.appendFlipped(['write', 'more'], 'tests'); //=> ['write', 'more', 'tests'] * RA.appendFlipped([], 'tests'); //=> ['tests'] * RA.appendFlipped(['write', 'more'], ['tests']); //=> ['write', 'more', ['tests']] */ var appendFlipped = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flip)(ramda__WEBPACK_IMPORTED_MODULE_0__.append); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (appendFlipped); /***/ }), /***/ 920: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), /* harmony export */ isIntegerPonyfill: () => (/* binding */ isIntegerPonyfill) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isFunction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3800); /* harmony import */ var _internal_ponyfills_Number_isInteger_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3238); var isIntegerPonyfill = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, _internal_ponyfills_Number_isInteger_js__WEBPACK_IMPORTED_MODULE_2__["default"]); /** * Checks whether the passed value is an `integer`. * * @func isInteger * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/0.7.0|v0.7.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.isNotInteger|isNotInteger} * @example * * RA.isInteger(0); //=> true * RA.isInteger(1); //=> true * RA.isInteger(-100000); //=> true * * RA.isInteger(0.1); //=> false * RA.isInteger(Math.PI); //=> false * * RA.isInteger(NaN); //=> false * RA.isInteger(Infinity); //=> false * RA.isInteger(-Infinity); //=> false * RA.isInteger('10'); //=> false * RA.isInteger(true); //=> false * RA.isInteger(false); //=> false * RA.isInteger([1]); //=> false */ var isInteger = (0,_isFunction_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Number.isInteger) ? (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curryN)(1, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.bind)(Number.isInteger, Number)) : isIntegerPonyfill; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isInteger); /***/ }), /***/ 944: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /** * 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 second argument, if present. * * @func concatRight * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/1.11.0|v1.11.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 `secondList` * followed by the elements of `firstList`. * @see {@link http://ramdajs.com/docs/#concat|R.concat} * @example * * RA.concatRight('ABC', 'DEF'); //=> 'DEFABC' * RA.concatRight([4, 5, 6], [1, 2, 3]); //=> [1, 2, 3, 4, 5, 6] * RA.concatRight([], []); //=> [] */ var concatRight = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flip)(ramda__WEBPACK_IMPORTED_MODULE_0__.concat); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (concatRight); /***/ }), /***/ 955: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); // This implementation was highly inspired by the implementations // in ramda-lens library. // // https://github.com/ramda/ramda-lens // isomorphic :: ((a -> b), (b -> a)) -> Isomorphism // Isomorphism = x -> y var isomorphic = function isomorphic(to, from) { var isomorphism = function isomorphism(x) { return to(x); }; isomorphism.from = from; return isomorphism; }; // isomorphisms :: ((a -> b), (b -> a)) -> (a -> b) var isomorphisms = function isomorphisms(to, from) { return isomorphic((0,ramda__WEBPACK_IMPORTED_MODULE_0__.curry)(function (toFunctorFn, target) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(from, toFunctorFn(to(target))); }), (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curry)(function (toFunctorFn, target) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(to, toFunctorFn(from(target))); })); }; // from :: Isomorphism -> a -> b var from = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curry)(function (isomorphism, x) { return isomorphism.from(x); }); /** * Defines an isomorphism that will work like a lens. It takes two functions. * The function that converts and the function that recovers. * * @func lensIso * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/1.19.0|1.19.0} * @category Relation * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s * @sig (s -> a) -> (a -> s) -> Lens s a * @param {!function} to The function that converts * @param {!function} from The function that recovers * @return {!function} The isomorphic lens * @see {@link http://ramdajs.com/docs/#lens|R.lens} * * @example * * const lensJSON = RA.lensIso(JSON.parse, JSON.stringify); * * R.over(lensJSON, assoc('b', 2), '{"a":1}'); //=> '{"a":1,"b":2}' * R.over(RA.lensIso.from(lensJSON), R.replace('}', ',"b":2}'), { a: 1 }); // => { a: 1, b: 2 } */ var lensIso = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.curry)(isomorphisms); lensIso.from = from; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lensIso); /***/ }), /***/ 997: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4871); /* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9032); /** * Tests whether or not an object is similar to an array. * * @func isNotArrayLike * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.isArrayLike|isArrayLike} * @example * * RA.isNotArrayLike([]); //=> false * RA.isNotArrayLike(true); //=> true * RA.isNotArrayLike({}); //=> true * RA.isNotArrayLike({length: 10}); //=> true * RA.isNotArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> false */ var isNotArrayLike = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.complement)(_isArrayLike_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isNotArrayLike); /***/ }), /***/ 1092: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE