diff --git a/.gitignore b/.gitignore index e69de29..d7fd222 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ + node_modules + yarn-error.log \ No newline at end of file diff --git a/node_modules/.bin/loose-envify b/node_modules/.bin/loose-envify deleted file mode 120000 index ed9009c..0000000 --- a/node_modules/.bin/loose-envify +++ /dev/null @@ -1 +0,0 @@ -../loose-envify/cli.js \ No newline at end of file diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity deleted file mode 100644 index b42e002..0000000 --- a/node_modules/.yarn-integrity +++ /dev/null @@ -1,28 +0,0 @@ -{ - "nodeVersion": "v8.9.0", - "modulesFolders": [ - "node_modules" - ], - "flags": [], - "linkedModules": [], - "topLevelPatterns": [ - "lodash@^4.17.4", - "redux-persist@^5.5.0", - "reduxsauce@^0.7.0" - ], - "lockfileEntries": { - "js-tokens@^3.0.0": "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b", - "lodash-es@^4.2.1": "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7", - "lodash@^4.17.4": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae", - "lodash@^4.2.1": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae", - "loose-envify@^1.1.0": "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848", - "ramda@^0.24.1": "https://registry.yarnpkg.com/ramda/-/ramda-0.24.1.tgz#c3b7755197f35b8dc3502228262c4c91ddb6b857", - "ramdasauce@^2.0.0": "https://registry.yarnpkg.com/ramdasauce/-/ramdasauce-2.1.0.tgz#65ea157a9cfc17841a7dd6499d3f9f421dc2eb36", - "redux-persist@^5.5.0": "https://registry.yarnpkg.com/redux-persist/-/redux-persist-5.5.0.tgz#64b5030625cb6f863f76487975acb8bb4fe4f9bb", - "redux@^3.7.1": "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b", - "reduxsauce@^0.7.0": "https://registry.yarnpkg.com/reduxsauce/-/reduxsauce-0.7.0.tgz#f482377fd9f5095384ec6b247902eae06712c59b", - "symbol-observable@^1.0.3": "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.1.0.tgz#5c68fd8d54115d9dfb72a84720549222e8db9b32" - }, - "files": [], - "artifacts": {} -} \ No newline at end of file diff --git a/node_modules/js-tokens/CHANGELOG.md b/node_modules/js-tokens/CHANGELOG.md deleted file mode 100644 index 208304b..0000000 --- a/node_modules/js-tokens/CHANGELOG.md +++ /dev/null @@ -1,134 +0,0 @@ -### Version 3.0.2 (2017-06-28) ### - -- No code changes. Just updates to the readme. - - -### Version 3.0.1 (2017-01-30) ### - -- Fixed: ES2015 unicode escapes with more than 6 hex digits are now matched - correctly. - - -### Version 3.0.0 (2017-01-11) ### - -This release contains one breaking change, that should [improve performance in -V8][v8-perf]: - -> So how can you, as a JavaScript developer, ensure that your RegExps are fast? -> If you are not interested in hooking into RegExp internals, make sure that -> neither the RegExp instance, nor its prototype is modified in order to get the -> best performance: -> -> ```js -> var re = /./g; -> re.exec(''); // Fast path. -> re.new_property = 'slow'; -> ``` - -This module used to export a single regex, with `.matchToToken` bolted -on, just like in the above example. This release changes the exports of -the module to avoid this issue. - -Before: - -```js -import jsTokens from "js-tokens" -// or: -var jsTokens = require("js-tokens") -var matchToToken = jsTokens.matchToToken -``` - -After: - -```js -import jsTokens, {matchToToken} from "js-tokens" -// or: -var jsTokens = require("js-tokens").default -var matchToToken = require("js-tokens").matchToToken -``` - -[v8-perf]: http://v8project.blogspot.se/2017/01/speeding-up-v8-regular-expressions.html - - -### Version 2.0.0 (2016-06-19) ### - -- Added: Support for ES2016. In other words, support for the `**` exponentiation - operator. - -These are the breaking changes: - -- `'**'.match(jsTokens)` no longer returns `['*', '*']`, but `['**']`. -- `'**='.match(jsTokens)` no longer returns `['*', '*=']`, but `['**=']`. - - -### Version 1.0.3 (2016-03-27) ### - -- Improved: Made the regex ever so slightly smaller. -- Updated: The readme. - - -### Version 1.0.2 (2015-10-18) ### - -- Improved: Limited npm package contents for a smaller download. Thanks to - @zertosh! - - -### Version 1.0.1 (2015-06-20) ### - -- Fixed: Declared an undeclared variable. - - -### Version 1.0.0 (2015-02-26) ### - -- Changed: Merged the 'operator' and 'punctuation' types into 'punctuator'. That - type is now equivalent to the Punctuator token in the ECMAScript - specification. (Backwards-incompatible change.) -- Fixed: A `-` followed by a number is now correctly matched as a punctuator - followed by a number. It used to be matched as just a number, but there is no - such thing as negative number literals. (Possibly backwards-incompatible - change.) - - -### Version 0.4.1 (2015-02-21) ### - -- Added: Support for the regex `u` flag. - - -### Version 0.4.0 (2015-02-21) ### - -- Improved: `jsTokens.matchToToken` performance. -- Added: Support for octal and binary number literals. -- Added: Support for template strings. - - -### Version 0.3.1 (2015-01-06) ### - -- Fixed: Support for unicode spaces. They used to be allowed in names (which is - very confusing), and some unicode newlines were wrongly allowed in strings and - regexes. - - -### Version 0.3.0 (2014-12-19) ### - -- Changed: The `jsTokens.names` array has been replaced with the - `jsTokens.matchToToken` function. The capturing groups of `jsTokens` are no - longer part of the public API; instead use said function. See this [gist] for - an example. (Backwards-incompatible change.) -- Changed: The empty string is now considered an “invalid” token, instead an - “empty” token (its own group). (Backwards-incompatible change.) -- Removed: component support. (Backwards-incompatible change.) - -[gist]: https://gist.github.com/lydell/be49dbf80c382c473004 - - -### Version 0.2.0 (2014-06-19) ### - -- Changed: Match ES6 function arrows (`=>`) as an operator, instead of its own - category (“functionArrow”), for simplicity. (Backwards-incompatible change.) -- Added: ES6 splats (`...`) are now matched as an operator (instead of three - punctuations). (Backwards-incompatible change.) - - -### Version 0.1.0 (2014-03-08) ### - -- Initial release. diff --git a/node_modules/js-tokens/LICENSE b/node_modules/js-tokens/LICENSE deleted file mode 100644 index 748f42e..0000000 --- a/node_modules/js-tokens/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014, 2015, 2016, 2017 Simon Lydell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/js-tokens/README.md b/node_modules/js-tokens/README.md deleted file mode 100644 index 5c93a88..0000000 --- a/node_modules/js-tokens/README.md +++ /dev/null @@ -1,222 +0,0 @@ -Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.svg?branch=master)](https://travis-ci.org/lydell/js-tokens) -======== - -A regex that tokenizes JavaScript. - -```js -var jsTokens = require("js-tokens").default - -var jsString = "var foo=opts.foo;\n..." - -jsString.match(jsTokens) -// ["var", " ", "foo", "=", "opts", ".", "foo", ";", "\n", ...] -``` - - -Installation -============ - -`npm install js-tokens` - -```js -import jsTokens from "js-tokens" -// or: -var jsTokens = require("js-tokens").default -``` - - -Usage -===== - -### `jsTokens` ### - -A regex with the `g` flag that matches JavaScript tokens. - -The regex _always_ matches, even invalid JavaScript and the empty string. - -The next match is always directly after the previous. - -### `var token = matchToToken(match)` ### - -```js -import {matchToToken} from "js-tokens" -// or: -var matchToToken = require("js-tokens").matchToToken -``` - -Takes a `match` returned by `jsTokens.exec(string)`, and returns a `{type: -String, value: String}` object. The following types are available: - -- string -- comment -- regex -- number -- name -- punctuator -- whitespace -- invalid - -Multi-line comments and strings also have a `closed` property indicating if the -token was closed or not (see below). - -Comments and strings both come in several flavors. To distinguish them, check if -the token starts with `//`, `/*`, `'`, `"` or `` ` ``. - -Names are ECMAScript IdentifierNames, that is, including both identifiers and -keywords. You may use [is-keyword-js] to tell them apart. - -Whitespace includes both line terminators and other whitespace. - -[is-keyword-js]: https://github.com/crissdev/is-keyword-js - - -ECMAScript support -================== - -The intention is to always support the latest stable ECMAScript version. - -If adding support for a newer version requires changes, a new version with a -major verion bump will be released. - -Currently, [ECMAScript 2017] is supported. - -[ECMAScript 2017]: https://www.ecma-international.org/ecma-262/8.0/index.html - - -Invalid code handling -===================== - -Unterminated strings are still matched as strings. JavaScript strings cannot -contain (unescaped) newlines, so unterminated strings simply end at the end of -the line. Unterminated template strings can contain unescaped newlines, though, -so they go on to the end of input. - -Unterminated multi-line comments are also still matched as comments. They -simply go on to the end of the input. - -Unterminated regex literals are likely matched as division and whatever is -inside the regex. - -Invalid ASCII characters have their own capturing group. - -Invalid non-ASCII characters are treated as names, to simplify the matching of -names (except unicode spaces which are treated as whitespace). - -Regex literals may contain invalid regex syntax. They are still matched as -regex literals. They may also contain repeated regex flags, to keep the regex -simple. - -Strings may contain invalid escape sequences. - - -Limitations -=========== - -Tokenizing JavaScript using regexes—in fact, _one single regex_—won’t be -perfect. But that’s not the point either. - -You may compare jsTokens with [esprima] by using `esprima-compare.js`. -See `npm run esprima-compare`! - -[esprima]: http://esprima.org/ - -### Template string interpolation ### - -Template strings are matched as single tokens, from the starting `` ` `` to the -ending `` ` ``, including interpolations (whose tokens are not matched -individually). - -Matching template string interpolations requires recursive balancing of `{` and -`}`—something that JavaScript regexes cannot do. Only one level of nesting is -supported. - -### Division and regex literals collision ### - -Consider this example: - -```js -var g = 9.82 -var number = bar / 2/g - -var regex = / 2/g -``` - -A human can easily understand that in the `number` line we’re dealing with -division, and in the `regex` line we’re dealing with a regex literal. How come? -Because humans can look at the whole code to put the `/` characters in context. -A JavaScript regex cannot. It only sees forwards. - -When the `jsTokens` regex scans throught the above, it will see the following -at the end of both the `number` and `regex` rows: - -```js -/ 2/g -``` - -It is then impossible to know if that is a regex literal, or part of an -expression dealing with division. - -Here is a similar case: - -```js -foo /= 2/g -foo(/= 2/g) -``` - -The first line divides the `foo` variable with `2/g`. The second line calls the -`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only -sees forwards, it cannot tell the two cases apart. - -There are some cases where we _can_ tell division and regex literals apart, -though. - -First off, we have the simple cases where there’s only one slash in the line: - -```js -var foo = 2/g -foo /= 2 -``` - -Regex literals cannot contain newlines, so the above cases are correctly -identified as division. Things are only problematic when there are more than -one non-comment slash in a single line. - -Secondly, not every character is a valid regex flag. - -```js -var number = bar / 2/e -``` - -The above example is also correctly identified as division, because `e` is not a -valid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*` -(any letter) as flags, but it is not worth it since it increases the amount of -ambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are -allowed. This means that the above example will be identified as division as -long as you don’t rename the `e` variable to some permutation of `gmiyu` 1 to 5 -characters long. - -Lastly, we can look _forward_ for information. - -- If the token following what looks like a regex literal is not valid after a - regex literal, but is valid in a division expression, then the regex literal - is treated as division instead. For example, a flagless regex cannot be - followed by a string, number or name, but all of those three can be the - denominator of a division. -- Generally, if what looks like a regex literal is followed by an operator, the - regex literal is treated as division instead. This is because regexes are - seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division - could likely be part of such an expression. - -Please consult the regex source and the test cases for precise information on -when regex or division is matched (should you need to know). In short, you -could sum it up as: - -If the end of a statement looks like a regex literal (even if it isn’t), it -will be treated as one. Otherwise it should work as expected (if you write sane -code). - - -License -======= - -[MIT](LICENSE). diff --git a/node_modules/js-tokens/index.js b/node_modules/js-tokens/index.js deleted file mode 100644 index a3c8a0d..0000000 --- a/node_modules/js-tokens/index.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2014, 2015, 2016, 2017 Simon Lydell -// License: MIT. (See LICENSE.) - -Object.defineProperty(exports, "__esModule", { - value: true -}) - -// This regex comes from regex.coffee, and is inserted here by generate-index.js -// (run `npm run build`). -exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g - -exports.matchToToken = function(match) { - var token = {type: "invalid", value: match[0]} - if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4]) - else if (match[ 5]) token.type = "comment" - else if (match[ 6]) token.type = "comment", token.closed = !!match[7] - else if (match[ 8]) token.type = "regex" - else if (match[ 9]) token.type = "number" - else if (match[10]) token.type = "name" - else if (match[11]) token.type = "punctuator" - else if (match[12]) token.type = "whitespace" - return token -} diff --git a/node_modules/js-tokens/package.json b/node_modules/js-tokens/package.json deleted file mode 100644 index 7f5bd78..0000000 --- a/node_modules/js-tokens/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "js-tokens", - "version": "3.0.2", - "author": "Simon Lydell", - "license": "MIT", - "description": "A regex that tokenizes JavaScript.", - "keywords": [ - "JavaScript", - "js", - "token", - "tokenize", - "regex" - ], - "files": [ - "index.js" - ], - "repository": "lydell/js-tokens", - "scripts": { - "test": "mocha --ui tdd", - "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js", - "build": "node generate-index.js", - "dev": "npm run build && npm test" - }, - "devDependencies": { - "coffee-script": "~1.12.6", - "esprima": "^4.0.0", - "everything.js": "^1.0.3", - "mocha": "^3.4.2" - } -} diff --git a/node_modules/lodash-es/LICENSE b/node_modules/lodash-es/LICENSE deleted file mode 100644 index c6f2f61..0000000 --- a/node_modules/lodash-es/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright JS Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash-es/README.md b/node_modules/lodash-es/README.md deleted file mode 100644 index 0487f1a..0000000 --- a/node_modules/lodash-es/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# lodash-es v4.17.4 - -The [Lodash](https://lodash.com/) library exported as [ES](http://www.ecma-international.org/ecma-262/6.0/) modules. - -Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): -```shell -$ lodash modularize exports=es -o ./ -``` - -See the [package source](https://github.com/lodash/lodash/tree/4.17.4-es) for more details. diff --git a/node_modules/lodash-es/_DataView.js b/node_modules/lodash-es/_DataView.js deleted file mode 100644 index 1bbaaa1..0000000 --- a/node_modules/lodash-es/_DataView.js +++ /dev/null @@ -1,7 +0,0 @@ -import getNative from './_getNative.js'; -import root from './_root.js'; - -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'); - -export default DataView; diff --git a/node_modules/lodash-es/_Hash.js b/node_modules/lodash-es/_Hash.js deleted file mode 100644 index 8ecacb0..0000000 --- a/node_modules/lodash-es/_Hash.js +++ /dev/null @@ -1,32 +0,0 @@ -import hashClear from './_hashClear.js'; -import hashDelete from './_hashDelete.js'; -import hashGet from './_hashGet.js'; -import hashHas from './_hashHas.js'; -import hashSet from './_hashSet.js'; - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -export default Hash; diff --git a/node_modules/lodash-es/_LazyWrapper.js b/node_modules/lodash-es/_LazyWrapper.js deleted file mode 100644 index be64bf7..0000000 --- a/node_modules/lodash-es/_LazyWrapper.js +++ /dev/null @@ -1,28 +0,0 @@ -import baseCreate from './_baseCreate.js'; -import baseLodash from './_baseLodash.js'; - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295; - -/** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. - * - * @private - * @constructor - * @param {*} value The value to wrap. - */ -function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = MAX_ARRAY_LENGTH; - this.__views__ = []; -} - -// Ensure `LazyWrapper` is an instance of `baseLodash`. -LazyWrapper.prototype = baseCreate(baseLodash.prototype); -LazyWrapper.prototype.constructor = LazyWrapper; - -export default LazyWrapper; diff --git a/node_modules/lodash-es/_ListCache.js b/node_modules/lodash-es/_ListCache.js deleted file mode 100644 index bafa2af..0000000 --- a/node_modules/lodash-es/_ListCache.js +++ /dev/null @@ -1,32 +0,0 @@ -import listCacheClear from './_listCacheClear.js'; -import listCacheDelete from './_listCacheDelete.js'; -import listCacheGet from './_listCacheGet.js'; -import listCacheHas from './_listCacheHas.js'; -import listCacheSet from './_listCacheSet.js'; - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -export default ListCache; diff --git a/node_modules/lodash-es/_LodashWrapper.js b/node_modules/lodash-es/_LodashWrapper.js deleted file mode 100644 index 3f10ef0..0000000 --- a/node_modules/lodash-es/_LodashWrapper.js +++ /dev/null @@ -1,22 +0,0 @@ -import baseCreate from './_baseCreate.js'; -import baseLodash from './_baseLodash.js'; - -/** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. - */ -function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - this.__index__ = 0; - this.__values__ = undefined; -} - -LodashWrapper.prototype = baseCreate(baseLodash.prototype); -LodashWrapper.prototype.constructor = LodashWrapper; - -export default LodashWrapper; diff --git a/node_modules/lodash-es/_Map.js b/node_modules/lodash-es/_Map.js deleted file mode 100644 index 2055850..0000000 --- a/node_modules/lodash-es/_Map.js +++ /dev/null @@ -1,7 +0,0 @@ -import getNative from './_getNative.js'; -import root from './_root.js'; - -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'); - -export default Map; diff --git a/node_modules/lodash-es/_MapCache.js b/node_modules/lodash-es/_MapCache.js deleted file mode 100644 index deef22e..0000000 --- a/node_modules/lodash-es/_MapCache.js +++ /dev/null @@ -1,32 +0,0 @@ -import mapCacheClear from './_mapCacheClear.js'; -import mapCacheDelete from './_mapCacheDelete.js'; -import mapCacheGet from './_mapCacheGet.js'; -import mapCacheHas from './_mapCacheHas.js'; -import mapCacheSet from './_mapCacheSet.js'; - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; - -export default MapCache; diff --git a/node_modules/lodash-es/_Promise.js b/node_modules/lodash-es/_Promise.js deleted file mode 100644 index ce54b58..0000000 --- a/node_modules/lodash-es/_Promise.js +++ /dev/null @@ -1,7 +0,0 @@ -import getNative from './_getNative.js'; -import root from './_root.js'; - -/* Built-in method references that are verified to be native. */ -var Promise = getNative(root, 'Promise'); - -export default Promise; diff --git a/node_modules/lodash-es/_Set.js b/node_modules/lodash-es/_Set.js deleted file mode 100644 index 2f95209..0000000 --- a/node_modules/lodash-es/_Set.js +++ /dev/null @@ -1,7 +0,0 @@ -import getNative from './_getNative.js'; -import root from './_root.js'; - -/* Built-in method references that are verified to be native. */ -var Set = getNative(root, 'Set'); - -export default Set; diff --git a/node_modules/lodash-es/_SetCache.js b/node_modules/lodash-es/_SetCache.js deleted file mode 100644 index 12455ff..0000000 --- a/node_modules/lodash-es/_SetCache.js +++ /dev/null @@ -1,27 +0,0 @@ -import MapCache from './_MapCache.js'; -import setCacheAdd from './_setCacheAdd.js'; -import setCacheHas from './_setCacheHas.js'; - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; -SetCache.prototype.has = setCacheHas; - -export default SetCache; diff --git a/node_modules/lodash-es/_Stack.js b/node_modules/lodash-es/_Stack.js deleted file mode 100644 index 77c3cf3..0000000 --- a/node_modules/lodash-es/_Stack.js +++ /dev/null @@ -1,27 +0,0 @@ -import ListCache from './_ListCache.js'; -import stackClear from './_stackClear.js'; -import stackDelete from './_stackDelete.js'; -import stackGet from './_stackGet.js'; -import stackHas from './_stackHas.js'; -import stackSet from './_stackSet.js'; - -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; -} - -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; - -export default Stack; diff --git a/node_modules/lodash-es/_Symbol.js b/node_modules/lodash-es/_Symbol.js deleted file mode 100644 index 2b9341c..0000000 --- a/node_modules/lodash-es/_Symbol.js +++ /dev/null @@ -1,6 +0,0 @@ -import root from './_root.js'; - -/** Built-in value references. */ -var Symbol = root.Symbol; - -export default Symbol; diff --git a/node_modules/lodash-es/_Uint8Array.js b/node_modules/lodash-es/_Uint8Array.js deleted file mode 100644 index f463674..0000000 --- a/node_modules/lodash-es/_Uint8Array.js +++ /dev/null @@ -1,6 +0,0 @@ -import root from './_root.js'; - -/** Built-in value references. */ -var Uint8Array = root.Uint8Array; - -export default Uint8Array; diff --git a/node_modules/lodash-es/_WeakMap.js b/node_modules/lodash-es/_WeakMap.js deleted file mode 100644 index 6f97de5..0000000 --- a/node_modules/lodash-es/_WeakMap.js +++ /dev/null @@ -1,7 +0,0 @@ -import getNative from './_getNative.js'; -import root from './_root.js'; - -/* Built-in method references that are verified to be native. */ -var WeakMap = getNative(root, 'WeakMap'); - -export default WeakMap; diff --git a/node_modules/lodash-es/_addMapEntry.js b/node_modules/lodash-es/_addMapEntry.js deleted file mode 100644 index 33f57a2..0000000 --- a/node_modules/lodash-es/_addMapEntry.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Adds the key-value `pair` to `map`. - * - * @private - * @param {Object} map The map to modify. - * @param {Array} pair The key-value pair to add. - * @returns {Object} Returns `map`. - */ -function addMapEntry(map, pair) { - // Don't return `map.set` because it's not chainable in IE 11. - map.set(pair[0], pair[1]); - return map; -} - -export default addMapEntry; diff --git a/node_modules/lodash-es/_addSetEntry.js b/node_modules/lodash-es/_addSetEntry.js deleted file mode 100644 index c02b5cc..0000000 --- a/node_modules/lodash-es/_addSetEntry.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Adds `value` to `set`. - * - * @private - * @param {Object} set The set to modify. - * @param {*} value The value to add. - * @returns {Object} Returns `set`. - */ -function addSetEntry(set, value) { - // Don't return `set.add` because it's not chainable in IE 11. - set.add(value); - return set; -} - -export default addSetEntry; diff --git a/node_modules/lodash-es/_apply.js b/node_modules/lodash-es/_apply.js deleted file mode 100644 index a92f5a8..0000000 --- a/node_modules/lodash-es/_apply.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} - -export default apply; diff --git a/node_modules/lodash-es/_arrayAggregator.js b/node_modules/lodash-es/_arrayAggregator.js deleted file mode 100644 index d451879..0000000 --- a/node_modules/lodash-es/_arrayAggregator.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * A specialized version of `baseAggregator` for arrays. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ -function arrayAggregator(array, setter, iteratee, accumulator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - var value = array[index]; - setter(accumulator, value, iteratee(value), array); - } - return accumulator; -} - -export default arrayAggregator; diff --git a/node_modules/lodash-es/_arrayEach.js b/node_modules/lodash-es/_arrayEach.js deleted file mode 100644 index 2a570bf..0000000 --- a/node_modules/lodash-es/_arrayEach.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -export default arrayEach; diff --git a/node_modules/lodash-es/_arrayEachRight.js b/node_modules/lodash-es/_arrayEachRight.js deleted file mode 100644 index ce87d1a..0000000 --- a/node_modules/lodash-es/_arrayEachRight.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A specialized version of `_.forEachRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEachRight(array, iteratee) { - var length = array == null ? 0 : array.length; - - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; - } - } - return array; -} - -export default arrayEachRight; diff --git a/node_modules/lodash-es/_arrayEvery.js b/node_modules/lodash-es/_arrayEvery.js deleted file mode 100644 index 93f30a9..0000000 --- a/node_modules/lodash-es/_arrayEvery.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A specialized version of `_.every` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - */ -function arrayEvery(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; -} - -export default arrayEvery; diff --git a/node_modules/lodash-es/_arrayFilter.js b/node_modules/lodash-es/_arrayFilter.js deleted file mode 100644 index 20d3769..0000000 --- a/node_modules/lodash-es/_arrayFilter.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -export default arrayFilter; diff --git a/node_modules/lodash-es/_arrayIncludes.js b/node_modules/lodash-es/_arrayIncludes.js deleted file mode 100644 index d515af9..0000000 --- a/node_modules/lodash-es/_arrayIncludes.js +++ /dev/null @@ -1,17 +0,0 @@ -import baseIndexOf from './_baseIndexOf.js'; - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; -} - -export default arrayIncludes; diff --git a/node_modules/lodash-es/_arrayIncludesWith.js b/node_modules/lodash-es/_arrayIncludesWith.js deleted file mode 100644 index 9dedaa2..0000000 --- a/node_modules/lodash-es/_arrayIncludesWith.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -export default arrayIncludesWith; diff --git a/node_modules/lodash-es/_arrayLikeKeys.js b/node_modules/lodash-es/_arrayLikeKeys.js deleted file mode 100644 index de5d551..0000000 --- a/node_modules/lodash-es/_arrayLikeKeys.js +++ /dev/null @@ -1,49 +0,0 @@ -import baseTimes from './_baseTimes.js'; -import isArguments from './isArguments.js'; -import isArray from './isArray.js'; -import isBuffer from './isBuffer.js'; -import isIndex from './_isIndex.js'; -import isTypedArray from './isTypedArray.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; -} - -export default arrayLikeKeys; diff --git a/node_modules/lodash-es/_arrayMap.js b/node_modules/lodash-es/_arrayMap.js deleted file mode 100644 index 8d32a4e..0000000 --- a/node_modules/lodash-es/_arrayMap.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -export default arrayMap; diff --git a/node_modules/lodash-es/_arrayPush.js b/node_modules/lodash-es/_arrayPush.js deleted file mode 100644 index 3660a7d..0000000 --- a/node_modules/lodash-es/_arrayPush.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -export default arrayPush; diff --git a/node_modules/lodash-es/_arrayReduce.js b/node_modules/lodash-es/_arrayReduce.js deleted file mode 100644 index 58e1df3..0000000 --- a/node_modules/lodash-es/_arrayReduce.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -export default arrayReduce; diff --git a/node_modules/lodash-es/_arrayReduceRight.js b/node_modules/lodash-es/_arrayReduceRight.js deleted file mode 100644 index c185beb..0000000 --- a/node_modules/lodash-es/_arrayReduceRight.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * A specialized version of `_.reduceRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the last element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; -} - -export default arrayReduceRight; diff --git a/node_modules/lodash-es/_arraySample.js b/node_modules/lodash-es/_arraySample.js deleted file mode 100644 index 008596f..0000000 --- a/node_modules/lodash-es/_arraySample.js +++ /dev/null @@ -1,15 +0,0 @@ -import baseRandom from './_baseRandom.js'; - -/** - * A specialized version of `_.sample` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @returns {*} Returns the random element. - */ -function arraySample(array) { - var length = array.length; - return length ? array[baseRandom(0, length - 1)] : undefined; -} - -export default arraySample; diff --git a/node_modules/lodash-es/_arraySampleSize.js b/node_modules/lodash-es/_arraySampleSize.js deleted file mode 100644 index d5c9474..0000000 --- a/node_modules/lodash-es/_arraySampleSize.js +++ /dev/null @@ -1,17 +0,0 @@ -import baseClamp from './_baseClamp.js'; -import copyArray from './_copyArray.js'; -import shuffleSelf from './_shuffleSelf.js'; - -/** - * A specialized version of `_.sampleSize` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ -function arraySampleSize(array, n) { - return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); -} - -export default arraySampleSize; diff --git a/node_modules/lodash-es/_arrayShuffle.js b/node_modules/lodash-es/_arrayShuffle.js deleted file mode 100644 index 493e65b..0000000 --- a/node_modules/lodash-es/_arrayShuffle.js +++ /dev/null @@ -1,15 +0,0 @@ -import copyArray from './_copyArray.js'; -import shuffleSelf from './_shuffleSelf.js'; - -/** - * A specialized version of `_.shuffle` for arrays. - * - * @private - * @param {Array} array The array to shuffle. - * @returns {Array} Returns the new shuffled array. - */ -function arrayShuffle(array) { - return shuffleSelf(copyArray(array)); -} - -export default arrayShuffle; diff --git a/node_modules/lodash-es/_arraySome.js b/node_modules/lodash-es/_arraySome.js deleted file mode 100644 index d66f4c3..0000000 --- a/node_modules/lodash-es/_arraySome.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -export default arraySome; diff --git a/node_modules/lodash-es/_asciiSize.js b/node_modules/lodash-es/_asciiSize.js deleted file mode 100644 index bbf4df4..0000000 --- a/node_modules/lodash-es/_asciiSize.js +++ /dev/null @@ -1,12 +0,0 @@ -import baseProperty from './_baseProperty.js'; - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = baseProperty('length'); - -export default asciiSize; diff --git a/node_modules/lodash-es/_asciiToArray.js b/node_modules/lodash-es/_asciiToArray.js deleted file mode 100644 index 1ab7be6..0000000 --- a/node_modules/lodash-es/_asciiToArray.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function asciiToArray(string) { - return string.split(''); -} - -export default asciiToArray; diff --git a/node_modules/lodash-es/_asciiWords.js b/node_modules/lodash-es/_asciiWords.js deleted file mode 100644 index 7840636..0000000 --- a/node_modules/lodash-es/_asciiWords.js +++ /dev/null @@ -1,15 +0,0 @@ -/** Used to match words composed of alphanumeric characters. */ -var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; - -/** - * Splits an ASCII `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ -function asciiWords(string) { - return string.match(reAsciiWord) || []; -} - -export default asciiWords; diff --git a/node_modules/lodash-es/_assignMergeValue.js b/node_modules/lodash-es/_assignMergeValue.js deleted file mode 100644 index 92d0916..0000000 --- a/node_modules/lodash-es/_assignMergeValue.js +++ /dev/null @@ -1,20 +0,0 @@ -import baseAssignValue from './_baseAssignValue.js'; -import eq from './eq.js'; - -/** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} - -export default assignMergeValue; diff --git a/node_modules/lodash-es/_assignValue.js b/node_modules/lodash-es/_assignValue.js deleted file mode 100644 index c858e92..0000000 --- a/node_modules/lodash-es/_assignValue.js +++ /dev/null @@ -1,28 +0,0 @@ -import baseAssignValue from './_baseAssignValue.js'; -import eq from './eq.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} - -export default assignValue; diff --git a/node_modules/lodash-es/_assocIndexOf.js b/node_modules/lodash-es/_assocIndexOf.js deleted file mode 100644 index 88afb39..0000000 --- a/node_modules/lodash-es/_assocIndexOf.js +++ /dev/null @@ -1,21 +0,0 @@ -import eq from './eq.js'; - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -export default assocIndexOf; diff --git a/node_modules/lodash-es/_baseAggregator.js b/node_modules/lodash-es/_baseAggregator.js deleted file mode 100644 index 5bf1fdd..0000000 --- a/node_modules/lodash-es/_baseAggregator.js +++ /dev/null @@ -1,21 +0,0 @@ -import baseEach from './_baseEach.js'; - -/** - * Aggregates elements of `collection` on `accumulator` with keys transformed - * by `iteratee` and values set by `setter`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ -function baseAggregator(collection, setter, iteratee, accumulator) { - baseEach(collection, function(value, key, collection) { - setter(accumulator, value, iteratee(value), collection); - }); - return accumulator; -} - -export default baseAggregator; diff --git a/node_modules/lodash-es/_baseAssign.js b/node_modules/lodash-es/_baseAssign.js deleted file mode 100644 index 81ae5a5..0000000 --- a/node_modules/lodash-es/_baseAssign.js +++ /dev/null @@ -1,17 +0,0 @@ -import copyObject from './_copyObject.js'; -import keys from './keys.js'; - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} - -export default baseAssign; diff --git a/node_modules/lodash-es/_baseAssignIn.js b/node_modules/lodash-es/_baseAssignIn.js deleted file mode 100644 index 83c6e83..0000000 --- a/node_modules/lodash-es/_baseAssignIn.js +++ /dev/null @@ -1,17 +0,0 @@ -import copyObject from './_copyObject.js'; -import keysIn from './keysIn.js'; - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); -} - -export default baseAssignIn; diff --git a/node_modules/lodash-es/_baseAssignValue.js b/node_modules/lodash-es/_baseAssignValue.js deleted file mode 100644 index 8d55996..0000000 --- a/node_modules/lodash-es/_baseAssignValue.js +++ /dev/null @@ -1,25 +0,0 @@ -import defineProperty from './_defineProperty.js'; - -/** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } -} - -export default baseAssignValue; diff --git a/node_modules/lodash-es/_baseAt.js b/node_modules/lodash-es/_baseAt.js deleted file mode 100644 index 3947389..0000000 --- a/node_modules/lodash-es/_baseAt.js +++ /dev/null @@ -1,23 +0,0 @@ -import get from './get.js'; - -/** - * The base implementation of `_.at` without support for individual paths. - * - * @private - * @param {Object} object The object to iterate over. - * @param {string[]} paths The property paths to pick. - * @returns {Array} Returns the picked elements. - */ -function baseAt(object, paths) { - var index = -1, - length = paths.length, - result = Array(length), - skip = object == null; - - while (++index < length) { - result[index] = skip ? undefined : get(object, paths[index]); - } - return result; -} - -export default baseAt; diff --git a/node_modules/lodash-es/_baseClamp.js b/node_modules/lodash-es/_baseClamp.js deleted file mode 100644 index bf9a927..0000000 --- a/node_modules/lodash-es/_baseClamp.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * The base implementation of `_.clamp` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - */ -function baseClamp(number, lower, upper) { - if (number === number) { - if (upper !== undefined) { - number = number <= upper ? number : upper; - } - if (lower !== undefined) { - number = number >= lower ? number : lower; - } - } - return number; -} - -export default baseClamp; diff --git a/node_modules/lodash-es/_baseClone.js b/node_modules/lodash-es/_baseClone.js deleted file mode 100644 index 41959eb..0000000 --- a/node_modules/lodash-es/_baseClone.js +++ /dev/null @@ -1,153 +0,0 @@ -import Stack from './_Stack.js'; -import arrayEach from './_arrayEach.js'; -import assignValue from './_assignValue.js'; -import baseAssign from './_baseAssign.js'; -import baseAssignIn from './_baseAssignIn.js'; -import cloneBuffer from './_cloneBuffer.js'; -import copyArray from './_copyArray.js'; -import copySymbols from './_copySymbols.js'; -import copySymbolsIn from './_copySymbolsIn.js'; -import getAllKeys from './_getAllKeys.js'; -import getAllKeysIn from './_getAllKeysIn.js'; -import getTag from './_getTag.js'; -import initCloneArray from './_initCloneArray.js'; -import initCloneByTag from './_initCloneByTag.js'; -import initCloneObject from './_initCloneObject.js'; -import isArray from './isArray.js'; -import isBuffer from './isBuffer.js'; -import isObject from './isObject.js'; -import keys from './keys.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, baseClone, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); - - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -export default baseClone; diff --git a/node_modules/lodash-es/_baseConforms.js b/node_modules/lodash-es/_baseConforms.js deleted file mode 100644 index d7633c1..0000000 --- a/node_modules/lodash-es/_baseConforms.js +++ /dev/null @@ -1,18 +0,0 @@ -import baseConformsTo from './_baseConformsTo.js'; -import keys from './keys.js'; - -/** - * The base implementation of `_.conforms` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. - */ -function baseConforms(source) { - var props = keys(source); - return function(object) { - return baseConformsTo(object, source, props); - }; -} - -export default baseConforms; diff --git a/node_modules/lodash-es/_baseConformsTo.js b/node_modules/lodash-es/_baseConformsTo.js deleted file mode 100644 index 3406ec5..0000000 --- a/node_modules/lodash-es/_baseConformsTo.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * The base implementation of `_.conformsTo` which accepts `props` to check. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - */ -function baseConformsTo(object, source, props) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object(object); - while (length--) { - var key = props[length], - predicate = source[key], - value = object[key]; - - if ((value === undefined && !(key in object)) || !predicate(value)) { - return false; - } - } - return true; -} - -export default baseConformsTo; diff --git a/node_modules/lodash-es/_baseCreate.js b/node_modules/lodash-es/_baseCreate.js deleted file mode 100644 index ad1da38..0000000 --- a/node_modules/lodash-es/_baseCreate.js +++ /dev/null @@ -1,30 +0,0 @@ -import isObject from './isObject.js'; - -/** Built-in value references. */ -var objectCreate = Object.create; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ -var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; -}()); - -export default baseCreate; diff --git a/node_modules/lodash-es/_baseDelay.js b/node_modules/lodash-es/_baseDelay.js deleted file mode 100644 index 8cc5e27..0000000 --- a/node_modules/lodash-es/_baseDelay.js +++ /dev/null @@ -1,21 +0,0 @@ -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * The base implementation of `_.delay` and `_.defer` which accepts `args` - * to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Array} args The arguments to provide to `func`. - * @returns {number|Object} Returns the timer id or timeout object. - */ -function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); -} - -export default baseDelay; diff --git a/node_modules/lodash-es/_baseDifference.js b/node_modules/lodash-es/_baseDifference.js deleted file mode 100644 index 9916db7..0000000 --- a/node_modules/lodash-es/_baseDifference.js +++ /dev/null @@ -1,67 +0,0 @@ -import SetCache from './_SetCache.js'; -import arrayIncludes from './_arrayIncludes.js'; -import arrayIncludesWith from './_arrayIncludesWith.js'; -import arrayMap from './_arrayMap.js'; -import baseUnary from './_baseUnary.js'; -import cacheHas from './_cacheHas.js'; - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of methods like `_.difference` without support - * for excluding multiple arrays or iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - */ -function baseDifference(array, values, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - isCommon = true, - length = array.length, - result = [], - valuesLength = values.length; - - if (!length) { - return result; - } - if (iteratee) { - values = arrayMap(values, baseUnary(iteratee)); - } - if (comparator) { - includes = arrayIncludesWith; - isCommon = false; - } - else if (values.length >= LARGE_ARRAY_SIZE) { - includes = cacheHas; - isCommon = false; - values = new SetCache(values); - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee == null ? value : iteratee(value); - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === computed) { - continue outer; - } - } - result.push(value); - } - else if (!includes(values, computed, comparator)) { - result.push(value); - } - } - return result; -} - -export default baseDifference; diff --git a/node_modules/lodash-es/_baseEach.js b/node_modules/lodash-es/_baseEach.js deleted file mode 100644 index 038e936..0000000 --- a/node_modules/lodash-es/_baseEach.js +++ /dev/null @@ -1,14 +0,0 @@ -import baseForOwn from './_baseForOwn.js'; -import createBaseEach from './_createBaseEach.js'; - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = createBaseEach(baseForOwn); - -export default baseEach; diff --git a/node_modules/lodash-es/_baseEachRight.js b/node_modules/lodash-es/_baseEachRight.js deleted file mode 100644 index 0e4b053..0000000 --- a/node_modules/lodash-es/_baseEachRight.js +++ /dev/null @@ -1,14 +0,0 @@ -import baseForOwnRight from './_baseForOwnRight.js'; -import createBaseEach from './_createBaseEach.js'; - -/** - * The base implementation of `_.forEachRight` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEachRight = createBaseEach(baseForOwnRight, true); - -export default baseEachRight; diff --git a/node_modules/lodash-es/_baseEvery.js b/node_modules/lodash-es/_baseEvery.js deleted file mode 100644 index 2154b47..0000000 --- a/node_modules/lodash-es/_baseEvery.js +++ /dev/null @@ -1,21 +0,0 @@ -import baseEach from './_baseEach.js'; - -/** - * The base implementation of `_.every` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ -function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; -} - -export default baseEvery; diff --git a/node_modules/lodash-es/_baseExtremum.js b/node_modules/lodash-es/_baseExtremum.js deleted file mode 100644 index d154c61..0000000 --- a/node_modules/lodash-es/_baseExtremum.js +++ /dev/null @@ -1,32 +0,0 @@ -import isSymbol from './isSymbol.js'; - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !isSymbol(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -export default baseExtremum; diff --git a/node_modules/lodash-es/_baseFill.js b/node_modules/lodash-es/_baseFill.js deleted file mode 100644 index c7ef26e..0000000 --- a/node_modules/lodash-es/_baseFill.js +++ /dev/null @@ -1,32 +0,0 @@ -import toInteger from './toInteger.js'; -import toLength from './toLength.js'; - -/** - * The base implementation of `_.fill` without an iteratee call guard. - * - * @private - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - */ -function baseFill(array, value, start, end) { - var length = array.length; - - start = toInteger(start); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : toInteger(end); - if (end < 0) { - end += length; - } - end = start > end ? 0 : toLength(end); - while (start < end) { - array[start++] = value; - } - return array; -} - -export default baseFill; diff --git a/node_modules/lodash-es/_baseFilter.js b/node_modules/lodash-es/_baseFilter.js deleted file mode 100644 index 4840ed6..0000000 --- a/node_modules/lodash-es/_baseFilter.js +++ /dev/null @@ -1,21 +0,0 @@ -import baseEach from './_baseEach.js'; - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -export default baseFilter; diff --git a/node_modules/lodash-es/_baseFindIndex.js b/node_modules/lodash-es/_baseFindIndex.js deleted file mode 100644 index 860636e..0000000 --- a/node_modules/lodash-es/_baseFindIndex.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -export default baseFindIndex; diff --git a/node_modules/lodash-es/_baseFindKey.js b/node_modules/lodash-es/_baseFindKey.js deleted file mode 100644 index 6d1932e..0000000 --- a/node_modules/lodash-es/_baseFindKey.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The base implementation of methods like `_.findKey` and `_.findLastKey`, - * without support for iteratee shorthands, which iterates over `collection` - * using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the found element or its key, else `undefined`. - */ -function baseFindKey(collection, predicate, eachFunc) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = key; - return false; - } - }); - return result; -} - -export default baseFindKey; diff --git a/node_modules/lodash-es/_baseFlatten.js b/node_modules/lodash-es/_baseFlatten.js deleted file mode 100644 index b42dee6..0000000 --- a/node_modules/lodash-es/_baseFlatten.js +++ /dev/null @@ -1,38 +0,0 @@ -import arrayPush from './_arrayPush.js'; -import isFlattenable from './_isFlattenable.js'; - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -export default baseFlatten; diff --git a/node_modules/lodash-es/_baseFor.js b/node_modules/lodash-es/_baseFor.js deleted file mode 100644 index debbcf8..0000000 --- a/node_modules/lodash-es/_baseFor.js +++ /dev/null @@ -1,16 +0,0 @@ -import createBaseFor from './_createBaseFor.js'; - -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -export default baseFor; diff --git a/node_modules/lodash-es/_baseForOwn.js b/node_modules/lodash-es/_baseForOwn.js deleted file mode 100644 index 2293e9a..0000000 --- a/node_modules/lodash-es/_baseForOwn.js +++ /dev/null @@ -1,16 +0,0 @@ -import baseFor from './_baseFor.js'; -import keys from './keys.js'; - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); -} - -export default baseForOwn; diff --git a/node_modules/lodash-es/_baseForOwnRight.js b/node_modules/lodash-es/_baseForOwnRight.js deleted file mode 100644 index 06871b4..0000000 --- a/node_modules/lodash-es/_baseForOwnRight.js +++ /dev/null @@ -1,16 +0,0 @@ -import baseForRight from './_baseForRight.js'; -import keys from './keys.js'; - -/** - * The base implementation of `_.forOwnRight` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwnRight(object, iteratee) { - return object && baseForRight(object, iteratee, keys); -} - -export default baseForOwnRight; diff --git a/node_modules/lodash-es/_baseForRight.js b/node_modules/lodash-es/_baseForRight.js deleted file mode 100644 index 85596da..0000000 --- a/node_modules/lodash-es/_baseForRight.js +++ /dev/null @@ -1,15 +0,0 @@ -import createBaseFor from './_createBaseFor.js'; - -/** - * This function is like `baseFor` except that it iterates over properties - * in the opposite order. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseForRight = createBaseFor(true); - -export default baseForRight; diff --git a/node_modules/lodash-es/_baseFunctions.js b/node_modules/lodash-es/_baseFunctions.js deleted file mode 100644 index 35a875e..0000000 --- a/node_modules/lodash-es/_baseFunctions.js +++ /dev/null @@ -1,19 +0,0 @@ -import arrayFilter from './_arrayFilter.js'; -import isFunction from './isFunction.js'; - -/** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. - */ -function baseFunctions(object, props) { - return arrayFilter(props, function(key) { - return isFunction(object[key]); - }); -} - -export default baseFunctions; diff --git a/node_modules/lodash-es/_baseGet.js b/node_modules/lodash-es/_baseGet.js deleted file mode 100644 index 16a2912..0000000 --- a/node_modules/lodash-es/_baseGet.js +++ /dev/null @@ -1,24 +0,0 @@ -import castPath from './_castPath.js'; -import toKey from './_toKey.js'; - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = castPath(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -export default baseGet; diff --git a/node_modules/lodash-es/_baseGetAllKeys.js b/node_modules/lodash-es/_baseGetAllKeys.js deleted file mode 100644 index af5533b..0000000 --- a/node_modules/lodash-es/_baseGetAllKeys.js +++ /dev/null @@ -1,20 +0,0 @@ -import arrayPush from './_arrayPush.js'; -import isArray from './isArray.js'; - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} - -export default baseGetAllKeys; diff --git a/node_modules/lodash-es/_baseGetTag.js b/node_modules/lodash-es/_baseGetTag.js deleted file mode 100644 index 61b440a..0000000 --- a/node_modules/lodash-es/_baseGetTag.js +++ /dev/null @@ -1,28 +0,0 @@ -import Symbol from './_Symbol.js'; -import getRawTag from './_getRawTag.js'; -import objectToString from './_objectToString.js'; - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -export default baseGetTag; diff --git a/node_modules/lodash-es/_baseGt.js b/node_modules/lodash-es/_baseGt.js deleted file mode 100644 index 998cf15..0000000 --- a/node_modules/lodash-es/_baseGt.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -export default baseGt; diff --git a/node_modules/lodash-es/_baseHas.js b/node_modules/lodash-es/_baseHas.js deleted file mode 100644 index edbbe5f..0000000 --- a/node_modules/lodash-es/_baseHas.js +++ /dev/null @@ -1,19 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); -} - -export default baseHas; diff --git a/node_modules/lodash-es/_baseHasIn.js b/node_modules/lodash-es/_baseHasIn.js deleted file mode 100644 index ee48bc1..0000000 --- a/node_modules/lodash-es/_baseHasIn.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -export default baseHasIn; diff --git a/node_modules/lodash-es/_baseInRange.js b/node_modules/lodash-es/_baseInRange.js deleted file mode 100644 index 4b249a5..0000000 --- a/node_modules/lodash-es/_baseInRange.js +++ /dev/null @@ -1,18 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * The base implementation of `_.inRange` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to check. - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - */ -function baseInRange(number, start, end) { - return number >= nativeMin(start, end) && number < nativeMax(start, end); -} - -export default baseInRange; diff --git a/node_modules/lodash-es/_baseIndexOf.js b/node_modules/lodash-es/_baseIndexOf.js deleted file mode 100644 index 027e11d..0000000 --- a/node_modules/lodash-es/_baseIndexOf.js +++ /dev/null @@ -1,20 +0,0 @@ -import baseFindIndex from './_baseFindIndex.js'; -import baseIsNaN from './_baseIsNaN.js'; -import strictIndexOf from './_strictIndexOf.js'; - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); -} - -export default baseIndexOf; diff --git a/node_modules/lodash-es/_baseIndexOfWith.js b/node_modules/lodash-es/_baseIndexOfWith.js deleted file mode 100644 index 38831b2..0000000 --- a/node_modules/lodash-es/_baseIndexOfWith.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This function is like `baseIndexOf` except that it accepts a comparator. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @param {Function} comparator The comparator invoked per element. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (comparator(array[index], value)) { - return index; - } - } - return -1; -} - -export default baseIndexOfWith; diff --git a/node_modules/lodash-es/_baseIntersection.js b/node_modules/lodash-es/_baseIntersection.js deleted file mode 100644 index dede696..0000000 --- a/node_modules/lodash-es/_baseIntersection.js +++ /dev/null @@ -1,74 +0,0 @@ -import SetCache from './_SetCache.js'; -import arrayIncludes from './_arrayIncludes.js'; -import arrayIncludesWith from './_arrayIncludesWith.js'; -import arrayMap from './_arrayMap.js'; -import baseUnary from './_baseUnary.js'; -import cacheHas from './_cacheHas.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * The base implementation of methods like `_.intersection`, without support - * for iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. - */ -function baseIntersection(arrays, iteratee, comparator) { - var includes = comparator ? arrayIncludesWith : arrayIncludes, - length = arrays[0].length, - othLength = arrays.length, - othIndex = othLength, - caches = Array(othLength), - maxLength = Infinity, - result = []; - - while (othIndex--) { - var array = arrays[othIndex]; - if (othIndex && iteratee) { - array = arrayMap(array, baseUnary(iteratee)); - } - maxLength = nativeMin(array.length, maxLength); - caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) - ? new SetCache(othIndex && array) - : undefined; - } - array = arrays[0]; - - var index = -1, - seen = caches[0]; - - outer: - while (++index < length && result.length < maxLength) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (!(seen - ? cacheHas(seen, computed) - : includes(result, computed, comparator) - )) { - othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if (!(cache - ? cacheHas(cache, computed) - : includes(arrays[othIndex], computed, comparator)) - ) { - continue outer; - } - } - if (seen) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -export default baseIntersection; diff --git a/node_modules/lodash-es/_baseInverter.js b/node_modules/lodash-es/_baseInverter.js deleted file mode 100644 index 5cb3800..0000000 --- a/node_modules/lodash-es/_baseInverter.js +++ /dev/null @@ -1,21 +0,0 @@ -import baseForOwn from './_baseForOwn.js'; - -/** - * The base implementation of `_.invert` and `_.invertBy` which inverts - * `object` with values transformed by `iteratee` and set by `setter`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform values. - * @param {Object} accumulator The initial inverted object. - * @returns {Function} Returns `accumulator`. - */ -function baseInverter(object, setter, iteratee, accumulator) { - baseForOwn(object, function(value, key, object) { - setter(accumulator, iteratee(value), key, object); - }); - return accumulator; -} - -export default baseInverter; diff --git a/node_modules/lodash-es/_baseInvoke.js b/node_modules/lodash-es/_baseInvoke.js deleted file mode 100644 index e465d84..0000000 --- a/node_modules/lodash-es/_baseInvoke.js +++ /dev/null @@ -1,24 +0,0 @@ -import apply from './_apply.js'; -import castPath from './_castPath.js'; -import last from './last.js'; -import parent from './_parent.js'; -import toKey from './_toKey.js'; - -/** - * The base implementation of `_.invoke` without support for individual - * method arguments. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {Array} args The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - */ -function baseInvoke(object, path, args) { - path = castPath(path, object); - object = parent(object, path); - var func = object == null ? object : object[toKey(last(path))]; - return func == null ? undefined : apply(func, object, args); -} - -export default baseInvoke; diff --git a/node_modules/lodash-es/_baseIsArguments.js b/node_modules/lodash-es/_baseIsArguments.js deleted file mode 100644 index cbf4ca6..0000000 --- a/node_modules/lodash-es/_baseIsArguments.js +++ /dev/null @@ -1,18 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; - -/** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; -} - -export default baseIsArguments; diff --git a/node_modules/lodash-es/_baseIsArrayBuffer.js b/node_modules/lodash-es/_baseIsArrayBuffer.js deleted file mode 100644 index 7a25a8f..0000000 --- a/node_modules/lodash-es/_baseIsArrayBuffer.js +++ /dev/null @@ -1,17 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isObjectLike from './isObjectLike.js'; - -var arrayBufferTag = '[object ArrayBuffer]'; - -/** - * The base implementation of `_.isArrayBuffer` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - */ -function baseIsArrayBuffer(value) { - return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; -} - -export default baseIsArrayBuffer; diff --git a/node_modules/lodash-es/_baseIsDate.js b/node_modules/lodash-es/_baseIsDate.js deleted file mode 100644 index 5487cb5..0000000 --- a/node_modules/lodash-es/_baseIsDate.js +++ /dev/null @@ -1,18 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var dateTag = '[object Date]'; - -/** - * The base implementation of `_.isDate` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - */ -function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; -} - -export default baseIsDate; diff --git a/node_modules/lodash-es/_baseIsEqual.js b/node_modules/lodash-es/_baseIsEqual.js deleted file mode 100644 index 3b5aba8..0000000 --- a/node_modules/lodash-es/_baseIsEqual.js +++ /dev/null @@ -1,28 +0,0 @@ -import baseIsEqualDeep from './_baseIsEqualDeep.js'; -import isObjectLike from './isObjectLike.js'; - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -export default baseIsEqual; diff --git a/node_modules/lodash-es/_baseIsEqualDeep.js b/node_modules/lodash-es/_baseIsEqualDeep.js deleted file mode 100644 index d8c8bf0..0000000 --- a/node_modules/lodash-es/_baseIsEqualDeep.js +++ /dev/null @@ -1,83 +0,0 @@ -import Stack from './_Stack.js'; -import equalArrays from './_equalArrays.js'; -import equalByTag from './_equalByTag.js'; -import equalObjects from './_equalObjects.js'; -import getTag from './_getTag.js'; -import isArray from './isArray.js'; -import isBuffer from './isBuffer.js'; -import isTypedArray from './isTypedArray.js'; - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -export default baseIsEqualDeep; diff --git a/node_modules/lodash-es/_baseIsMap.js b/node_modules/lodash-es/_baseIsMap.js deleted file mode 100644 index 6438d2b..0000000 --- a/node_modules/lodash-es/_baseIsMap.js +++ /dev/null @@ -1,18 +0,0 @@ -import getTag from './_getTag.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; -} - -export default baseIsMap; diff --git a/node_modules/lodash-es/_baseIsMatch.js b/node_modules/lodash-es/_baseIsMatch.js deleted file mode 100644 index 926e03f..0000000 --- a/node_modules/lodash-es/_baseIsMatch.js +++ /dev/null @@ -1,62 +0,0 @@ -import Stack from './_Stack.js'; -import baseIsEqual from './_baseIsEqual.js'; - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -export default baseIsMatch; diff --git a/node_modules/lodash-es/_baseIsNaN.js b/node_modules/lodash-es/_baseIsNaN.js deleted file mode 100644 index 7a36d0e..0000000 --- a/node_modules/lodash-es/_baseIsNaN.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -export default baseIsNaN; diff --git a/node_modules/lodash-es/_baseIsNative.js b/node_modules/lodash-es/_baseIsNative.js deleted file mode 100644 index 04c1854..0000000 --- a/node_modules/lodash-es/_baseIsNative.js +++ /dev/null @@ -1,47 +0,0 @@ -import isFunction from './isFunction.js'; -import isMasked from './_isMasked.js'; -import isObject from './isObject.js'; -import toSource from './_toSource.js'; - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -export default baseIsNative; diff --git a/node_modules/lodash-es/_baseIsRegExp.js b/node_modules/lodash-es/_baseIsRegExp.js deleted file mode 100644 index e73971b..0000000 --- a/node_modules/lodash-es/_baseIsRegExp.js +++ /dev/null @@ -1,18 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var regexpTag = '[object RegExp]'; - -/** - * The base implementation of `_.isRegExp` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - */ -function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; -} - -export default baseIsRegExp; diff --git a/node_modules/lodash-es/_baseIsSet.js b/node_modules/lodash-es/_baseIsSet.js deleted file mode 100644 index bee4a8e..0000000 --- a/node_modules/lodash-es/_baseIsSet.js +++ /dev/null @@ -1,18 +0,0 @@ -import getTag from './_getTag.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; -} - -export default baseIsSet; diff --git a/node_modules/lodash-es/_baseIsTypedArray.js b/node_modules/lodash-es/_baseIsTypedArray.js deleted file mode 100644 index 0a18d1c..0000000 --- a/node_modules/lodash-es/_baseIsTypedArray.js +++ /dev/null @@ -1,60 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isLength from './isLength.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} - -export default baseIsTypedArray; diff --git a/node_modules/lodash-es/_baseIteratee.js b/node_modules/lodash-es/_baseIteratee.js deleted file mode 100644 index af05200..0000000 --- a/node_modules/lodash-es/_baseIteratee.js +++ /dev/null @@ -1,31 +0,0 @@ -import baseMatches from './_baseMatches.js'; -import baseMatchesProperty from './_baseMatchesProperty.js'; -import identity from './identity.js'; -import isArray from './isArray.js'; -import property from './property.js'; - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); - } - return property(value); -} - -export default baseIteratee; diff --git a/node_modules/lodash-es/_baseKeys.js b/node_modules/lodash-es/_baseKeys.js deleted file mode 100644 index 5a76224..0000000 --- a/node_modules/lodash-es/_baseKeys.js +++ /dev/null @@ -1,30 +0,0 @@ -import isPrototype from './_isPrototype.js'; -import nativeKeys from './_nativeKeys.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -export default baseKeys; diff --git a/node_modules/lodash-es/_baseKeysIn.js b/node_modules/lodash-es/_baseKeysIn.js deleted file mode 100644 index 84c1395..0000000 --- a/node_modules/lodash-es/_baseKeysIn.js +++ /dev/null @@ -1,33 +0,0 @@ -import isObject from './isObject.js'; -import isPrototype from './_isPrototype.js'; -import nativeKeysIn from './_nativeKeysIn.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -export default baseKeysIn; diff --git a/node_modules/lodash-es/_baseLodash.js b/node_modules/lodash-es/_baseLodash.js deleted file mode 100644 index 10aed08..0000000 --- a/node_modules/lodash-es/_baseLodash.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * The function whose prototype chain sequence wrappers inherit from. - * - * @private - */ -function baseLodash() { - // No operation performed. -} - -export default baseLodash; diff --git a/node_modules/lodash-es/_baseLt.js b/node_modules/lodash-es/_baseLt.js deleted file mode 100644 index e70ad2d..0000000 --- a/node_modules/lodash-es/_baseLt.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -export default baseLt; diff --git a/node_modules/lodash-es/_baseMap.js b/node_modules/lodash-es/_baseMap.js deleted file mode 100644 index c607c01..0000000 --- a/node_modules/lodash-es/_baseMap.js +++ /dev/null @@ -1,22 +0,0 @@ -import baseEach from './_baseEach.js'; -import isArrayLike from './isArrayLike.js'; - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -export default baseMap; diff --git a/node_modules/lodash-es/_baseMatches.js b/node_modules/lodash-es/_baseMatches.js deleted file mode 100644 index 74e9971..0000000 --- a/node_modules/lodash-es/_baseMatches.js +++ /dev/null @@ -1,22 +0,0 @@ -import baseIsMatch from './_baseIsMatch.js'; -import getMatchData from './_getMatchData.js'; -import matchesStrictComparable from './_matchesStrictComparable.js'; - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; -} - -export default baseMatches; diff --git a/node_modules/lodash-es/_baseMatchesProperty.js b/node_modules/lodash-es/_baseMatchesProperty.js deleted file mode 100644 index f92d680..0000000 --- a/node_modules/lodash-es/_baseMatchesProperty.js +++ /dev/null @@ -1,33 +0,0 @@ -import baseIsEqual from './_baseIsEqual.js'; -import get from './get.js'; -import hasIn from './hasIn.js'; -import isKey from './_isKey.js'; -import isStrictComparable from './_isStrictComparable.js'; -import matchesStrictComparable from './_matchesStrictComparable.js'; -import toKey from './_toKey.js'; - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); - } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; -} - -export default baseMatchesProperty; diff --git a/node_modules/lodash-es/_baseMean.js b/node_modules/lodash-es/_baseMean.js deleted file mode 100644 index f2f1c57..0000000 --- a/node_modules/lodash-es/_baseMean.js +++ /dev/null @@ -1,20 +0,0 @@ -import baseSum from './_baseSum.js'; - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** - * The base implementation of `_.mean` and `_.meanBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the mean. - */ -function baseMean(array, iteratee) { - var length = array == null ? 0 : array.length; - return length ? (baseSum(array, iteratee) / length) : NAN; -} - -export default baseMean; diff --git a/node_modules/lodash-es/_baseMerge.js b/node_modules/lodash-es/_baseMerge.js deleted file mode 100644 index 37680f7..0000000 --- a/node_modules/lodash-es/_baseMerge.js +++ /dev/null @@ -1,41 +0,0 @@ -import Stack from './_Stack.js'; -import assignMergeValue from './_assignMergeValue.js'; -import baseFor from './_baseFor.js'; -import baseMergeDeep from './_baseMergeDeep.js'; -import isObject from './isObject.js'; -import keysIn from './keysIn.js'; - -/** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - if (isObject(srcValue)) { - stack || (stack = new Stack); - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(object[key], srcValue, (key + ''), object, source, stack) - : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); -} - -export default baseMerge; diff --git a/node_modules/lodash-es/_baseMergeDeep.js b/node_modules/lodash-es/_baseMergeDeep.js deleted file mode 100644 index a7962fb..0000000 --- a/node_modules/lodash-es/_baseMergeDeep.js +++ /dev/null @@ -1,93 +0,0 @@ -import assignMergeValue from './_assignMergeValue.js'; -import cloneBuffer from './_cloneBuffer.js'; -import cloneTypedArray from './_cloneTypedArray.js'; -import copyArray from './_copyArray.js'; -import initCloneObject from './_initCloneObject.js'; -import isArguments from './isArguments.js'; -import isArray from './isArray.js'; -import isArrayLikeObject from './isArrayLikeObject.js'; -import isBuffer from './isBuffer.js'; -import isFunction from './isFunction.js'; -import isObject from './isObject.js'; -import isPlainObject from './isPlainObject.js'; -import isTypedArray from './isTypedArray.js'; -import toPlainObject from './toPlainObject.js'; - -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = object[key], - srcValue = source[key], - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; - - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); - - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); -} - -export default baseMergeDeep; diff --git a/node_modules/lodash-es/_baseNth.js b/node_modules/lodash-es/_baseNth.js deleted file mode 100644 index 0a6e999..0000000 --- a/node_modules/lodash-es/_baseNth.js +++ /dev/null @@ -1,20 +0,0 @@ -import isIndex from './_isIndex.js'; - -/** - * The base implementation of `_.nth` which doesn't coerce arguments. - * - * @private - * @param {Array} array The array to query. - * @param {number} n The index of the element to return. - * @returns {*} Returns the nth element of `array`. - */ -function baseNth(array, n) { - var length = array.length; - if (!length) { - return; - } - n += n < 0 ? length : 0; - return isIndex(n, length) ? array[n] : undefined; -} - -export default baseNth; diff --git a/node_modules/lodash-es/_baseOrderBy.js b/node_modules/lodash-es/_baseOrderBy.js deleted file mode 100644 index b9d00aa..0000000 --- a/node_modules/lodash-es/_baseOrderBy.js +++ /dev/null @@ -1,34 +0,0 @@ -import arrayMap from './_arrayMap.js'; -import baseIteratee from './_baseIteratee.js'; -import baseMap from './_baseMap.js'; -import baseSortBy from './_baseSortBy.js'; -import baseUnary from './_baseUnary.js'; -import compareMultiple from './_compareMultiple.js'; -import identity from './identity.js'; - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); - - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); -} - -export default baseOrderBy; diff --git a/node_modules/lodash-es/_basePick.js b/node_modules/lodash-es/_basePick.js deleted file mode 100644 index bf80ff0..0000000 --- a/node_modules/lodash-es/_basePick.js +++ /dev/null @@ -1,19 +0,0 @@ -import basePickBy from './_basePickBy.js'; -import hasIn from './hasIn.js'; - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); -} - -export default basePick; diff --git a/node_modules/lodash-es/_basePickBy.js b/node_modules/lodash-es/_basePickBy.js deleted file mode 100644 index f2610c5..0000000 --- a/node_modules/lodash-es/_basePickBy.js +++ /dev/null @@ -1,30 +0,0 @@ -import baseGet from './_baseGet.js'; -import baseSet from './_baseSet.js'; -import castPath from './_castPath.js'; - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = baseGet(object, path); - - if (predicate(value, path)) { - baseSet(result, castPath(path, object), value); - } - } - return result; -} - -export default basePickBy; diff --git a/node_modules/lodash-es/_baseProperty.js b/node_modules/lodash-es/_baseProperty.js deleted file mode 100644 index 90f0329..0000000 --- a/node_modules/lodash-es/_baseProperty.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -export default baseProperty; diff --git a/node_modules/lodash-es/_basePropertyDeep.js b/node_modules/lodash-es/_basePropertyDeep.js deleted file mode 100644 index 2f779ab..0000000 --- a/node_modules/lodash-es/_basePropertyDeep.js +++ /dev/null @@ -1,16 +0,0 @@ -import baseGet from './_baseGet.js'; - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; -} - -export default basePropertyDeep; diff --git a/node_modules/lodash-es/_basePropertyOf.js b/node_modules/lodash-es/_basePropertyOf.js deleted file mode 100644 index e0ec2b8..0000000 --- a/node_modules/lodash-es/_basePropertyOf.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; -} - -export default basePropertyOf; diff --git a/node_modules/lodash-es/_basePullAll.js b/node_modules/lodash-es/_basePullAll.js deleted file mode 100644 index e69c100..0000000 --- a/node_modules/lodash-es/_basePullAll.js +++ /dev/null @@ -1,51 +0,0 @@ -import arrayMap from './_arrayMap.js'; -import baseIndexOf from './_baseIndexOf.js'; -import baseIndexOfWith from './_baseIndexOfWith.js'; -import baseUnary from './_baseUnary.js'; -import copyArray from './_copyArray.js'; - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * The base implementation of `_.pullAllBy` without support for iteratee - * shorthands. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - */ -function basePullAll(array, values, iteratee, comparator) { - var indexOf = comparator ? baseIndexOfWith : baseIndexOf, - index = -1, - length = values.length, - seen = array; - - if (array === values) { - values = copyArray(values); - } - if (iteratee) { - seen = arrayMap(array, baseUnary(iteratee)); - } - while (++index < length) { - var fromIndex = 0, - value = values[index], - computed = iteratee ? iteratee(value) : value; - - while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { - if (seen !== array) { - splice.call(seen, fromIndex, 1); - } - splice.call(array, fromIndex, 1); - } - } - return array; -} - -export default basePullAll; diff --git a/node_modules/lodash-es/_basePullAt.js b/node_modules/lodash-es/_basePullAt.js deleted file mode 100644 index 9305613..0000000 --- a/node_modules/lodash-es/_basePullAt.js +++ /dev/null @@ -1,37 +0,0 @@ -import baseUnset from './_baseUnset.js'; -import isIndex from './_isIndex.js'; - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * The base implementation of `_.pullAt` without support for individual - * indexes or capturing the removed elements. - * - * @private - * @param {Array} array The array to modify. - * @param {number[]} indexes The indexes of elements to remove. - * @returns {Array} Returns `array`. - */ -function basePullAt(array, indexes) { - var length = array ? indexes.length : 0, - lastIndex = length - 1; - - while (length--) { - var index = indexes[length]; - if (length == lastIndex || index !== previous) { - var previous = index; - if (isIndex(index)) { - splice.call(array, index, 1); - } else { - baseUnset(array, index); - } - } - } - return array; -} - -export default basePullAt; diff --git a/node_modules/lodash-es/_baseRandom.js b/node_modules/lodash-es/_baseRandom.js deleted file mode 100644 index 0e6cf03..0000000 --- a/node_modules/lodash-es/_baseRandom.js +++ /dev/null @@ -1,18 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor, - nativeRandom = Math.random; - -/** - * The base implementation of `_.random` without support for returning - * floating-point numbers. - * - * @private - * @param {number} lower The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the random number. - */ -function baseRandom(lower, upper) { - return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); -} - -export default baseRandom; diff --git a/node_modules/lodash-es/_baseRange.js b/node_modules/lodash-es/_baseRange.js deleted file mode 100644 index 12e48b0..0000000 --- a/node_modules/lodash-es/_baseRange.js +++ /dev/null @@ -1,28 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -export default baseRange; diff --git a/node_modules/lodash-es/_baseReduce.js b/node_modules/lodash-es/_baseReduce.js deleted file mode 100644 index 069fed5..0000000 --- a/node_modules/lodash-es/_baseReduce.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -export default baseReduce; diff --git a/node_modules/lodash-es/_baseRepeat.js b/node_modules/lodash-es/_baseRepeat.js deleted file mode 100644 index 594539a..0000000 --- a/node_modules/lodash-es/_baseRepeat.js +++ /dev/null @@ -1,35 +0,0 @@ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor; - -/** - * The base implementation of `_.repeat` which doesn't coerce arguments. - * - * @private - * @param {string} string The string to repeat. - * @param {number} n The number of times to repeat the string. - * @returns {string} Returns the repeated string. - */ -function baseRepeat(string, n) { - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - if (n) { - string += string; - } - } while (n); - - return result; -} - -export default baseRepeat; diff --git a/node_modules/lodash-es/_baseRest.js b/node_modules/lodash-es/_baseRest.js deleted file mode 100644 index a315371..0000000 --- a/node_modules/lodash-es/_baseRest.js +++ /dev/null @@ -1,17 +0,0 @@ -import identity from './identity.js'; -import overRest from './_overRest.js'; -import setToString from './_setToString.js'; - -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); -} - -export default baseRest; diff --git a/node_modules/lodash-es/_baseSample.js b/node_modules/lodash-es/_baseSample.js deleted file mode 100644 index 7b96c06..0000000 --- a/node_modules/lodash-es/_baseSample.js +++ /dev/null @@ -1,15 +0,0 @@ -import arraySample from './_arraySample.js'; -import values from './values.js'; - -/** - * The base implementation of `_.sample`. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. - */ -function baseSample(collection) { - return arraySample(values(collection)); -} - -export default baseSample; diff --git a/node_modules/lodash-es/_baseSampleSize.js b/node_modules/lodash-es/_baseSampleSize.js deleted file mode 100644 index 04877a1..0000000 --- a/node_modules/lodash-es/_baseSampleSize.js +++ /dev/null @@ -1,18 +0,0 @@ -import baseClamp from './_baseClamp.js'; -import shuffleSelf from './_shuffleSelf.js'; -import values from './values.js'; - -/** - * The base implementation of `_.sampleSize` without param guards. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ -function baseSampleSize(collection, n) { - var array = values(collection); - return shuffleSelf(array, baseClamp(n, 0, array.length)); -} - -export default baseSampleSize; diff --git a/node_modules/lodash-es/_baseSet.js b/node_modules/lodash-es/_baseSet.js deleted file mode 100644 index 6cdc792..0000000 --- a/node_modules/lodash-es/_baseSet.js +++ /dev/null @@ -1,47 +0,0 @@ -import assignValue from './_assignValue.js'; -import castPath from './_castPath.js'; -import isIndex from './_isIndex.js'; -import isObject from './isObject.js'; -import toKey from './_toKey.js'; - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -export default baseSet; diff --git a/node_modules/lodash-es/_baseSetData.js b/node_modules/lodash-es/_baseSetData.js deleted file mode 100644 index 8d57b0b..0000000 --- a/node_modules/lodash-es/_baseSetData.js +++ /dev/null @@ -1,17 +0,0 @@ -import identity from './identity.js'; -import metaMap from './_metaMap.js'; - -/** - * The base implementation of `setData` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ -var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; -}; - -export default baseSetData; diff --git a/node_modules/lodash-es/_baseSetToString.js b/node_modules/lodash-es/_baseSetToString.js deleted file mode 100644 index e712c11..0000000 --- a/node_modules/lodash-es/_baseSetToString.js +++ /dev/null @@ -1,22 +0,0 @@ -import constant from './constant.js'; -import defineProperty from './_defineProperty.js'; -import identity from './identity.js'; - -/** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); -}; - -export default baseSetToString; diff --git a/node_modules/lodash-es/_baseShuffle.js b/node_modules/lodash-es/_baseShuffle.js deleted file mode 100644 index f5617bb..0000000 --- a/node_modules/lodash-es/_baseShuffle.js +++ /dev/null @@ -1,15 +0,0 @@ -import shuffleSelf from './_shuffleSelf.js'; -import values from './values.js'; - -/** - * The base implementation of `_.shuffle`. - * - * @private - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - */ -function baseShuffle(collection) { - return shuffleSelf(values(collection)); -} - -export default baseShuffle; diff --git a/node_modules/lodash-es/_baseSlice.js b/node_modules/lodash-es/_baseSlice.js deleted file mode 100644 index bd9c69b..0000000 --- a/node_modules/lodash-es/_baseSlice.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} - -export default baseSlice; diff --git a/node_modules/lodash-es/_baseSome.js b/node_modules/lodash-es/_baseSome.js deleted file mode 100644 index f2647c2..0000000 --- a/node_modules/lodash-es/_baseSome.js +++ /dev/null @@ -1,22 +0,0 @@ -import baseEach from './_baseEach.js'; - -/** - * The base implementation of `_.some` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; -} - -export default baseSome; diff --git a/node_modules/lodash-es/_baseSortBy.js b/node_modules/lodash-es/_baseSortBy.js deleted file mode 100644 index e2041cd..0000000 --- a/node_modules/lodash-es/_baseSortBy.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -export default baseSortBy; diff --git a/node_modules/lodash-es/_baseSortedIndex.js b/node_modules/lodash-es/_baseSortedIndex.js deleted file mode 100644 index c192505..0000000 --- a/node_modules/lodash-es/_baseSortedIndex.js +++ /dev/null @@ -1,42 +0,0 @@ -import baseSortedIndexBy from './_baseSortedIndexBy.js'; -import identity from './identity.js'; -import isSymbol from './isSymbol.js'; - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - -/** - * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which - * performs a binary search of `array` to determine the index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ -function baseSortedIndex(array, value, retHighest) { - var low = 0, - high = array == null ? low : array.length; - - if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = (low + high) >>> 1, - computed = array[mid]; - - if (computed !== null && !isSymbol(computed) && - (retHighest ? (computed <= value) : (computed < value))) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return baseSortedIndexBy(array, value, identity, retHighest); -} - -export default baseSortedIndex; diff --git a/node_modules/lodash-es/_baseSortedIndexBy.js b/node_modules/lodash-es/_baseSortedIndexBy.js deleted file mode 100644 index 20a90d0..0000000 --- a/node_modules/lodash-es/_baseSortedIndexBy.js +++ /dev/null @@ -1,64 +0,0 @@ -import isSymbol from './isSymbol.js'; - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor, - nativeMin = Math.min; - -/** - * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` - * which invokes `iteratee` for `value` and each element of `array` to compute - * their sort ranking. The iteratee is invoked with one argument; (value). - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} iteratee The iteratee invoked per element. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ -function baseSortedIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - - var low = 0, - high = array == null ? 0 : array.length, - valIsNaN = value !== value, - valIsNull = value === null, - valIsSymbol = isSymbol(value), - valIsUndefined = value === undefined; - - while (low < high) { - var mid = nativeFloor((low + high) / 2), - computed = iteratee(array[mid]), - othIsDefined = computed !== undefined, - othIsNull = computed === null, - othIsReflexive = computed === computed, - othIsSymbol = isSymbol(computed); - - if (valIsNaN) { - var setLow = retHighest || othIsReflexive; - } else if (valIsUndefined) { - setLow = othIsReflexive && (retHighest || othIsDefined); - } else if (valIsNull) { - setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); - } else if (valIsSymbol) { - setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); - } else if (othIsNull || othIsSymbol) { - setLow = false; - } else { - setLow = retHighest ? (computed <= value) : (computed < value); - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin(high, MAX_ARRAY_INDEX); -} - -export default baseSortedIndexBy; diff --git a/node_modules/lodash-es/_baseSortedUniq.js b/node_modules/lodash-es/_baseSortedUniq.js deleted file mode 100644 index cb44abc..0000000 --- a/node_modules/lodash-es/_baseSortedUniq.js +++ /dev/null @@ -1,30 +0,0 @@ -import eq from './eq.js'; - -/** - * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseSortedUniq(array, iteratee) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - if (!index || !eq(computed, seen)) { - var seen = computed; - result[resIndex++] = value === 0 ? 0 : value; - } - } - return result; -} - -export default baseSortedUniq; diff --git a/node_modules/lodash-es/_baseSum.js b/node_modules/lodash-es/_baseSum.js deleted file mode 100644 index 61b3da4..0000000 --- a/node_modules/lodash-es/_baseSum.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * The base implementation of `_.sum` and `_.sumBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ -function baseSum(array, iteratee) { - var result, - index = -1, - length = array.length; - - while (++index < length) { - var current = iteratee(array[index]); - if (current !== undefined) { - result = result === undefined ? current : (result + current); - } - } - return result; -} - -export default baseSum; diff --git a/node_modules/lodash-es/_baseTimes.js b/node_modules/lodash-es/_baseTimes.js deleted file mode 100644 index d5d0e27..0000000 --- a/node_modules/lodash-es/_baseTimes.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -export default baseTimes; diff --git a/node_modules/lodash-es/_baseToNumber.js b/node_modules/lodash-es/_baseToNumber.js deleted file mode 100644 index 3552d1a..0000000 --- a/node_modules/lodash-es/_baseToNumber.js +++ /dev/null @@ -1,24 +0,0 @@ -import isSymbol from './isSymbol.js'; - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** - * The base implementation of `_.toNumber` which doesn't ensure correct - * conversions of binary, hexadecimal, or octal string values. - * - * @private - * @param {*} value The value to process. - * @returns {number} Returns the number. - */ -function baseToNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - return +value; -} - -export default baseToNumber; diff --git a/node_modules/lodash-es/_baseToPairs.js b/node_modules/lodash-es/_baseToPairs.js deleted file mode 100644 index c1e3f9f..0000000 --- a/node_modules/lodash-es/_baseToPairs.js +++ /dev/null @@ -1,18 +0,0 @@ -import arrayMap from './_arrayMap.js'; - -/** - * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array - * of key-value pairs for `object` corresponding to the property names of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the key-value pairs. - */ -function baseToPairs(object, props) { - return arrayMap(props, function(key) { - return [key, object[key]]; - }); -} - -export default baseToPairs; diff --git a/node_modules/lodash-es/_baseToString.js b/node_modules/lodash-es/_baseToString.js deleted file mode 100644 index 7b5b35c..0000000 --- a/node_modules/lodash-es/_baseToString.js +++ /dev/null @@ -1,37 +0,0 @@ -import Symbol from './_Symbol.js'; -import arrayMap from './_arrayMap.js'; -import isArray from './isArray.js'; -import isSymbol from './isSymbol.js'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -export default baseToString; diff --git a/node_modules/lodash-es/_baseUnary.js b/node_modules/lodash-es/_baseUnary.js deleted file mode 100644 index e756a32..0000000 --- a/node_modules/lodash-es/_baseUnary.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} - -export default baseUnary; diff --git a/node_modules/lodash-es/_baseUniq.js b/node_modules/lodash-es/_baseUniq.js deleted file mode 100644 index 4ca0bcd..0000000 --- a/node_modules/lodash-es/_baseUniq.js +++ /dev/null @@ -1,72 +0,0 @@ -import SetCache from './_SetCache.js'; -import arrayIncludes from './_arrayIncludes.js'; -import arrayIncludesWith from './_arrayIncludesWith.js'; -import cacheHas from './_cacheHas.js'; -import createSet from './_createSet.js'; -import setToArray from './_setToArray.js'; - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -export default baseUniq; diff --git a/node_modules/lodash-es/_baseUnset.js b/node_modules/lodash-es/_baseUnset.js deleted file mode 100644 index 64b7b9c..0000000 --- a/node_modules/lodash-es/_baseUnset.js +++ /dev/null @@ -1,20 +0,0 @@ -import castPath from './_castPath.js'; -import last from './last.js'; -import parent from './_parent.js'; -import toKey from './_toKey.js'; - -/** - * The base implementation of `_.unset`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The property path to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. - */ -function baseUnset(object, path) { - path = castPath(path, object); - object = parent(object, path); - return object == null || delete object[toKey(last(path))]; -} - -export default baseUnset; diff --git a/node_modules/lodash-es/_baseUpdate.js b/node_modules/lodash-es/_baseUpdate.js deleted file mode 100644 index 70dd150..0000000 --- a/node_modules/lodash-es/_baseUpdate.js +++ /dev/null @@ -1,18 +0,0 @@ -import baseGet from './_baseGet.js'; -import baseSet from './_baseSet.js'; - -/** - * The base implementation of `_.update`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to update. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseUpdate(object, path, updater, customizer) { - return baseSet(object, path, updater(baseGet(object, path)), customizer); -} - -export default baseUpdate; diff --git a/node_modules/lodash-es/_baseValues.js b/node_modules/lodash-es/_baseValues.js deleted file mode 100644 index f3a38d2..0000000 --- a/node_modules/lodash-es/_baseValues.js +++ /dev/null @@ -1,19 +0,0 @@ -import arrayMap from './_arrayMap.js'; - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); -} - -export default baseValues; diff --git a/node_modules/lodash-es/_baseWhile.js b/node_modules/lodash-es/_baseWhile.js deleted file mode 100644 index 5536ea6..0000000 --- a/node_modules/lodash-es/_baseWhile.js +++ /dev/null @@ -1,26 +0,0 @@ -import baseSlice from './_baseSlice.js'; - -/** - * The base implementation of methods like `_.dropWhile` and `_.takeWhile` - * without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to query. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [isDrop] Specify dropping elements instead of taking them. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the slice of `array`. - */ -function baseWhile(array, predicate, isDrop, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length) && - predicate(array[index], index, array)) {} - - return isDrop - ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) - : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); -} - -export default baseWhile; diff --git a/node_modules/lodash-es/_baseWrapperValue.js b/node_modules/lodash-es/_baseWrapperValue.js deleted file mode 100644 index 0b6807e..0000000 --- a/node_modules/lodash-es/_baseWrapperValue.js +++ /dev/null @@ -1,25 +0,0 @@ -import LazyWrapper from './_LazyWrapper.js'; -import arrayPush from './_arrayPush.js'; -import arrayReduce from './_arrayReduce.js'; - -/** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to perform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ -function baseWrapperValue(value, actions) { - var result = value; - if (result instanceof LazyWrapper) { - result = result.value(); - } - return arrayReduce(actions, function(result, action) { - return action.func.apply(action.thisArg, arrayPush([result], action.args)); - }, result); -} - -export default baseWrapperValue; diff --git a/node_modules/lodash-es/_baseXor.js b/node_modules/lodash-es/_baseXor.js deleted file mode 100644 index 9cebe67..0000000 --- a/node_modules/lodash-es/_baseXor.js +++ /dev/null @@ -1,36 +0,0 @@ -import baseDifference from './_baseDifference.js'; -import baseFlatten from './_baseFlatten.js'; -import baseUniq from './_baseUniq.js'; - -/** - * The base implementation of methods like `_.xor`, without support for - * iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. - */ -function baseXor(arrays, iteratee, comparator) { - var length = arrays.length; - if (length < 2) { - return length ? baseUniq(arrays[0]) : []; - } - var index = -1, - result = Array(length); - - while (++index < length) { - var array = arrays[index], - othIndex = -1; - - while (++othIndex < length) { - if (othIndex != index) { - result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); - } - } - } - return baseUniq(baseFlatten(result, 1), iteratee, comparator); -} - -export default baseXor; diff --git a/node_modules/lodash-es/_baseZipObject.js b/node_modules/lodash-es/_baseZipObject.js deleted file mode 100644 index f6f4a3c..0000000 --- a/node_modules/lodash-es/_baseZipObject.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -export default baseZipObject; diff --git a/node_modules/lodash-es/_cacheHas.js b/node_modules/lodash-es/_cacheHas.js deleted file mode 100644 index 374a886..0000000 --- a/node_modules/lodash-es/_cacheHas.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -export default cacheHas; diff --git a/node_modules/lodash-es/_castArrayLikeObject.js b/node_modules/lodash-es/_castArrayLikeObject.js deleted file mode 100644 index 040d3e5..0000000 --- a/node_modules/lodash-es/_castArrayLikeObject.js +++ /dev/null @@ -1,14 +0,0 @@ -import isArrayLikeObject from './isArrayLikeObject.js'; - -/** - * Casts `value` to an empty array if it's not an array like object. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array|Object} Returns the cast array-like object. - */ -function castArrayLikeObject(value) { - return isArrayLikeObject(value) ? value : []; -} - -export default castArrayLikeObject; diff --git a/node_modules/lodash-es/_castFunction.js b/node_modules/lodash-es/_castFunction.js deleted file mode 100644 index 03a2e99..0000000 --- a/node_modules/lodash-es/_castFunction.js +++ /dev/null @@ -1,14 +0,0 @@ -import identity from './identity.js'; - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : identity; -} - -export default castFunction; diff --git a/node_modules/lodash-es/_castPath.js b/node_modules/lodash-es/_castPath.js deleted file mode 100644 index 89aae95..0000000 --- a/node_modules/lodash-es/_castPath.js +++ /dev/null @@ -1,21 +0,0 @@ -import isArray from './isArray.js'; -import isKey from './_isKey.js'; -import stringToPath from './_stringToPath.js'; -import toString from './toString.js'; - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); -} - -export default castPath; diff --git a/node_modules/lodash-es/_castRest.js b/node_modules/lodash-es/_castRest.js deleted file mode 100644 index 6f43d02..0000000 --- a/node_modules/lodash-es/_castRest.js +++ /dev/null @@ -1,14 +0,0 @@ -import baseRest from './_baseRest.js'; - -/** - * A `baseRest` alias which can be replaced with `identity` by module - * replacement plugins. - * - * @private - * @type {Function} - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -var castRest = baseRest; - -export default castRest; diff --git a/node_modules/lodash-es/_castSlice.js b/node_modules/lodash-es/_castSlice.js deleted file mode 100644 index 011bbe4..0000000 --- a/node_modules/lodash-es/_castSlice.js +++ /dev/null @@ -1,18 +0,0 @@ -import baseSlice from './_baseSlice.js'; - -/** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ -function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); -} - -export default castSlice; diff --git a/node_modules/lodash-es/_charsEndIndex.js b/node_modules/lodash-es/_charsEndIndex.js deleted file mode 100644 index af9926e..0000000 --- a/node_modules/lodash-es/_charsEndIndex.js +++ /dev/null @@ -1,19 +0,0 @@ -import baseIndexOf from './_baseIndexOf.js'; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ -function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -export default charsEndIndex; diff --git a/node_modules/lodash-es/_charsStartIndex.js b/node_modules/lodash-es/_charsStartIndex.js deleted file mode 100644 index 7406b19..0000000 --- a/node_modules/lodash-es/_charsStartIndex.js +++ /dev/null @@ -1,20 +0,0 @@ -import baseIndexOf from './_baseIndexOf.js'; - -/** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ -function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; - - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -export default charsStartIndex; diff --git a/node_modules/lodash-es/_cloneArrayBuffer.js b/node_modules/lodash-es/_cloneArrayBuffer.js deleted file mode 100644 index 9f33e7a..0000000 --- a/node_modules/lodash-es/_cloneArrayBuffer.js +++ /dev/null @@ -1,16 +0,0 @@ -import Uint8Array from './_Uint8Array.js'; - -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} - -export default cloneArrayBuffer; diff --git a/node_modules/lodash-es/_cloneBuffer.js b/node_modules/lodash-es/_cloneBuffer.js deleted file mode 100644 index 21b192e..0000000 --- a/node_modules/lodash-es/_cloneBuffer.js +++ /dev/null @@ -1,35 +0,0 @@ -import root from './_root.js'; - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; - -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - - buffer.copy(result); - return result; -} - -export default cloneBuffer; diff --git a/node_modules/lodash-es/_cloneDataView.js b/node_modules/lodash-es/_cloneDataView.js deleted file mode 100644 index f9b9a6f..0000000 --- a/node_modules/lodash-es/_cloneDataView.js +++ /dev/null @@ -1,16 +0,0 @@ -import cloneArrayBuffer from './_cloneArrayBuffer.js'; - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -export default cloneDataView; diff --git a/node_modules/lodash-es/_cloneMap.js b/node_modules/lodash-es/_cloneMap.js deleted file mode 100644 index a4aa5b5..0000000 --- a/node_modules/lodash-es/_cloneMap.js +++ /dev/null @@ -1,22 +0,0 @@ -import addMapEntry from './_addMapEntry.js'; -import arrayReduce from './_arrayReduce.js'; -import mapToArray from './_mapToArray.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1; - -/** - * Creates a clone of `map`. - * - * @private - * @param {Object} map The map to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned map. - */ -function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); - return arrayReduce(array, addMapEntry, new map.constructor); -} - -export default cloneMap; diff --git a/node_modules/lodash-es/_cloneRegExp.js b/node_modules/lodash-es/_cloneRegExp.js deleted file mode 100644 index 0ddb49b..0000000 --- a/node_modules/lodash-es/_cloneRegExp.js +++ /dev/null @@ -1,17 +0,0 @@ -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -export default cloneRegExp; diff --git a/node_modules/lodash-es/_cloneSet.js b/node_modules/lodash-es/_cloneSet.js deleted file mode 100644 index e1d1063..0000000 --- a/node_modules/lodash-es/_cloneSet.js +++ /dev/null @@ -1,22 +0,0 @@ -import addSetEntry from './_addSetEntry.js'; -import arrayReduce from './_arrayReduce.js'; -import setToArray from './_setToArray.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1; - -/** - * Creates a clone of `set`. - * - * @private - * @param {Object} set The set to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned set. - */ -function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); - return arrayReduce(array, addSetEntry, new set.constructor); -} - -export default cloneSet; diff --git a/node_modules/lodash-es/_cloneSymbol.js b/node_modules/lodash-es/_cloneSymbol.js deleted file mode 100644 index 357b155..0000000 --- a/node_modules/lodash-es/_cloneSymbol.js +++ /dev/null @@ -1,18 +0,0 @@ -import Symbol from './_Symbol.js'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -export default cloneSymbol; diff --git a/node_modules/lodash-es/_cloneTypedArray.js b/node_modules/lodash-es/_cloneTypedArray.js deleted file mode 100644 index 2fa9b8a..0000000 --- a/node_modules/lodash-es/_cloneTypedArray.js +++ /dev/null @@ -1,16 +0,0 @@ -import cloneArrayBuffer from './_cloneArrayBuffer.js'; - -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} - -export default cloneTypedArray; diff --git a/node_modules/lodash-es/_compareAscending.js b/node_modules/lodash-es/_compareAscending.js deleted file mode 100644 index f445193..0000000 --- a/node_modules/lodash-es/_compareAscending.js +++ /dev/null @@ -1,41 +0,0 @@ -import isSymbol from './isSymbol.js'; - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = isSymbol(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = isSymbol(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -export default compareAscending; diff --git a/node_modules/lodash-es/_compareMultiple.js b/node_modules/lodash-es/_compareMultiple.js deleted file mode 100644 index 06e7557..0000000 --- a/node_modules/lodash-es/_compareMultiple.js +++ /dev/null @@ -1,44 +0,0 @@ -import compareAscending from './_compareAscending.js'; - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -export default compareMultiple; diff --git a/node_modules/lodash-es/_composeArgs.js b/node_modules/lodash-es/_composeArgs.js deleted file mode 100644 index 82643bd..0000000 --- a/node_modules/lodash-es/_composeArgs.js +++ /dev/null @@ -1,39 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgs(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersLength = holders.length, - leftIndex = -1, - leftLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(leftLength + rangeLength), - isUncurried = !isCurried; - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - } - while (rangeLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; -} - -export default composeArgs; diff --git a/node_modules/lodash-es/_composeArgsRight.js b/node_modules/lodash-es/_composeArgsRight.js deleted file mode 100644 index 9540e39..0000000 --- a/node_modules/lodash-es/_composeArgsRight.js +++ /dev/null @@ -1,41 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgsRight(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersIndex = -1, - holdersLength = holders.length, - rightIndex = -1, - rightLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(rangeLength + rightLength), - isUncurried = !isCurried; - - while (++argsIndex < rangeLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - } - return result; -} - -export default composeArgsRight; diff --git a/node_modules/lodash-es/_copyArray.js b/node_modules/lodash-es/_copyArray.js deleted file mode 100644 index b29b71e..0000000 --- a/node_modules/lodash-es/_copyArray.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -export default copyArray; diff --git a/node_modules/lodash-es/_copyObject.js b/node_modules/lodash-es/_copyObject.js deleted file mode 100644 index 4e24755..0000000 --- a/node_modules/lodash-es/_copyObject.js +++ /dev/null @@ -1,40 +0,0 @@ -import assignValue from './_assignValue.js'; -import baseAssignValue from './_baseAssignValue.js'; - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; -} - -export default copyObject; diff --git a/node_modules/lodash-es/_copySymbols.js b/node_modules/lodash-es/_copySymbols.js deleted file mode 100644 index 002d8b7..0000000 --- a/node_modules/lodash-es/_copySymbols.js +++ /dev/null @@ -1,16 +0,0 @@ -import copyObject from './_copyObject.js'; -import getSymbols from './_getSymbols.js'; - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); -} - -export default copySymbols; diff --git a/node_modules/lodash-es/_copySymbolsIn.js b/node_modules/lodash-es/_copySymbolsIn.js deleted file mode 100644 index 12268d2..0000000 --- a/node_modules/lodash-es/_copySymbolsIn.js +++ /dev/null @@ -1,16 +0,0 @@ -import copyObject from './_copyObject.js'; -import getSymbolsIn from './_getSymbolsIn.js'; - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); -} - -export default copySymbolsIn; diff --git a/node_modules/lodash-es/_coreJsData.js b/node_modules/lodash-es/_coreJsData.js deleted file mode 100644 index 2ad4fc1..0000000 --- a/node_modules/lodash-es/_coreJsData.js +++ /dev/null @@ -1,6 +0,0 @@ -import root from './_root.js'; - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -export default coreJsData; diff --git a/node_modules/lodash-es/_countHolders.js b/node_modules/lodash-es/_countHolders.js deleted file mode 100644 index 0767946..0000000 --- a/node_modules/lodash-es/_countHolders.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Gets the number of `placeholder` occurrences in `array`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} placeholder The placeholder to search for. - * @returns {number} Returns the placeholder count. - */ -function countHolders(array, placeholder) { - var length = array.length, - result = 0; - - while (length--) { - if (array[length] === placeholder) { - ++result; - } - } - return result; -} - -export default countHolders; diff --git a/node_modules/lodash-es/_createAggregator.js b/node_modules/lodash-es/_createAggregator.js deleted file mode 100644 index 578c0ae..0000000 --- a/node_modules/lodash-es/_createAggregator.js +++ /dev/null @@ -1,23 +0,0 @@ -import arrayAggregator from './_arrayAggregator.js'; -import baseAggregator from './_baseAggregator.js'; -import baseIteratee from './_baseIteratee.js'; -import isArray from './isArray.js'; - -/** - * Creates a function like `_.groupBy`. - * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} [initializer] The accumulator object initializer. - * @returns {Function} Returns the new aggregator function. - */ -function createAggregator(setter, initializer) { - return function(collection, iteratee) { - var func = isArray(collection) ? arrayAggregator : baseAggregator, - accumulator = initializer ? initializer() : {}; - - return func(collection, setter, baseIteratee(iteratee, 2), accumulator); - }; -} - -export default createAggregator; diff --git a/node_modules/lodash-es/_createAssigner.js b/node_modules/lodash-es/_createAssigner.js deleted file mode 100644 index 67dc499..0000000 --- a/node_modules/lodash-es/_createAssigner.js +++ /dev/null @@ -1,37 +0,0 @@ -import baseRest from './_baseRest.js'; -import isIterateeCall from './_isIterateeCall.js'; - -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); -} - -export default createAssigner; diff --git a/node_modules/lodash-es/_createBaseEach.js b/node_modules/lodash-es/_createBaseEach.js deleted file mode 100644 index 2c3181b..0000000 --- a/node_modules/lodash-es/_createBaseEach.js +++ /dev/null @@ -1,32 +0,0 @@ -import isArrayLike from './isArrayLike.js'; - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -export default createBaseEach; diff --git a/node_modules/lodash-es/_createBaseFor.js b/node_modules/lodash-es/_createBaseFor.js deleted file mode 100644 index ac15c59..0000000 --- a/node_modules/lodash-es/_createBaseFor.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -export default createBaseFor; diff --git a/node_modules/lodash-es/_createBind.js b/node_modules/lodash-es/_createBind.js deleted file mode 100644 index 3083ae4..0000000 --- a/node_modules/lodash-es/_createBind.js +++ /dev/null @@ -1,28 +0,0 @@ -import createCtor from './_createCtor.js'; -import root from './_root.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1; - -/** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); - } - return wrapper; -} - -export default createBind; diff --git a/node_modules/lodash-es/_createCaseFirst.js b/node_modules/lodash-es/_createCaseFirst.js deleted file mode 100644 index 333c7c4..0000000 --- a/node_modules/lodash-es/_createCaseFirst.js +++ /dev/null @@ -1,33 +0,0 @@ -import castSlice from './_castSlice.js'; -import hasUnicode from './_hasUnicode.js'; -import stringToArray from './_stringToArray.js'; -import toString from './toString.js'; - -/** - * Creates a function like `_.lowerFirst`. - * - * @private - * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new case function. - */ -function createCaseFirst(methodName) { - return function(string) { - string = toString(string); - - var strSymbols = hasUnicode(string) - ? stringToArray(string) - : undefined; - - var chr = strSymbols - ? strSymbols[0] - : string.charAt(0); - - var trailing = strSymbols - ? castSlice(strSymbols, 1).join('') - : string.slice(1); - - return chr[methodName]() + trailing; - }; -} - -export default createCaseFirst; diff --git a/node_modules/lodash-es/_createCompounder.js b/node_modules/lodash-es/_createCompounder.js deleted file mode 100644 index f3503fb..0000000 --- a/node_modules/lodash-es/_createCompounder.js +++ /dev/null @@ -1,24 +0,0 @@ -import arrayReduce from './_arrayReduce.js'; -import deburr from './deburr.js'; -import words from './words.js'; - -/** Used to compose unicode capture groups. */ -var rsApos = "['\u2019]"; - -/** Used to match apostrophes. */ -var reApos = RegExp(rsApos, 'g'); - -/** - * Creates a function like `_.camelCase`. - * - * @private - * @param {Function} callback The function to combine each word. - * @returns {Function} Returns the new compounder function. - */ -function createCompounder(callback) { - return function(string) { - return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); - }; -} - -export default createCompounder; diff --git a/node_modules/lodash-es/_createCtor.js b/node_modules/lodash-es/_createCtor.js deleted file mode 100644 index 57f32b1..0000000 --- a/node_modules/lodash-es/_createCtor.js +++ /dev/null @@ -1,37 +0,0 @@ -import baseCreate from './_baseCreate.js'; -import isObject from './isObject.js'; - -/** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ -function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; -} - -export default createCtor; diff --git a/node_modules/lodash-es/_createCurry.js b/node_modules/lodash-es/_createCurry.js deleted file mode 100644 index cae7f93..0000000 --- a/node_modules/lodash-es/_createCurry.js +++ /dev/null @@ -1,46 +0,0 @@ -import apply from './_apply.js'; -import createCtor from './_createCtor.js'; -import createHybrid from './_createHybrid.js'; -import createRecurry from './_createRecurry.js'; -import getHolder from './_getHolder.js'; -import replaceHolders from './_replaceHolders.js'; -import root from './_root.js'; - -/** - * Creates a function that wraps `func` to enable currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {number} arity The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createCurry(func, bitmask, arity) { - var Ctor = createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length, - placeholder = getHolder(wrapper); - - while (index--) { - args[index] = arguments[index]; - } - var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) - ? [] - : replaceHolders(args, placeholder); - - length -= holders.length; - if (length < arity) { - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, undefined, - args, holders, undefined, undefined, arity - length); - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return apply(fn, this, args); - } - return wrapper; -} - -export default createCurry; diff --git a/node_modules/lodash-es/_createFind.js b/node_modules/lodash-es/_createFind.js deleted file mode 100644 index d3f8bd5..0000000 --- a/node_modules/lodash-es/_createFind.js +++ /dev/null @@ -1,25 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import isArrayLike from './isArrayLike.js'; -import keys from './keys.js'; - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = baseIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -export default createFind; diff --git a/node_modules/lodash-es/_createFlow.js b/node_modules/lodash-es/_createFlow.js deleted file mode 100644 index 8e97084..0000000 --- a/node_modules/lodash-es/_createFlow.js +++ /dev/null @@ -1,78 +0,0 @@ -import LodashWrapper from './_LodashWrapper.js'; -import flatRest from './_flatRest.js'; -import getData from './_getData.js'; -import getFuncName from './_getFuncName.js'; -import isArray from './isArray.js'; -import isLaziable from './_isLaziable.js'; - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_CURRY_FLAG = 8, - WRAP_PARTIAL_FLAG = 32, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256; - -/** - * Creates a `_.flow` or `_.flowRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new flow function. - */ -function createFlow(fromRight) { - return flatRest(function(funcs) { - var length = funcs.length, - index = length, - prereq = LodashWrapper.prototype.thru; - - if (fromRight) { - funcs.reverse(); - } - while (index--) { - var func = funcs[index]; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (prereq && !wrapper && getFuncName(func) == 'wrapper') { - var wrapper = new LodashWrapper([], true); - } - } - index = wrapper ? index : length; - while (++index < length) { - func = funcs[index]; - - var funcName = getFuncName(func), - data = funcName == 'wrapper' ? getData(func) : undefined; - - if (data && isLaziable(data[0]) && - data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && - !data[4].length && data[9] == 1 - ) { - wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); - } else { - wrapper = (func.length == 1 && isLaziable(func)) - ? wrapper[funcName]() - : wrapper.thru(func); - } - } - return function() { - var args = arguments, - value = args[0]; - - if (wrapper && args.length == 1 && isArray(value)) { - return wrapper.plant(value).value(); - } - var index = 0, - result = length ? funcs[index].apply(this, args) : value; - - while (++index < length) { - result = funcs[index].call(this, result); - } - return result; - }; - }); -} - -export default createFlow; diff --git a/node_modules/lodash-es/_createHybrid.js b/node_modules/lodash-es/_createHybrid.js deleted file mode 100644 index 300f66b..0000000 --- a/node_modules/lodash-es/_createHybrid.js +++ /dev/null @@ -1,92 +0,0 @@ -import composeArgs from './_composeArgs.js'; -import composeArgsRight from './_composeArgsRight.js'; -import countHolders from './_countHolders.js'; -import createCtor from './_createCtor.js'; -import createRecurry from './_createRecurry.js'; -import getHolder from './_getHolder.js'; -import reorder from './_reorder.js'; -import replaceHolders from './_replaceHolders.js'; -import root from './_root.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_ARY_FLAG = 128, - WRAP_FLIP_FLAG = 512; - -/** - * Creates a function that wraps `func` to invoke it with optional `this` - * binding of `thisArg`, partial application, and currying. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided - * to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & WRAP_ARY_FLAG, - isBind = bitmask & WRAP_BIND_FLAG, - isBindKey = bitmask & WRAP_BIND_KEY_FLAG, - isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), - isFlip = bitmask & WRAP_FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length; - - while (index--) { - args[index] = arguments[index]; - } - if (isCurried) { - var placeholder = getHolder(wrapper), - holdersCount = countHolders(args, placeholder); - } - if (partials) { - args = composeArgs(args, partials, holders, isCurried); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight, isCurried); - } - length -= holdersCount; - if (isCurried && length < arity) { - var newHolders = replaceHolders(args, placeholder); - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, thisArg, - args, newHolders, argPos, ary, arity - length - ); - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - length = args.length; - if (argPos) { - args = reorder(args, argPos); - } else if (isFlip && length > 1) { - args.reverse(); - } - if (isAry && ary < length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtor(fn); - } - return fn.apply(thisBinding, args); - } - return wrapper; -} - -export default createHybrid; diff --git a/node_modules/lodash-es/_createInverter.js b/node_modules/lodash-es/_createInverter.js deleted file mode 100644 index 3db3f12..0000000 --- a/node_modules/lodash-es/_createInverter.js +++ /dev/null @@ -1,17 +0,0 @@ -import baseInverter from './_baseInverter.js'; - -/** - * Creates a function like `_.invertBy`. - * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} toIteratee The function to resolve iteratees. - * @returns {Function} Returns the new inverter function. - */ -function createInverter(setter, toIteratee) { - return function(object, iteratee) { - return baseInverter(object, setter, toIteratee(iteratee), {}); - }; -} - -export default createInverter; diff --git a/node_modules/lodash-es/_createMathOperation.js b/node_modules/lodash-es/_createMathOperation.js deleted file mode 100644 index cffe75d..0000000 --- a/node_modules/lodash-es/_createMathOperation.js +++ /dev/null @@ -1,38 +0,0 @@ -import baseToNumber from './_baseToNumber.js'; -import baseToString from './_baseToString.js'; - -/** - * Creates a function that performs a mathematical operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @param {number} [defaultValue] The value used for `undefined` arguments. - * @returns {Function} Returns the new mathematical operation function. - */ -function createMathOperation(operator, defaultValue) { - return function(value, other) { - var result; - if (value === undefined && other === undefined) { - return defaultValue; - } - if (value !== undefined) { - result = value; - } - if (other !== undefined) { - if (result === undefined) { - return other; - } - if (typeof value == 'string' || typeof other == 'string') { - value = baseToString(value); - other = baseToString(other); - } else { - value = baseToNumber(value); - other = baseToNumber(other); - } - result = operator(value, other); - } - return result; - }; -} - -export default createMathOperation; diff --git a/node_modules/lodash-es/_createOver.js b/node_modules/lodash-es/_createOver.js deleted file mode 100644 index a79f373..0000000 --- a/node_modules/lodash-es/_createOver.js +++ /dev/null @@ -1,27 +0,0 @@ -import apply from './_apply.js'; -import arrayMap from './_arrayMap.js'; -import baseIteratee from './_baseIteratee.js'; -import baseRest from './_baseRest.js'; -import baseUnary from './_baseUnary.js'; -import flatRest from './_flatRest.js'; - -/** - * Creates a function like `_.over`. - * - * @private - * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new over function. - */ -function createOver(arrayFunc) { - return flatRest(function(iteratees) { - iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); - return baseRest(function(args) { - var thisArg = this; - return arrayFunc(iteratees, function(iteratee) { - return apply(iteratee, thisArg, args); - }); - }); - }); -} - -export default createOver; diff --git a/node_modules/lodash-es/_createPadding.js b/node_modules/lodash-es/_createPadding.js deleted file mode 100644 index 1e35cd8..0000000 --- a/node_modules/lodash-es/_createPadding.js +++ /dev/null @@ -1,33 +0,0 @@ -import baseRepeat from './_baseRepeat.js'; -import baseToString from './_baseToString.js'; -import castSlice from './_castSlice.js'; -import hasUnicode from './_hasUnicode.js'; -import stringSize from './_stringSize.js'; -import stringToArray from './_stringToArray.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil; - -/** - * Creates the padding for `string` based on `length`. The `chars` string - * is truncated if the number of characters exceeds `length`. - * - * @private - * @param {number} length The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padding for `string`. - */ -function createPadding(length, chars) { - chars = chars === undefined ? ' ' : baseToString(chars); - - var charsLength = chars.length; - if (charsLength < 2) { - return charsLength ? baseRepeat(chars, length) : chars; - } - var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return hasUnicode(chars) - ? castSlice(stringToArray(result), 0, length).join('') - : result.slice(0, length); -} - -export default createPadding; diff --git a/node_modules/lodash-es/_createPartial.js b/node_modules/lodash-es/_createPartial.js deleted file mode 100644 index 851a3b6..0000000 --- a/node_modules/lodash-es/_createPartial.js +++ /dev/null @@ -1,43 +0,0 @@ -import apply from './_apply.js'; -import createCtor from './_createCtor.js'; -import root from './_root.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1; - -/** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. - */ -function createPartial(func, bitmask, thisArg, partials) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply(fn, isBind ? thisArg : this, args); - } - return wrapper; -} - -export default createPartial; diff --git a/node_modules/lodash-es/_createRange.js b/node_modules/lodash-es/_createRange.js deleted file mode 100644 index 51b427e..0000000 --- a/node_modules/lodash-es/_createRange.js +++ /dev/null @@ -1,30 +0,0 @@ -import baseRange from './_baseRange.js'; -import isIterateeCall from './_isIterateeCall.js'; -import toFinite from './toFinite.js'; - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); - return baseRange(start, end, step, fromRight); - }; -} - -export default createRange; diff --git a/node_modules/lodash-es/_createRecurry.js b/node_modules/lodash-es/_createRecurry.js deleted file mode 100644 index d4bd588..0000000 --- a/node_modules/lodash-es/_createRecurry.js +++ /dev/null @@ -1,56 +0,0 @@ -import isLaziable from './_isLaziable.js'; -import setData from './_setData.js'; -import setWrapToString from './_setWrapToString.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64; - -/** - * Creates a function that wraps `func` to continue currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {Function} wrapFunc The function to create the `func` wrapper. - * @param {*} placeholder The placeholder value. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & WRAP_CURRY_FLAG, - newHolders = isCurry ? holders : undefined, - newHoldersRight = isCurry ? undefined : holders, - newPartials = isCurry ? partials : undefined, - newPartialsRight = isCurry ? undefined : partials; - - bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - - if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { - bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); - } - var newData = [ - func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, - newHoldersRight, argPos, ary, arity - ]; - - var result = wrapFunc.apply(undefined, newData); - if (isLaziable(func)) { - setData(result, newData); - } - result.placeholder = placeholder; - return setWrapToString(result, func, bitmask); -} - -export default createRecurry; diff --git a/node_modules/lodash-es/_createRelationalOperation.js b/node_modules/lodash-es/_createRelationalOperation.js deleted file mode 100644 index ea208c6..0000000 --- a/node_modules/lodash-es/_createRelationalOperation.js +++ /dev/null @@ -1,20 +0,0 @@ -import toNumber from './toNumber.js'; - -/** - * Creates a function that performs a relational operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @returns {Function} Returns the new relational operation function. - */ -function createRelationalOperation(operator) { - return function(value, other) { - if (!(typeof value == 'string' && typeof other == 'string')) { - value = toNumber(value); - other = toNumber(other); - } - return operator(value, other); - }; -} - -export default createRelationalOperation; diff --git a/node_modules/lodash-es/_createRound.js b/node_modules/lodash-es/_createRound.js deleted file mode 100644 index 8b3edab..0000000 --- a/node_modules/lodash-es/_createRound.js +++ /dev/null @@ -1,33 +0,0 @@ -import toInteger from './toInteger.js'; -import toNumber from './toNumber.js'; -import toString from './toString.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Creates a function like `_.round`. - * - * @private - * @param {string} methodName The name of the `Math` method to use when rounding. - * @returns {Function} Returns the new round function. - */ -function createRound(methodName) { - var func = Math[methodName]; - return function(number, precision) { - number = toNumber(number); - precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision) { - // Shift with exponential notation to avoid floating-point issues. - // See [MDN](https://mdn.io/round#Examples) for more details. - var pair = (toString(number) + 'e').split('e'), - value = func(pair[0] + 'e' + (+pair[1] + precision)); - - pair = (toString(value) + 'e').split('e'); - return +(pair[0] + 'e' + (+pair[1] - precision)); - } - return func(number); - }; -} - -export default createRound; diff --git a/node_modules/lodash-es/_createSet.js b/node_modules/lodash-es/_createSet.js deleted file mode 100644 index ead1dd7..0000000 --- a/node_modules/lodash-es/_createSet.js +++ /dev/null @@ -1,19 +0,0 @@ -import Set from './_Set.js'; -import noop from './noop.js'; -import setToArray from './_setToArray.js'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { - return new Set(values); -}; - -export default createSet; diff --git a/node_modules/lodash-es/_createToPairs.js b/node_modules/lodash-es/_createToPairs.js deleted file mode 100644 index 433d654..0000000 --- a/node_modules/lodash-es/_createToPairs.js +++ /dev/null @@ -1,30 +0,0 @@ -import baseToPairs from './_baseToPairs.js'; -import getTag from './_getTag.js'; -import mapToArray from './_mapToArray.js'; -import setToPairs from './_setToPairs.js'; - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Creates a `_.toPairs` or `_.toPairsIn` function. - * - * @private - * @param {Function} keysFunc The function to get the keys of a given object. - * @returns {Function} Returns the new pairs function. - */ -function createToPairs(keysFunc) { - return function(object) { - var tag = getTag(object); - if (tag == mapTag) { - return mapToArray(object); - } - if (tag == setTag) { - return setToPairs(object); - } - return baseToPairs(object, keysFunc(object)); - }; -} - -export default createToPairs; diff --git a/node_modules/lodash-es/_createWrap.js b/node_modules/lodash-es/_createWrap.js deleted file mode 100644 index 6b05382..0000000 --- a/node_modules/lodash-es/_createWrap.js +++ /dev/null @@ -1,106 +0,0 @@ -import baseSetData from './_baseSetData.js'; -import createBind from './_createBind.js'; -import createCurry from './_createCurry.js'; -import createHybrid from './_createHybrid.js'; -import createPartial from './_createPartial.js'; -import getData from './_getData.js'; -import mergeData from './_mergeData.js'; -import setData from './_setData.js'; -import setWrapToString from './_setWrapToString.js'; -import toInteger from './toInteger.js'; - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * 512 - `_.flip` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); - partials = holders = undefined; - } - ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); - arity = arity === undefined ? arity : toInteger(arity); - length -= holders ? holders.length : 0; - - if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = undefined; - } - var data = isBindKey ? undefined : getData(func); - - var newData = [ - func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, - argPos, ary, arity - ]; - - if (data) { - mergeData(newData, data); - } - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] === undefined - ? (isBindKey ? 0 : func.length) - : nativeMax(newData[9] - length, 0); - - if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { - bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); - } - if (!bitmask || bitmask == WRAP_BIND_FLAG) { - var result = createBind(func, bitmask, thisArg); - } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { - result = createCurry(func, bitmask, arity); - } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { - result = createPartial(func, bitmask, thisArg, partials); - } else { - result = createHybrid.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setWrapToString(setter(result, newData), func, bitmask); -} - -export default createWrap; diff --git a/node_modules/lodash-es/_customDefaultsAssignIn.js b/node_modules/lodash-es/_customDefaultsAssignIn.js deleted file mode 100644 index 0de9339..0000000 --- a/node_modules/lodash-es/_customDefaultsAssignIn.js +++ /dev/null @@ -1,29 +0,0 @@ -import eq from './eq.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used by `_.defaults` to customize its `_.assignIn` use to assign properties - * of source objects to the destination object for all destination properties - * that resolve to `undefined`. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to assign. - * @param {Object} object The parent object of `objValue`. - * @returns {*} Returns the value to assign. - */ -function customDefaultsAssignIn(objValue, srcValue, key, object) { - if (objValue === undefined || - (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { - return srcValue; - } - return objValue; -} - -export default customDefaultsAssignIn; diff --git a/node_modules/lodash-es/_customDefaultsMerge.js b/node_modules/lodash-es/_customDefaultsMerge.js deleted file mode 100644 index 63c21c8..0000000 --- a/node_modules/lodash-es/_customDefaultsMerge.js +++ /dev/null @@ -1,28 +0,0 @@ -import baseMerge from './_baseMerge.js'; -import isObject from './isObject.js'; - -/** - * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source - * objects into destination objects that are passed thru. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to merge. - * @param {Object} object The parent object of `objValue`. - * @param {Object} source The parent object of `srcValue`. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - * @returns {*} Returns the value to assign. - */ -function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { - if (isObject(objValue) && isObject(srcValue)) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); - stack['delete'](srcValue); - } - return objValue; -} - -export default customDefaultsMerge; diff --git a/node_modules/lodash-es/_customOmitClone.js b/node_modules/lodash-es/_customOmitClone.js deleted file mode 100644 index 00ca441..0000000 --- a/node_modules/lodash-es/_customOmitClone.js +++ /dev/null @@ -1,16 +0,0 @@ -import isPlainObject from './isPlainObject.js'; - -/** - * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain - * objects. - * - * @private - * @param {*} value The value to inspect. - * @param {string} key The key of the property to inspect. - * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. - */ -function customOmitClone(value) { - return isPlainObject(value) ? undefined : value; -} - -export default customOmitClone; diff --git a/node_modules/lodash-es/_deburrLetter.js b/node_modules/lodash-es/_deburrLetter.js deleted file mode 100644 index 88a7b99..0000000 --- a/node_modules/lodash-es/_deburrLetter.js +++ /dev/null @@ -1,71 +0,0 @@ -import basePropertyOf from './_basePropertyOf.js'; - -/** Used to map Latin Unicode letters to basic Latin letters. */ -var deburredLetters = { - // Latin-1 Supplement block. - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss', - // Latin Extended-A block. - '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', - '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', - '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', - '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', - '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', - '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', - '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', - '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', - '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', - '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', - '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', - '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', - '\u0134': 'J', '\u0135': 'j', - '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', - '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', - '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', - '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', - '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', - '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', - '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', - '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', - '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', - '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', - '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', - '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', - '\u0163': 't', '\u0165': 't', '\u0167': 't', - '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', - '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', - '\u0174': 'W', '\u0175': 'w', - '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', - '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', - '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', - '\u0132': 'IJ', '\u0133': 'ij', - '\u0152': 'Oe', '\u0153': 'oe', - '\u0149': "'n", '\u017f': 's' -}; - -/** - * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A - * letters to basic Latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ -var deburrLetter = basePropertyOf(deburredLetters); - -export default deburrLetter; diff --git a/node_modules/lodash-es/_defineProperty.js b/node_modules/lodash-es/_defineProperty.js deleted file mode 100644 index 826fc1d..0000000 --- a/node_modules/lodash-es/_defineProperty.js +++ /dev/null @@ -1,11 +0,0 @@ -import getNative from './_getNative.js'; - -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); - -export default defineProperty; diff --git a/node_modules/lodash-es/_equalArrays.js b/node_modules/lodash-es/_equalArrays.js deleted file mode 100644 index 77cafd9..0000000 --- a/node_modules/lodash-es/_equalArrays.js +++ /dev/null @@ -1,83 +0,0 @@ -import SetCache from './_SetCache.js'; -import arraySome from './_arraySome.js'; -import cacheHas from './_cacheHas.js'; - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -export default equalArrays; diff --git a/node_modules/lodash-es/_equalByTag.js b/node_modules/lodash-es/_equalByTag.js deleted file mode 100644 index a7090ff..0000000 --- a/node_modules/lodash-es/_equalByTag.js +++ /dev/null @@ -1,112 +0,0 @@ -import Symbol from './_Symbol.js'; -import Uint8Array from './_Uint8Array.js'; -import eq from './eq.js'; -import equalArrays from './_equalArrays.js'; -import mapToArray from './_mapToArray.js'; -import setToArray from './_setToArray.js'; - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -export default equalByTag; diff --git a/node_modules/lodash-es/_equalObjects.js b/node_modules/lodash-es/_equalObjects.js deleted file mode 100644 index 9f304ab..0000000 --- a/node_modules/lodash-es/_equalObjects.js +++ /dev/null @@ -1,89 +0,0 @@ -import getAllKeys from './_getAllKeys.js'; - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -export default equalObjects; diff --git a/node_modules/lodash-es/_escapeHtmlChar.js b/node_modules/lodash-es/_escapeHtmlChar.js deleted file mode 100644 index 5362403..0000000 --- a/node_modules/lodash-es/_escapeHtmlChar.js +++ /dev/null @@ -1,21 +0,0 @@ -import basePropertyOf from './_basePropertyOf.js'; - -/** Used to map characters to HTML entities. */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -/** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ -var escapeHtmlChar = basePropertyOf(htmlEscapes); - -export default escapeHtmlChar; diff --git a/node_modules/lodash-es/_escapeStringChar.js b/node_modules/lodash-es/_escapeStringChar.js deleted file mode 100644 index bec2249..0000000 --- a/node_modules/lodash-es/_escapeStringChar.js +++ /dev/null @@ -1,22 +0,0 @@ -/** Used to escape characters for inclusion in compiled string literals. */ -var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' -}; - -/** - * Used by `_.template` to escape characters for inclusion in compiled string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; -} - -export default escapeStringChar; diff --git a/node_modules/lodash-es/_flatRest.js b/node_modules/lodash-es/_flatRest.js deleted file mode 100644 index 45dc439..0000000 --- a/node_modules/lodash-es/_flatRest.js +++ /dev/null @@ -1,16 +0,0 @@ -import flatten from './flatten.js'; -import overRest from './_overRest.js'; -import setToString from './_setToString.js'; - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); -} - -export default flatRest; diff --git a/node_modules/lodash-es/_freeGlobal.js b/node_modules/lodash-es/_freeGlobal.js deleted file mode 100644 index 5e383a1..0000000 --- a/node_modules/lodash-es/_freeGlobal.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -export default freeGlobal; diff --git a/node_modules/lodash-es/_getAllKeys.js b/node_modules/lodash-es/_getAllKeys.js deleted file mode 100644 index e9a6772..0000000 --- a/node_modules/lodash-es/_getAllKeys.js +++ /dev/null @@ -1,16 +0,0 @@ -import baseGetAllKeys from './_baseGetAllKeys.js'; -import getSymbols from './_getSymbols.js'; -import keys from './keys.js'; - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); -} - -export default getAllKeys; diff --git a/node_modules/lodash-es/_getAllKeysIn.js b/node_modules/lodash-es/_getAllKeysIn.js deleted file mode 100644 index d7fac96..0000000 --- a/node_modules/lodash-es/_getAllKeysIn.js +++ /dev/null @@ -1,17 +0,0 @@ -import baseGetAllKeys from './_baseGetAllKeys.js'; -import getSymbolsIn from './_getSymbolsIn.js'; -import keysIn from './keysIn.js'; - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); -} - -export default getAllKeysIn; diff --git a/node_modules/lodash-es/_getData.js b/node_modules/lodash-es/_getData.js deleted file mode 100644 index 36265eb..0000000 --- a/node_modules/lodash-es/_getData.js +++ /dev/null @@ -1,15 +0,0 @@ -import metaMap from './_metaMap.js'; -import noop from './noop.js'; - -/** - * Gets metadata for `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. - */ -var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); -}; - -export default getData; diff --git a/node_modules/lodash-es/_getFuncName.js b/node_modules/lodash-es/_getFuncName.js deleted file mode 100644 index 06e2a3d..0000000 --- a/node_modules/lodash-es/_getFuncName.js +++ /dev/null @@ -1,31 +0,0 @@ -import realNames from './_realNames.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Gets the name of `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. - */ -function getFuncName(func) { - var result = (func.name + ''), - array = realNames[result], - length = hasOwnProperty.call(realNames, result) ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; -} - -export default getFuncName; diff --git a/node_modules/lodash-es/_getHolder.js b/node_modules/lodash-es/_getHolder.js deleted file mode 100644 index 9f76b19..0000000 --- a/node_modules/lodash-es/_getHolder.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Gets the argument placeholder value for `func`. - * - * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. - */ -function getHolder(func) { - var object = func; - return object.placeholder; -} - -export default getHolder; diff --git a/node_modules/lodash-es/_getMapData.js b/node_modules/lodash-es/_getMapData.js deleted file mode 100644 index 6f55f4f..0000000 --- a/node_modules/lodash-es/_getMapData.js +++ /dev/null @@ -1,18 +0,0 @@ -import isKeyable from './_isKeyable.js'; - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -export default getMapData; diff --git a/node_modules/lodash-es/_getMatchData.js b/node_modules/lodash-es/_getMatchData.js deleted file mode 100644 index 545d3e8..0000000 --- a/node_modules/lodash-es/_getMatchData.js +++ /dev/null @@ -1,24 +0,0 @@ -import isStrictComparable from './_isStrictComparable.js'; -import keys from './keys.js'; - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, isStrictComparable(value)]; - } - return result; -} - -export default getMatchData; diff --git a/node_modules/lodash-es/_getNative.js b/node_modules/lodash-es/_getNative.js deleted file mode 100644 index d2cb438..0000000 --- a/node_modules/lodash-es/_getNative.js +++ /dev/null @@ -1,17 +0,0 @@ -import baseIsNative from './_baseIsNative.js'; -import getValue from './_getValue.js'; - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -export default getNative; diff --git a/node_modules/lodash-es/_getPrototype.js b/node_modules/lodash-es/_getPrototype.js deleted file mode 100644 index ce92d48..0000000 --- a/node_modules/lodash-es/_getPrototype.js +++ /dev/null @@ -1,6 +0,0 @@ -import overArg from './_overArg.js'; - -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); - -export default getPrototype; diff --git a/node_modules/lodash-es/_getRawTag.js b/node_modules/lodash-es/_getRawTag.js deleted file mode 100644 index a89a35b..0000000 --- a/node_modules/lodash-es/_getRawTag.js +++ /dev/null @@ -1,46 +0,0 @@ -import Symbol from './_Symbol.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -export default getRawTag; diff --git a/node_modules/lodash-es/_getSymbols.js b/node_modules/lodash-es/_getSymbols.js deleted file mode 100644 index 474442a..0000000 --- a/node_modules/lodash-es/_getSymbols.js +++ /dev/null @@ -1,30 +0,0 @@ -import arrayFilter from './_arrayFilter.js'; -import stubArray from './stubArray.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -export default getSymbols; diff --git a/node_modules/lodash-es/_getSymbolsIn.js b/node_modules/lodash-es/_getSymbolsIn.js deleted file mode 100644 index 5f33b71..0000000 --- a/node_modules/lodash-es/_getSymbolsIn.js +++ /dev/null @@ -1,25 +0,0 @@ -import arrayPush from './_arrayPush.js'; -import getPrototype from './_getPrototype.js'; -import getSymbols from './_getSymbols.js'; -import stubArray from './stubArray.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result = []; - while (object) { - arrayPush(result, getSymbols(object)); - object = getPrototype(object); - } - return result; -}; - -export default getSymbolsIn; diff --git a/node_modules/lodash-es/_getTag.js b/node_modules/lodash-es/_getTag.js deleted file mode 100644 index 0c86db0..0000000 --- a/node_modules/lodash-es/_getTag.js +++ /dev/null @@ -1,58 +0,0 @@ -import DataView from './_DataView.js'; -import Map from './_Map.js'; -import Promise from './_Promise.js'; -import Set from './_Set.js'; -import WeakMap from './_WeakMap.js'; -import baseGetTag from './_baseGetTag.js'; -import toSource from './_toSource.js'; - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - setTag = '[object Set]', - weakMapTag = '[object WeakMap]'; - -var dataViewTag = '[object DataView]'; - -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - -/** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; -} - -export default getTag; diff --git a/node_modules/lodash-es/_getValue.js b/node_modules/lodash-es/_getValue.js deleted file mode 100644 index cbdd538..0000000 --- a/node_modules/lodash-es/_getValue.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -export default getValue; diff --git a/node_modules/lodash-es/_getView.js b/node_modules/lodash-es/_getView.js deleted file mode 100644 index 14fbba4..0000000 --- a/node_modules/lodash-es/_getView.js +++ /dev/null @@ -1,33 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * Gets the view, applying any `transforms` to the `start` and `end` positions. - * - * @private - * @param {number} start The start of the view. - * @param {number} end The end of the view. - * @param {Array} transforms The transformations to apply to the view. - * @returns {Object} Returns an object containing the `start` and `end` - * positions of the view. - */ -function getView(start, end, transforms) { - var index = -1, - length = transforms.length; - - while (++index < length) { - var data = transforms[index], - size = data.size; - - switch (data.type) { - case 'drop': start += size; break; - case 'dropRight': end -= size; break; - case 'take': end = nativeMin(end, start + size); break; - case 'takeRight': start = nativeMax(start, end - size); break; - } - } - return { 'start': start, 'end': end }; -} - -export default getView; diff --git a/node_modules/lodash-es/_getWrapDetails.js b/node_modules/lodash-es/_getWrapDetails.js deleted file mode 100644 index 1de838d..0000000 --- a/node_modules/lodash-es/_getWrapDetails.js +++ /dev/null @@ -1,17 +0,0 @@ -/** Used to match wrap detail comments. */ -var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, - reSplitDetails = /,? & /; - -/** - * Extracts wrapper details from the `source` body comment. - * - * @private - * @param {string} source The source to inspect. - * @returns {Array} Returns the wrapper details. - */ -function getWrapDetails(source) { - var match = source.match(reWrapDetails); - return match ? match[1].split(reSplitDetails) : []; -} - -export default getWrapDetails; diff --git a/node_modules/lodash-es/_hasPath.js b/node_modules/lodash-es/_hasPath.js deleted file mode 100644 index 7decc6c..0000000 --- a/node_modules/lodash-es/_hasPath.js +++ /dev/null @@ -1,39 +0,0 @@ -import castPath from './_castPath.js'; -import isArguments from './isArguments.js'; -import isArray from './isArray.js'; -import isIndex from './_isIndex.js'; -import isLength from './isLength.js'; -import toKey from './_toKey.js'; - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); -} - -export default hasPath; diff --git a/node_modules/lodash-es/_hasUnicode.js b/node_modules/lodash-es/_hasUnicode.js deleted file mode 100644 index c080898..0000000 --- a/node_modules/lodash-es/_hasUnicode.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -export default hasUnicode; diff --git a/node_modules/lodash-es/_hasUnicodeWord.js b/node_modules/lodash-es/_hasUnicodeWord.js deleted file mode 100644 index b2a0260..0000000 --- a/node_modules/lodash-es/_hasUnicodeWord.js +++ /dev/null @@ -1,15 +0,0 @@ -/** Used to detect strings that need a more robust regexp to match words. */ -var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; - -/** - * Checks if `string` contains a word composed of Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a word is found, else `false`. - */ -function hasUnicodeWord(string) { - return reHasUnicodeWord.test(string); -} - -export default hasUnicodeWord; diff --git a/node_modules/lodash-es/_hashClear.js b/node_modules/lodash-es/_hashClear.js deleted file mode 100644 index 5b7cc2d..0000000 --- a/node_modules/lodash-es/_hashClear.js +++ /dev/null @@ -1,15 +0,0 @@ -import nativeCreate from './_nativeCreate.js'; - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; -} - -export default hashClear; diff --git a/node_modules/lodash-es/_hashDelete.js b/node_modules/lodash-es/_hashDelete.js deleted file mode 100644 index 509839f..0000000 --- a/node_modules/lodash-es/_hashDelete.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; -} - -export default hashDelete; diff --git a/node_modules/lodash-es/_hashGet.js b/node_modules/lodash-es/_hashGet.js deleted file mode 100644 index 4a3f43b..0000000 --- a/node_modules/lodash-es/_hashGet.js +++ /dev/null @@ -1,30 +0,0 @@ -import nativeCreate from './_nativeCreate.js'; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -export default hashGet; diff --git a/node_modules/lodash-es/_hashHas.js b/node_modules/lodash-es/_hashHas.js deleted file mode 100644 index 6db025d..0000000 --- a/node_modules/lodash-es/_hashHas.js +++ /dev/null @@ -1,23 +0,0 @@ -import nativeCreate from './_nativeCreate.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); -} - -export default hashHas; diff --git a/node_modules/lodash-es/_hashSet.js b/node_modules/lodash-es/_hashSet.js deleted file mode 100644 index 63a0115..0000000 --- a/node_modules/lodash-es/_hashSet.js +++ /dev/null @@ -1,23 +0,0 @@ -import nativeCreate from './_nativeCreate.js'; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} - -export default hashSet; diff --git a/node_modules/lodash-es/_initCloneArray.js b/node_modules/lodash-es/_initCloneArray.js deleted file mode 100644 index 599732e..0000000 --- a/node_modules/lodash-es/_initCloneArray.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -export default initCloneArray; diff --git a/node_modules/lodash-es/_initCloneByTag.js b/node_modules/lodash-es/_initCloneByTag.js deleted file mode 100644 index f7f3eac..0000000 --- a/node_modules/lodash-es/_initCloneByTag.js +++ /dev/null @@ -1,80 +0,0 @@ -import cloneArrayBuffer from './_cloneArrayBuffer.js'; -import cloneDataView from './_cloneDataView.js'; -import cloneMap from './_cloneMap.js'; -import cloneRegExp from './_cloneRegExp.js'; -import cloneSet from './_cloneSet.js'; -import cloneSymbol from './_cloneSymbol.js'; -import cloneTypedArray from './_cloneTypedArray.js'; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, cloneFunc, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return cloneMap(object, isDeep, cloneFunc); - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return cloneSet(object, isDeep, cloneFunc); - - case symbolTag: - return cloneSymbol(object); - } -} - -export default initCloneByTag; diff --git a/node_modules/lodash-es/_initCloneObject.js b/node_modules/lodash-es/_initCloneObject.js deleted file mode 100644 index bdcf19b..0000000 --- a/node_modules/lodash-es/_initCloneObject.js +++ /dev/null @@ -1,18 +0,0 @@ -import baseCreate from './_baseCreate.js'; -import getPrototype from './_getPrototype.js'; -import isPrototype from './_isPrototype.js'; - -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} - -export default initCloneObject; diff --git a/node_modules/lodash-es/_insertWrapDetails.js b/node_modules/lodash-es/_insertWrapDetails.js deleted file mode 100644 index 5191b7a..0000000 --- a/node_modules/lodash-es/_insertWrapDetails.js +++ /dev/null @@ -1,23 +0,0 @@ -/** Used to match wrap detail comments. */ -var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; - -/** - * Inserts wrapper `details` in a comment at the top of the `source` body. - * - * @private - * @param {string} source The source to modify. - * @returns {Array} details The details to insert. - * @returns {string} Returns the modified source. - */ -function insertWrapDetails(source, details) { - var length = details.length; - if (!length) { - return source; - } - var lastIndex = length - 1; - details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; - details = details.join(length > 2 ? ', ' : ' '); - return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); -} - -export default insertWrapDetails; diff --git a/node_modules/lodash-es/_isFlattenable.js b/node_modules/lodash-es/_isFlattenable.js deleted file mode 100644 index 3bdef96..0000000 --- a/node_modules/lodash-es/_isFlattenable.js +++ /dev/null @@ -1,20 +0,0 @@ -import Symbol from './_Symbol.js'; -import isArguments from './isArguments.js'; -import isArray from './isArray.js'; - -/** Built-in value references. */ -var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -export default isFlattenable; diff --git a/node_modules/lodash-es/_isIndex.js b/node_modules/lodash-es/_isIndex.js deleted file mode 100644 index 0381ad0..0000000 --- a/node_modules/lodash-es/_isIndex.js +++ /dev/null @@ -1,22 +0,0 @@ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -export default isIndex; diff --git a/node_modules/lodash-es/_isIterateeCall.js b/node_modules/lodash-es/_isIterateeCall.js deleted file mode 100644 index 1fb6dc9..0000000 --- a/node_modules/lodash-es/_isIterateeCall.js +++ /dev/null @@ -1,30 +0,0 @@ -import eq from './eq.js'; -import isArrayLike from './isArrayLike.js'; -import isIndex from './_isIndex.js'; -import isObject from './isObject.js'; - -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; -} - -export default isIterateeCall; diff --git a/node_modules/lodash-es/_isKey.js b/node_modules/lodash-es/_isKey.js deleted file mode 100644 index 3e36bce..0000000 --- a/node_modules/lodash-es/_isKey.js +++ /dev/null @@ -1,29 +0,0 @@ -import isArray from './isArray.js'; -import isSymbol from './isSymbol.js'; - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -export default isKey; diff --git a/node_modules/lodash-es/_isKeyable.js b/node_modules/lodash-es/_isKeyable.js deleted file mode 100644 index 2271596..0000000 --- a/node_modules/lodash-es/_isKeyable.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -export default isKeyable; diff --git a/node_modules/lodash-es/_isLaziable.js b/node_modules/lodash-es/_isLaziable.js deleted file mode 100644 index 45a8b1f..0000000 --- a/node_modules/lodash-es/_isLaziable.js +++ /dev/null @@ -1,28 +0,0 @@ -import LazyWrapper from './_LazyWrapper.js'; -import getData from './_getData.js'; -import getFuncName from './_getFuncName.js'; -import lodash from './wrapperLodash.js'; - -/** - * Checks if `func` has a lazy counterpart. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, - * else `false`. - */ -function isLaziable(func) { - var funcName = getFuncName(func), - other = lodash[funcName]; - - if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { - return false; - } - if (func === other) { - return true; - } - var data = getData(other); - return !!data && func === data[0]; -} - -export default isLaziable; diff --git a/node_modules/lodash-es/_isMaskable.js b/node_modules/lodash-es/_isMaskable.js deleted file mode 100644 index 4c17c1c..0000000 --- a/node_modules/lodash-es/_isMaskable.js +++ /dev/null @@ -1,14 +0,0 @@ -import coreJsData from './_coreJsData.js'; -import isFunction from './isFunction.js'; -import stubFalse from './stubFalse.js'; - -/** - * Checks if `func` is capable of being masked. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `func` is maskable, else `false`. - */ -var isMaskable = coreJsData ? isFunction : stubFalse; - -export default isMaskable; diff --git a/node_modules/lodash-es/_isMasked.js b/node_modules/lodash-es/_isMasked.js deleted file mode 100644 index e3f9d6f..0000000 --- a/node_modules/lodash-es/_isMasked.js +++ /dev/null @@ -1,20 +0,0 @@ -import coreJsData from './_coreJsData.js'; - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -export default isMasked; diff --git a/node_modules/lodash-es/_isPrototype.js b/node_modules/lodash-es/_isPrototype.js deleted file mode 100644 index f6c7660..0000000 --- a/node_modules/lodash-es/_isPrototype.js +++ /dev/null @@ -1,18 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -export default isPrototype; diff --git a/node_modules/lodash-es/_isStrictComparable.js b/node_modules/lodash-es/_isStrictComparable.js deleted file mode 100644 index 087efdd..0000000 --- a/node_modules/lodash-es/_isStrictComparable.js +++ /dev/null @@ -1,15 +0,0 @@ -import isObject from './isObject.js'; - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !isObject(value); -} - -export default isStrictComparable; diff --git a/node_modules/lodash-es/_iteratorToArray.js b/node_modules/lodash-es/_iteratorToArray.js deleted file mode 100644 index 315bf2b..0000000 --- a/node_modules/lodash-es/_iteratorToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `iterator` to an array. - * - * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. - */ -function iteratorToArray(iterator) { - var data, - result = []; - - while (!(data = iterator.next()).done) { - result.push(data.value); - } - return result; -} - -export default iteratorToArray; diff --git a/node_modules/lodash-es/_lazyClone.js b/node_modules/lodash-es/_lazyClone.js deleted file mode 100644 index d2f1629..0000000 --- a/node_modules/lodash-es/_lazyClone.js +++ /dev/null @@ -1,23 +0,0 @@ -import LazyWrapper from './_LazyWrapper.js'; -import copyArray from './_copyArray.js'; - -/** - * Creates a clone of the lazy wrapper object. - * - * @private - * @name clone - * @memberOf LazyWrapper - * @returns {Object} Returns the cloned `LazyWrapper` object. - */ -function lazyClone() { - var result = new LazyWrapper(this.__wrapped__); - result.__actions__ = copyArray(this.__actions__); - result.__dir__ = this.__dir__; - result.__filtered__ = this.__filtered__; - result.__iteratees__ = copyArray(this.__iteratees__); - result.__takeCount__ = this.__takeCount__; - result.__views__ = copyArray(this.__views__); - return result; -} - -export default lazyClone; diff --git a/node_modules/lodash-es/_lazyReverse.js b/node_modules/lodash-es/_lazyReverse.js deleted file mode 100644 index e79a9bc..0000000 --- a/node_modules/lodash-es/_lazyReverse.js +++ /dev/null @@ -1,23 +0,0 @@ -import LazyWrapper from './_LazyWrapper.js'; - -/** - * Reverses the direction of lazy iteration. - * - * @private - * @name reverse - * @memberOf LazyWrapper - * @returns {Object} Returns the new reversed `LazyWrapper` object. - */ -function lazyReverse() { - if (this.__filtered__) { - var result = new LazyWrapper(this); - result.__dir__ = -1; - result.__filtered__ = true; - } else { - result = this.clone(); - result.__dir__ *= -1; - } - return result; -} - -export default lazyReverse; diff --git a/node_modules/lodash-es/_lazyValue.js b/node_modules/lodash-es/_lazyValue.js deleted file mode 100644 index ca2e011..0000000 --- a/node_modules/lodash-es/_lazyValue.js +++ /dev/null @@ -1,69 +0,0 @@ -import baseWrapperValue from './_baseWrapperValue.js'; -import getView from './_getView.js'; -import isArray from './isArray.js'; - -/** Used to indicate the type of lazy iteratees. */ -var LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Extracts the unwrapped value from its lazy wrapper. - * - * @private - * @name value - * @memberOf LazyWrapper - * @returns {*} Returns the unwrapped value. - */ -function lazyValue() { - var array = this.__wrapped__.value(), - dir = this.__dir__, - isArr = isArray(array), - isRight = dir < 0, - arrLength = isArr ? array.length : 0, - view = getView(0, arrLength, this.__views__), - start = view.start, - end = view.end, - length = end - start, - index = isRight ? end : (start - 1), - iteratees = this.__iteratees__, - iterLength = iteratees.length, - resIndex = 0, - takeCount = nativeMin(length, this.__takeCount__); - - if (!isArr || (!isRight && arrLength == length && takeCount == length)) { - return baseWrapperValue(array, this.__actions__); - } - var result = []; - - outer: - while (length-- && resIndex < takeCount) { - index += dir; - - var iterIndex = -1, - value = array[index]; - - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], - iteratee = data.iteratee, - type = data.type, - computed = iteratee(value); - - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_FILTER_FLAG) { - continue outer; - } else { - break outer; - } - } - } - result[resIndex++] = value; - } - return result; -} - -export default lazyValue; diff --git a/node_modules/lodash-es/_listCacheClear.js b/node_modules/lodash-es/_listCacheClear.js deleted file mode 100644 index 8cfa184..0000000 --- a/node_modules/lodash-es/_listCacheClear.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} - -export default listCacheClear; diff --git a/node_modules/lodash-es/_listCacheDelete.js b/node_modules/lodash-es/_listCacheDelete.js deleted file mode 100644 index b08c834..0000000 --- a/node_modules/lodash-es/_listCacheDelete.js +++ /dev/null @@ -1,35 +0,0 @@ -import assocIndexOf from './_assocIndexOf.js'; - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; -} - -export default listCacheDelete; diff --git a/node_modules/lodash-es/_listCacheGet.js b/node_modules/lodash-es/_listCacheGet.js deleted file mode 100644 index 53ce001..0000000 --- a/node_modules/lodash-es/_listCacheGet.js +++ /dev/null @@ -1,19 +0,0 @@ -import assocIndexOf from './_assocIndexOf.js'; - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -export default listCacheGet; diff --git a/node_modules/lodash-es/_listCacheHas.js b/node_modules/lodash-es/_listCacheHas.js deleted file mode 100644 index 8701cae..0000000 --- a/node_modules/lodash-es/_listCacheHas.js +++ /dev/null @@ -1,16 +0,0 @@ -import assocIndexOf from './_assocIndexOf.js'; - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} - -export default listCacheHas; diff --git a/node_modules/lodash-es/_listCacheSet.js b/node_modules/lodash-es/_listCacheSet.js deleted file mode 100644 index 8c5a198..0000000 --- a/node_modules/lodash-es/_listCacheSet.js +++ /dev/null @@ -1,26 +0,0 @@ -import assocIndexOf from './_assocIndexOf.js'; - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -export default listCacheSet; diff --git a/node_modules/lodash-es/_mapCacheClear.js b/node_modules/lodash-es/_mapCacheClear.js deleted file mode 100644 index e6b3d9c..0000000 --- a/node_modules/lodash-es/_mapCacheClear.js +++ /dev/null @@ -1,21 +0,0 @@ -import Hash from './_Hash.js'; -import ListCache from './_ListCache.js'; -import Map from './_Map.js'; - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -export default mapCacheClear; diff --git a/node_modules/lodash-es/_mapCacheDelete.js b/node_modules/lodash-es/_mapCacheDelete.js deleted file mode 100644 index 1afc18f..0000000 --- a/node_modules/lodash-es/_mapCacheDelete.js +++ /dev/null @@ -1,18 +0,0 @@ -import getMapData from './_getMapData.js'; - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} - -export default mapCacheDelete; diff --git a/node_modules/lodash-es/_mapCacheGet.js b/node_modules/lodash-es/_mapCacheGet.js deleted file mode 100644 index 3b481e0..0000000 --- a/node_modules/lodash-es/_mapCacheGet.js +++ /dev/null @@ -1,16 +0,0 @@ -import getMapData from './_getMapData.js'; - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -export default mapCacheGet; diff --git a/node_modules/lodash-es/_mapCacheHas.js b/node_modules/lodash-es/_mapCacheHas.js deleted file mode 100644 index 9de3e7f..0000000 --- a/node_modules/lodash-es/_mapCacheHas.js +++ /dev/null @@ -1,16 +0,0 @@ -import getMapData from './_getMapData.js'; - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} - -export default mapCacheHas; diff --git a/node_modules/lodash-es/_mapCacheSet.js b/node_modules/lodash-es/_mapCacheSet.js deleted file mode 100644 index e757c36..0000000 --- a/node_modules/lodash-es/_mapCacheSet.js +++ /dev/null @@ -1,22 +0,0 @@ -import getMapData from './_getMapData.js'; - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; -} - -export default mapCacheSet; diff --git a/node_modules/lodash-es/_mapToArray.js b/node_modules/lodash-es/_mapToArray.js deleted file mode 100644 index 82346d5..0000000 --- a/node_modules/lodash-es/_mapToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -export default mapToArray; diff --git a/node_modules/lodash-es/_matchesStrictComparable.js b/node_modules/lodash-es/_matchesStrictComparable.js deleted file mode 100644 index 531ffb3..0000000 --- a/node_modules/lodash-es/_matchesStrictComparable.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -export default matchesStrictComparable; diff --git a/node_modules/lodash-es/_memoizeCapped.js b/node_modules/lodash-es/_memoizeCapped.js deleted file mode 100644 index d2b9399..0000000 --- a/node_modules/lodash-es/_memoizeCapped.js +++ /dev/null @@ -1,26 +0,0 @@ -import memoize from './memoize.js'; - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -export default memoizeCapped; diff --git a/node_modules/lodash-es/_mergeData.js b/node_modules/lodash-es/_mergeData.js deleted file mode 100644 index 9222069..0000000 --- a/node_modules/lodash-es/_mergeData.js +++ /dev/null @@ -1,90 +0,0 @@ -import composeArgs from './_composeArgs.js'; -import composeArgsRight from './_composeArgsRight.js'; -import replaceHolders from './_replaceHolders.js'; - -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Merges the function metadata of `source` into `data`. - * - * Merging metadata reduces the number of wrappers used to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and - * `_.rearg` modify function arguments, making the order in which they are - * executed important, preventing the merging of metadata. However, we make - * an exception for a safe combined case where curried functions have `_.ary` - * and or `_.rearg` applied. - * - * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. - */ -function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); - - var isCombo = - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || - ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & WRAP_BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : value; - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = value; - } - // Use source `ary` if it's smaller. - if (srcBitmask & WRAP_ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; - } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; -} - -export default mergeData; diff --git a/node_modules/lodash-es/_metaMap.js b/node_modules/lodash-es/_metaMap.js deleted file mode 100644 index d7e5b95..0000000 --- a/node_modules/lodash-es/_metaMap.js +++ /dev/null @@ -1,6 +0,0 @@ -import WeakMap from './_WeakMap.js'; - -/** Used to store function metadata. */ -var metaMap = WeakMap && new WeakMap; - -export default metaMap; diff --git a/node_modules/lodash-es/_nativeCreate.js b/node_modules/lodash-es/_nativeCreate.js deleted file mode 100644 index 27b476b..0000000 --- a/node_modules/lodash-es/_nativeCreate.js +++ /dev/null @@ -1,6 +0,0 @@ -import getNative from './_getNative.js'; - -/* Built-in method references that are verified to be native. */ -var nativeCreate = getNative(Object, 'create'); - -export default nativeCreate; diff --git a/node_modules/lodash-es/_nativeKeys.js b/node_modules/lodash-es/_nativeKeys.js deleted file mode 100644 index 2ec8ec6..0000000 --- a/node_modules/lodash-es/_nativeKeys.js +++ /dev/null @@ -1,6 +0,0 @@ -import overArg from './_overArg.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); - -export default nativeKeys; diff --git a/node_modules/lodash-es/_nativeKeysIn.js b/node_modules/lodash-es/_nativeKeysIn.js deleted file mode 100644 index 94eda99..0000000 --- a/node_modules/lodash-es/_nativeKeysIn.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} - -export default nativeKeysIn; diff --git a/node_modules/lodash-es/_nodeUtil.js b/node_modules/lodash-es/_nodeUtil.js deleted file mode 100644 index 4673316..0000000 --- a/node_modules/lodash-es/_nodeUtil.js +++ /dev/null @@ -1,22 +0,0 @@ -import freeGlobal from './_freeGlobal.js'; - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); - -export default nodeUtil; diff --git a/node_modules/lodash-es/_objectToString.js b/node_modules/lodash-es/_objectToString.js deleted file mode 100644 index 749a5f9..0000000 --- a/node_modules/lodash-es/_objectToString.js +++ /dev/null @@ -1,22 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -export default objectToString; diff --git a/node_modules/lodash-es/_overArg.js b/node_modules/lodash-es/_overArg.js deleted file mode 100644 index 93bafe3..0000000 --- a/node_modules/lodash-es/_overArg.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -export default overArg; diff --git a/node_modules/lodash-es/_overRest.js b/node_modules/lodash-es/_overRest.js deleted file mode 100644 index f4f79cb..0000000 --- a/node_modules/lodash-es/_overRest.js +++ /dev/null @@ -1,36 +0,0 @@ -import apply from './_apply.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; -} - -export default overRest; diff --git a/node_modules/lodash-es/_parent.js b/node_modules/lodash-es/_parent.js deleted file mode 100644 index ef6f8b4..0000000 --- a/node_modules/lodash-es/_parent.js +++ /dev/null @@ -1,16 +0,0 @@ -import baseGet from './_baseGet.js'; -import baseSlice from './_baseSlice.js'; - -/** - * Gets the parent value at `path` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path to get the parent value of. - * @returns {*} Returns the parent value. - */ -function parent(object, path) { - return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); -} - -export default parent; diff --git a/node_modules/lodash-es/_reEscape.js b/node_modules/lodash-es/_reEscape.js deleted file mode 100644 index cd3729b..0000000 --- a/node_modules/lodash-es/_reEscape.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to match template delimiters. */ -var reEscape = /<%-([\s\S]+?)%>/g; - -export default reEscape; diff --git a/node_modules/lodash-es/_reEvaluate.js b/node_modules/lodash-es/_reEvaluate.js deleted file mode 100644 index 563964b..0000000 --- a/node_modules/lodash-es/_reEvaluate.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to match template delimiters. */ -var reEvaluate = /<%([\s\S]+?)%>/g; - -export default reEvaluate; diff --git a/node_modules/lodash-es/_reInterpolate.js b/node_modules/lodash-es/_reInterpolate.js deleted file mode 100644 index a3cdb20..0000000 --- a/node_modules/lodash-es/_reInterpolate.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to match template delimiters. */ -var reInterpolate = /<%=([\s\S]+?)%>/g; - -export default reInterpolate; diff --git a/node_modules/lodash-es/_realNames.js b/node_modules/lodash-es/_realNames.js deleted file mode 100644 index df195ed..0000000 --- a/node_modules/lodash-es/_realNames.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to lookup unminified function names. */ -var realNames = {}; - -export default realNames; diff --git a/node_modules/lodash-es/_reorder.js b/node_modules/lodash-es/_reorder.js deleted file mode 100644 index b7ade47..0000000 --- a/node_modules/lodash-es/_reorder.js +++ /dev/null @@ -1,29 +0,0 @@ -import copyArray from './_copyArray.js'; -import isIndex from './_isIndex.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. - * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ -function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = copyArray(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; -} - -export default reorder; diff --git a/node_modules/lodash-es/_replaceHolders.js b/node_modules/lodash-es/_replaceHolders.js deleted file mode 100644 index e636054..0000000 --- a/node_modules/lodash-es/_replaceHolders.js +++ /dev/null @@ -1,29 +0,0 @@ -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ -function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER; - result[resIndex++] = index; - } - } - return result; -} - -export default replaceHolders; diff --git a/node_modules/lodash-es/_root.js b/node_modules/lodash-es/_root.js deleted file mode 100644 index 281f812..0000000 --- a/node_modules/lodash-es/_root.js +++ /dev/null @@ -1,9 +0,0 @@ -import freeGlobal from './_freeGlobal.js'; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -export default root; diff --git a/node_modules/lodash-es/_setCacheAdd.js b/node_modules/lodash-es/_setCacheAdd.js deleted file mode 100644 index d3a42d3..0000000 --- a/node_modules/lodash-es/_setCacheAdd.js +++ /dev/null @@ -1,19 +0,0 @@ -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -export default setCacheAdd; diff --git a/node_modules/lodash-es/_setCacheHas.js b/node_modules/lodash-es/_setCacheHas.js deleted file mode 100644 index 67f4c8a..0000000 --- a/node_modules/lodash-es/_setCacheHas.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -export default setCacheHas; diff --git a/node_modules/lodash-es/_setData.js b/node_modules/lodash-es/_setData.js deleted file mode 100644 index 8b6bac9..0000000 --- a/node_modules/lodash-es/_setData.js +++ /dev/null @@ -1,20 +0,0 @@ -import baseSetData from './_baseSetData.js'; -import shortOut from './_shortOut.js'; - -/** - * Sets metadata for `func`. - * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity - * function to avoid garbage collection pauses in V8. See - * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) - * for more details. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ -var setData = shortOut(baseSetData); - -export default setData; diff --git a/node_modules/lodash-es/_setToArray.js b/node_modules/lodash-es/_setToArray.js deleted file mode 100644 index fdf823c..0000000 --- a/node_modules/lodash-es/_setToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -export default setToArray; diff --git a/node_modules/lodash-es/_setToPairs.js b/node_modules/lodash-es/_setToPairs.js deleted file mode 100644 index f0d123b..0000000 --- a/node_modules/lodash-es/_setToPairs.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `set` to its value-value pairs. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the value-value pairs. - */ -function setToPairs(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = [value, value]; - }); - return result; -} - -export default setToPairs; diff --git a/node_modules/lodash-es/_setToString.js b/node_modules/lodash-es/_setToString.js deleted file mode 100644 index db2dd26..0000000 --- a/node_modules/lodash-es/_setToString.js +++ /dev/null @@ -1,14 +0,0 @@ -import baseSetToString from './_baseSetToString.js'; -import shortOut from './_shortOut.js'; - -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var setToString = shortOut(baseSetToString); - -export default setToString; diff --git a/node_modules/lodash-es/_setWrapToString.js b/node_modules/lodash-es/_setWrapToString.js deleted file mode 100644 index 16b08fd..0000000 --- a/node_modules/lodash-es/_setWrapToString.js +++ /dev/null @@ -1,21 +0,0 @@ -import getWrapDetails from './_getWrapDetails.js'; -import insertWrapDetails from './_insertWrapDetails.js'; -import setToString from './_setToString.js'; -import updateWrapDetails from './_updateWrapDetails.js'; - -/** - * Sets the `toString` method of `wrapper` to mimic the source of `reference` - * with wrapper details in a comment at the top of the source body. - * - * @private - * @param {Function} wrapper The function to modify. - * @param {Function} reference The reference function. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Function} Returns `wrapper`. - */ -function setWrapToString(wrapper, reference, bitmask) { - var source = (reference + ''); - return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); -} - -export default setWrapToString; diff --git a/node_modules/lodash-es/_shortOut.js b/node_modules/lodash-es/_shortOut.js deleted file mode 100644 index 78fadcd..0000000 --- a/node_modules/lodash-es/_shortOut.js +++ /dev/null @@ -1,37 +0,0 @@ -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 800, - HOT_SPAN = 16; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeNow = Date.now; - -/** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ -function shortOut(func) { - var count = 0, - lastCalled = 0; - - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; -} - -export default shortOut; diff --git a/node_modules/lodash-es/_shuffleSelf.js b/node_modules/lodash-es/_shuffleSelf.js deleted file mode 100644 index a04ebea..0000000 --- a/node_modules/lodash-es/_shuffleSelf.js +++ /dev/null @@ -1,28 +0,0 @@ -import baseRandom from './_baseRandom.js'; - -/** - * A specialized version of `_.shuffle` which mutates and sets the size of `array`. - * - * @private - * @param {Array} array The array to shuffle. - * @param {number} [size=array.length] The size of `array`. - * @returns {Array} Returns `array`. - */ -function shuffleSelf(array, size) { - var index = -1, - length = array.length, - lastIndex = length - 1; - - size = size === undefined ? length : size; - while (++index < size) { - var rand = baseRandom(index, lastIndex), - value = array[rand]; - - array[rand] = array[index]; - array[index] = value; - } - array.length = size; - return array; -} - -export default shuffleSelf; diff --git a/node_modules/lodash-es/_stackClear.js b/node_modules/lodash-es/_stackClear.js deleted file mode 100644 index d4b10b0..0000000 --- a/node_modules/lodash-es/_stackClear.js +++ /dev/null @@ -1,15 +0,0 @@ -import ListCache from './_ListCache.js'; - -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; - this.size = 0; -} - -export default stackClear; diff --git a/node_modules/lodash-es/_stackDelete.js b/node_modules/lodash-es/_stackDelete.js deleted file mode 100644 index c3df897..0000000 --- a/node_modules/lodash-es/_stackDelete.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); - - this.size = data.size; - return result; -} - -export default stackDelete; diff --git a/node_modules/lodash-es/_stackGet.js b/node_modules/lodash-es/_stackGet.js deleted file mode 100644 index 139b9ac..0000000 --- a/node_modules/lodash-es/_stackGet.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} - -export default stackGet; diff --git a/node_modules/lodash-es/_stackHas.js b/node_modules/lodash-es/_stackHas.js deleted file mode 100644 index bc25f5a..0000000 --- a/node_modules/lodash-es/_stackHas.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} - -export default stackHas; diff --git a/node_modules/lodash-es/_stackSet.js b/node_modules/lodash-es/_stackSet.js deleted file mode 100644 index a85af6c..0000000 --- a/node_modules/lodash-es/_stackSet.js +++ /dev/null @@ -1,34 +0,0 @@ -import ListCache from './_ListCache.js'; -import Map from './_Map.js'; -import MapCache from './_MapCache.js'; - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - return this; -} - -export default stackSet; diff --git a/node_modules/lodash-es/_strictIndexOf.js b/node_modules/lodash-es/_strictIndexOf.js deleted file mode 100644 index 0dfad1e..0000000 --- a/node_modules/lodash-es/_strictIndexOf.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -export default strictIndexOf; diff --git a/node_modules/lodash-es/_strictLastIndexOf.js b/node_modules/lodash-es/_strictLastIndexOf.js deleted file mode 100644 index 6ddf04c..0000000 --- a/node_modules/lodash-es/_strictLastIndexOf.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A specialized version of `_.lastIndexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictLastIndexOf(array, value, fromIndex) { - var index = fromIndex + 1; - while (index--) { - if (array[index] === value) { - return index; - } - } - return index; -} - -export default strictLastIndexOf; diff --git a/node_modules/lodash-es/_stringSize.js b/node_modules/lodash-es/_stringSize.js deleted file mode 100644 index 17443a8..0000000 --- a/node_modules/lodash-es/_stringSize.js +++ /dev/null @@ -1,18 +0,0 @@ -import asciiSize from './_asciiSize.js'; -import hasUnicode from './_hasUnicode.js'; -import unicodeSize from './_unicodeSize.js'; - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); -} - -export default stringSize; diff --git a/node_modules/lodash-es/_stringToArray.js b/node_modules/lodash-es/_stringToArray.js deleted file mode 100644 index 1ce84fd..0000000 --- a/node_modules/lodash-es/_stringToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -import asciiToArray from './_asciiToArray.js'; -import hasUnicode from './_hasUnicode.js'; -import unicodeToArray from './_unicodeToArray.js'; - -/** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); -} - -export default stringToArray; diff --git a/node_modules/lodash-es/_stringToPath.js b/node_modules/lodash-es/_stringToPath.js deleted file mode 100644 index f0617e7..0000000 --- a/node_modules/lodash-es/_stringToPath.js +++ /dev/null @@ -1,28 +0,0 @@ -import memoizeCapped from './_memoizeCapped.js'; - -/** Used to match property names within property paths. */ -var reLeadingDot = /^\./, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoizeCapped(function(string) { - var result = []; - if (reLeadingDot.test(string)) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -export default stringToPath; diff --git a/node_modules/lodash-es/_toKey.js b/node_modules/lodash-es/_toKey.js deleted file mode 100644 index 295277f..0000000 --- a/node_modules/lodash-es/_toKey.js +++ /dev/null @@ -1,21 +0,0 @@ -import isSymbol from './isSymbol.js'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -export default toKey; diff --git a/node_modules/lodash-es/_toSource.js b/node_modules/lodash-es/_toSource.js deleted file mode 100644 index 2696f7a..0000000 --- a/node_modules/lodash-es/_toSource.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used for built-in method references. */ -var funcProto = Function.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -export default toSource; diff --git a/node_modules/lodash-es/_unescapeHtmlChar.js b/node_modules/lodash-es/_unescapeHtmlChar.js deleted file mode 100644 index e1876cc..0000000 --- a/node_modules/lodash-es/_unescapeHtmlChar.js +++ /dev/null @@ -1,21 +0,0 @@ -import basePropertyOf from './_basePropertyOf.js'; - -/** Used to map HTML entities to characters. */ -var htmlUnescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'" -}; - -/** - * Used by `_.unescape` to convert HTML entities to characters. - * - * @private - * @param {string} chr The matched character to unescape. - * @returns {string} Returns the unescaped character. - */ -var unescapeHtmlChar = basePropertyOf(htmlUnescapes); - -export default unescapeHtmlChar; diff --git a/node_modules/lodash-es/_unicodeSize.js b/node_modules/lodash-es/_unicodeSize.js deleted file mode 100644 index 8c03175..0000000 --- a/node_modules/lodash-es/_unicodeSize.js +++ /dev/null @@ -1,44 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -export default unicodeSize; diff --git a/node_modules/lodash-es/_unicodeToArray.js b/node_modules/lodash-es/_unicodeToArray.js deleted file mode 100644 index ea49762..0000000 --- a/node_modules/lodash-es/_unicodeToArray.js +++ /dev/null @@ -1,40 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function unicodeToArray(string) { - return string.match(reUnicode) || []; -} - -export default unicodeToArray; diff --git a/node_modules/lodash-es/_unicodeWords.js b/node_modules/lodash-es/_unicodeWords.js deleted file mode 100644 index 99acbef..0000000 --- a/node_modules/lodash-es/_unicodeWords.js +++ /dev/null @@ -1,69 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; - -/** Used to compose unicode capture groups. */ -var rsApos = "['\u2019]", - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', - rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', - rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; - -/** Used to match complex or compound words. */ -var reUnicodeWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', - rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, - rsUpper + '+' + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji -].join('|'), 'g'); - -/** - * Splits a Unicode `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ -function unicodeWords(string) { - return string.match(reUnicodeWord) || []; -} - -export default unicodeWords; diff --git a/node_modules/lodash-es/_updateWrapDetails.js b/node_modules/lodash-es/_updateWrapDetails.js deleted file mode 100644 index 69ecc1e..0000000 --- a/node_modules/lodash-es/_updateWrapDetails.js +++ /dev/null @@ -1,46 +0,0 @@ -import arrayEach from './_arrayEach.js'; -import arrayIncludes from './_arrayIncludes.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; - -/** Used to associate wrap methods with their bit flags. */ -var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] -]; - -/** - * Updates wrapper `details` based on `bitmask` flags. - * - * @private - * @returns {Array} details The details to modify. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Array} Returns `details`. - */ -function updateWrapDetails(details, bitmask) { - arrayEach(wrapFlags, function(pair) { - var value = '_.' + pair[0]; - if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { - details.push(value); - } - }); - return details.sort(); -} - -export default updateWrapDetails; diff --git a/node_modules/lodash-es/_wrapperClone.js b/node_modules/lodash-es/_wrapperClone.js deleted file mode 100644 index 8d0d730..0000000 --- a/node_modules/lodash-es/_wrapperClone.js +++ /dev/null @@ -1,23 +0,0 @@ -import LazyWrapper from './_LazyWrapper.js'; -import LodashWrapper from './_LodashWrapper.js'; -import copyArray from './_copyArray.js'; - -/** - * Creates a clone of `wrapper`. - * - * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. - */ -function wrapperClone(wrapper) { - if (wrapper instanceof LazyWrapper) { - return wrapper.clone(); - } - var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); - result.__actions__ = copyArray(wrapper.__actions__); - result.__index__ = wrapper.__index__; - result.__values__ = wrapper.__values__; - return result; -} - -export default wrapperClone; diff --git a/node_modules/lodash-es/add.js b/node_modules/lodash-es/add.js deleted file mode 100644 index b17f107..0000000 --- a/node_modules/lodash-es/add.js +++ /dev/null @@ -1,22 +0,0 @@ -import createMathOperation from './_createMathOperation.js'; - -/** - * Adds two numbers. - * - * @static - * @memberOf _ - * @since 3.4.0 - * @category Math - * @param {number} augend The first number in an addition. - * @param {number} addend The second number in an addition. - * @returns {number} Returns the total. - * @example - * - * _.add(6, 4); - * // => 10 - */ -var add = createMathOperation(function(augend, addend) { - return augend + addend; -}, 0); - -export default add; diff --git a/node_modules/lodash-es/after.js b/node_modules/lodash-es/after.js deleted file mode 100644 index f05a32d..0000000 --- a/node_modules/lodash-es/after.js +++ /dev/null @@ -1,42 +0,0 @@ -import toInteger from './toInteger.js'; - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it's called `n` or more times. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var saves = ['profile', 'settings']; - * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); - * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => Logs 'done saving!' after the two async saves have completed. - */ -function after(n, func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; -} - -export default after; diff --git a/node_modules/lodash-es/array.default.js b/node_modules/lodash-es/array.default.js deleted file mode 100644 index 13c0797..0000000 --- a/node_modules/lodash-es/array.default.js +++ /dev/null @@ -1,81 +0,0 @@ -import chunk from './chunk.js'; -import compact from './compact.js'; -import concat from './concat.js'; -import difference from './difference.js'; -import differenceBy from './differenceBy.js'; -import differenceWith from './differenceWith.js'; -import drop from './drop.js'; -import dropRight from './dropRight.js'; -import dropRightWhile from './dropRightWhile.js'; -import dropWhile from './dropWhile.js'; -import fill from './fill.js'; -import findIndex from './findIndex.js'; -import findLastIndex from './findLastIndex.js'; -import first from './first.js'; -import flatten from './flatten.js'; -import flattenDeep from './flattenDeep.js'; -import flattenDepth from './flattenDepth.js'; -import fromPairs from './fromPairs.js'; -import head from './head.js'; -import indexOf from './indexOf.js'; -import initial from './initial.js'; -import intersection from './intersection.js'; -import intersectionBy from './intersectionBy.js'; -import intersectionWith from './intersectionWith.js'; -import join from './join.js'; -import last from './last.js'; -import lastIndexOf from './lastIndexOf.js'; -import nth from './nth.js'; -import pull from './pull.js'; -import pullAll from './pullAll.js'; -import pullAllBy from './pullAllBy.js'; -import pullAllWith from './pullAllWith.js'; -import pullAt from './pullAt.js'; -import remove from './remove.js'; -import reverse from './reverse.js'; -import slice from './slice.js'; -import sortedIndex from './sortedIndex.js'; -import sortedIndexBy from './sortedIndexBy.js'; -import sortedIndexOf from './sortedIndexOf.js'; -import sortedLastIndex from './sortedLastIndex.js'; -import sortedLastIndexBy from './sortedLastIndexBy.js'; -import sortedLastIndexOf from './sortedLastIndexOf.js'; -import sortedUniq from './sortedUniq.js'; -import sortedUniqBy from './sortedUniqBy.js'; -import tail from './tail.js'; -import take from './take.js'; -import takeRight from './takeRight.js'; -import takeRightWhile from './takeRightWhile.js'; -import takeWhile from './takeWhile.js'; -import union from './union.js'; -import unionBy from './unionBy.js'; -import unionWith from './unionWith.js'; -import uniq from './uniq.js'; -import uniqBy from './uniqBy.js'; -import uniqWith from './uniqWith.js'; -import unzip from './unzip.js'; -import unzipWith from './unzipWith.js'; -import without from './without.js'; -import xor from './xor.js'; -import xorBy from './xorBy.js'; -import xorWith from './xorWith.js'; -import zip from './zip.js'; -import zipObject from './zipObject.js'; -import zipObjectDeep from './zipObjectDeep.js'; -import zipWith from './zipWith.js'; - -export default { - chunk, compact, concat, difference, differenceBy, - differenceWith, drop, dropRight, dropRightWhile, dropWhile, - fill, findIndex, findLastIndex, first, flatten, - flattenDeep, flattenDepth, fromPairs, head, indexOf, - initial, intersection, intersectionBy, intersectionWith, join, - last, lastIndexOf, nth, pull, pullAll, - pullAllBy, pullAllWith, pullAt, remove, reverse, - slice, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, - sortedLastIndexBy, sortedLastIndexOf, sortedUniq, sortedUniqBy, tail, - take, takeRight, takeRightWhile, takeWhile, union, - unionBy, unionWith, uniq, uniqBy, uniqWith, - unzip, unzipWith, without, xor, xorBy, - xorWith, zip, zipObject, zipObjectDeep, zipWith -}; diff --git a/node_modules/lodash-es/array.js b/node_modules/lodash-es/array.js deleted file mode 100644 index b579b5c..0000000 --- a/node_modules/lodash-es/array.js +++ /dev/null @@ -1,66 +0,0 @@ -export { default as chunk } from './chunk.js'; -export { default as compact } from './compact.js'; -export { default as concat } from './concat.js'; -export { default as difference } from './difference.js'; -export { default as differenceBy } from './differenceBy.js'; -export { default as differenceWith } from './differenceWith.js'; -export { default as drop } from './drop.js'; -export { default as dropRight } from './dropRight.js'; -export { default as dropRightWhile } from './dropRightWhile.js'; -export { default as dropWhile } from './dropWhile.js'; -export { default as fill } from './fill.js'; -export { default as findIndex } from './findIndex.js'; -export { default as findLastIndex } from './findLastIndex.js'; -export { default as first } from './first.js'; -export { default as flatten } from './flatten.js'; -export { default as flattenDeep } from './flattenDeep.js'; -export { default as flattenDepth } from './flattenDepth.js'; -export { default as fromPairs } from './fromPairs.js'; -export { default as head } from './head.js'; -export { default as indexOf } from './indexOf.js'; -export { default as initial } from './initial.js'; -export { default as intersection } from './intersection.js'; -export { default as intersectionBy } from './intersectionBy.js'; -export { default as intersectionWith } from './intersectionWith.js'; -export { default as join } from './join.js'; -export { default as last } from './last.js'; -export { default as lastIndexOf } from './lastIndexOf.js'; -export { default as nth } from './nth.js'; -export { default as pull } from './pull.js'; -export { default as pullAll } from './pullAll.js'; -export { default as pullAllBy } from './pullAllBy.js'; -export { default as pullAllWith } from './pullAllWith.js'; -export { default as pullAt } from './pullAt.js'; -export { default as remove } from './remove.js'; -export { default as reverse } from './reverse.js'; -export { default as slice } from './slice.js'; -export { default as sortedIndex } from './sortedIndex.js'; -export { default as sortedIndexBy } from './sortedIndexBy.js'; -export { default as sortedIndexOf } from './sortedIndexOf.js'; -export { default as sortedLastIndex } from './sortedLastIndex.js'; -export { default as sortedLastIndexBy } from './sortedLastIndexBy.js'; -export { default as sortedLastIndexOf } from './sortedLastIndexOf.js'; -export { default as sortedUniq } from './sortedUniq.js'; -export { default as sortedUniqBy } from './sortedUniqBy.js'; -export { default as tail } from './tail.js'; -export { default as take } from './take.js'; -export { default as takeRight } from './takeRight.js'; -export { default as takeRightWhile } from './takeRightWhile.js'; -export { default as takeWhile } from './takeWhile.js'; -export { default as union } from './union.js'; -export { default as unionBy } from './unionBy.js'; -export { default as unionWith } from './unionWith.js'; -export { default as uniq } from './uniq.js'; -export { default as uniqBy } from './uniqBy.js'; -export { default as uniqWith } from './uniqWith.js'; -export { default as unzip } from './unzip.js'; -export { default as unzipWith } from './unzipWith.js'; -export { default as without } from './without.js'; -export { default as xor } from './xor.js'; -export { default as xorBy } from './xorBy.js'; -export { default as xorWith } from './xorWith.js'; -export { default as zip } from './zip.js'; -export { default as zipObject } from './zipObject.js'; -export { default as zipObjectDeep } from './zipObjectDeep.js'; -export { default as zipWith } from './zipWith.js'; -export { default } from './array.default.js'; diff --git a/node_modules/lodash-es/ary.js b/node_modules/lodash-es/ary.js deleted file mode 100644 index eb64a45..0000000 --- a/node_modules/lodash-es/ary.js +++ /dev/null @@ -1,29 +0,0 @@ -import createWrap from './_createWrap.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_ARY_FLAG = 128; - -/** - * Creates a function that invokes `func`, with up to `n` arguments, - * ignoring any additional arguments. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new capped function. - * @example - * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] - */ -function ary(func, n, guard) { - n = guard ? undefined : n; - n = (func && n == null) ? func.length : n; - return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); -} - -export default ary; diff --git a/node_modules/lodash-es/assign.js b/node_modules/lodash-es/assign.js deleted file mode 100644 index ed9329f..0000000 --- a/node_modules/lodash-es/assign.js +++ /dev/null @@ -1,58 +0,0 @@ -import assignValue from './_assignValue.js'; -import copyObject from './_copyObject.js'; -import createAssigner from './_createAssigner.js'; -import isArrayLike from './isArrayLike.js'; -import isPrototype from './_isPrototype.js'; -import keys from './keys.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } - */ -var assign = createAssigner(function(object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; - } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); - } - } -}); - -export default assign; diff --git a/node_modules/lodash-es/assignIn.js b/node_modules/lodash-es/assignIn.js deleted file mode 100644 index 8aab0e0..0000000 --- a/node_modules/lodash-es/assignIn.js +++ /dev/null @@ -1,40 +0,0 @@ -import copyObject from './_copyObject.js'; -import createAssigner from './_createAssigner.js'; -import keysIn from './keysIn.js'; - -/** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } - */ -var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); -}); - -export default assignIn; diff --git a/node_modules/lodash-es/assignInWith.js b/node_modules/lodash-es/assignInWith.js deleted file mode 100644 index c7864a1..0000000 --- a/node_modules/lodash-es/assignInWith.js +++ /dev/null @@ -1,38 +0,0 @@ -import copyObject from './_copyObject.js'; -import createAssigner from './_createAssigner.js'; -import keysIn from './keysIn.js'; - -/** - * This method is like `_.assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); -}); - -export default assignInWith; diff --git a/node_modules/lodash-es/assignWith.js b/node_modules/lodash-es/assignWith.js deleted file mode 100644 index f19d7c5..0000000 --- a/node_modules/lodash-es/assignWith.js +++ /dev/null @@ -1,37 +0,0 @@ -import copyObject from './_copyObject.js'; -import createAssigner from './_createAssigner.js'; -import keys from './keys.js'; - -/** - * This method is like `_.assign` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignInWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var assignWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keys(source), object, customizer); -}); - -export default assignWith; diff --git a/node_modules/lodash-es/at.js b/node_modules/lodash-es/at.js deleted file mode 100644 index 6475c67..0000000 --- a/node_modules/lodash-es/at.js +++ /dev/null @@ -1,23 +0,0 @@ -import baseAt from './_baseAt.js'; -import flatRest from './_flatRest.js'; - -/** - * Creates an array of values corresponding to `paths` of `object`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Array} Returns the picked values. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; - * - * _.at(object, ['a[0].b.c', 'a[1]']); - * // => [3, 4] - */ -var at = flatRest(baseAt); - -export default at; diff --git a/node_modules/lodash-es/attempt.js b/node_modules/lodash-es/attempt.js deleted file mode 100644 index ff4df28..0000000 --- a/node_modules/lodash-es/attempt.js +++ /dev/null @@ -1,35 +0,0 @@ -import apply from './_apply.js'; -import baseRest from './_baseRest.js'; -import isError from './isError.js'; - -/** - * Attempts to invoke `func`, returning either the result or the caught error - * object. Any additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Function} func The function to attempt. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {*} Returns the `func` result or error object. - * @example - * - * // Avoid throwing errors for invalid selectors. - * var elements = _.attempt(function(selector) { - * return document.querySelectorAll(selector); - * }, '>_>'); - * - * if (_.isError(elements)) { - * elements = []; - * } - */ -var attempt = baseRest(function(func, args) { - try { - return apply(func, undefined, args); - } catch (e) { - return isError(e) ? e : new Error(e); - } -}); - -export default attempt; diff --git a/node_modules/lodash-es/before.js b/node_modules/lodash-es/before.js deleted file mode 100644 index 15a670b..0000000 --- a/node_modules/lodash-es/before.js +++ /dev/null @@ -1,40 +0,0 @@ -import toInteger from './toInteger.js'; - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ -function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; -} - -export default before; diff --git a/node_modules/lodash-es/bind.js b/node_modules/lodash-es/bind.js deleted file mode 100644 index 4bc03b3..0000000 --- a/node_modules/lodash-es/bind.js +++ /dev/null @@ -1,57 +0,0 @@ -import baseRest from './_baseRest.js'; -import createWrap from './_createWrap.js'; -import getHolder from './_getHolder.js'; -import replaceHolders from './_replaceHolders.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and `partials` prepended to the arguments it receives. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * function greet(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // Bound with placeholders. - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ -var bind = baseRest(function(func, thisArg, partials) { - var bitmask = WRAP_BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bind)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(func, bitmask, thisArg, partials, holders); -}); - -// Assign default placeholders. -bind.placeholder = {}; - -export default bind; diff --git a/node_modules/lodash-es/bindAll.js b/node_modules/lodash-es/bindAll.js deleted file mode 100644 index 37ae093..0000000 --- a/node_modules/lodash-es/bindAll.js +++ /dev/null @@ -1,41 +0,0 @@ -import arrayEach from './_arrayEach.js'; -import baseAssignValue from './_baseAssignValue.js'; -import bind from './bind.js'; -import flatRest from './_flatRest.js'; -import toKey from './_toKey.js'; - -/** - * Binds methods of an object to the object itself, overwriting the existing - * method. - * - * **Note:** This method doesn't set the "length" property of bound functions. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {Object} object The object to bind and assign the bound methods to. - * @param {...(string|string[])} methodNames The object method names to bind. - * @returns {Object} Returns `object`. - * @example - * - * var view = { - * 'label': 'docs', - * 'click': function() { - * console.log('clicked ' + this.label); - * } - * }; - * - * _.bindAll(view, ['click']); - * jQuery(element).on('click', view.click); - * // => Logs 'clicked docs' when clicked. - */ -var bindAll = flatRest(function(object, methodNames) { - arrayEach(methodNames, function(key) { - key = toKey(key); - baseAssignValue(object, key, bind(object[key], object)); - }); - return object; -}); - -export default bindAll; diff --git a/node_modules/lodash-es/bindKey.js b/node_modules/lodash-es/bindKey.js deleted file mode 100644 index fbbfa29..0000000 --- a/node_modules/lodash-es/bindKey.js +++ /dev/null @@ -1,68 +0,0 @@ -import baseRest from './_baseRest.js'; -import createWrap from './_createWrap.js'; -import getHolder from './_getHolder.js'; -import replaceHolders from './_replaceHolders.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes the method at `object[key]` with `partials` - * prepended to the arguments it receives. - * - * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. See - * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) - * for more details. - * - * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Function - * @param {Object} object The object to invoke the method on. - * @param {string} key The key of the method. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'user': 'fred', - * 'greet': function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * }; - * - * var bound = _.bindKey(object, 'greet', 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * object.greet = function(greeting, punctuation) { - * return greeting + 'ya ' + this.user + punctuation; - * }; - * - * bound('!'); - * // => 'hiya fred!' - * - * // Bound with placeholders. - * var bound = _.bindKey(object, 'greet', _, '!'); - * bound('hi'); - * // => 'hiya fred!' - */ -var bindKey = baseRest(function(object, key, partials) { - var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bindKey)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(key, bitmask, object, partials, holders); -}); - -// Assign default placeholders. -bindKey.placeholder = {}; - -export default bindKey; diff --git a/node_modules/lodash-es/camelCase.js b/node_modules/lodash-es/camelCase.js deleted file mode 100644 index cc5ee93..0000000 --- a/node_modules/lodash-es/camelCase.js +++ /dev/null @@ -1,29 +0,0 @@ -import capitalize from './capitalize.js'; -import createCompounder from './_createCompounder.js'; - -/** - * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the camel cased string. - * @example - * - * _.camelCase('Foo Bar'); - * // => 'fooBar' - * - * _.camelCase('--foo-bar--'); - * // => 'fooBar' - * - * _.camelCase('__FOO_BAR__'); - * // => 'fooBar' - */ -var camelCase = createCompounder(function(result, word, index) { - word = word.toLowerCase(); - return result + (index ? capitalize(word) : word); -}); - -export default camelCase; diff --git a/node_modules/lodash-es/capitalize.js b/node_modules/lodash-es/capitalize.js deleted file mode 100644 index 557673b..0000000 --- a/node_modules/lodash-es/capitalize.js +++ /dev/null @@ -1,23 +0,0 @@ -import toString from './toString.js'; -import upperFirst from './upperFirst.js'; - -/** - * Converts the first character of `string` to upper case and the remaining - * to lower case. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to capitalize. - * @returns {string} Returns the capitalized string. - * @example - * - * _.capitalize('FRED'); - * // => 'Fred' - */ -function capitalize(string) { - return upperFirst(toString(string).toLowerCase()); -} - -export default capitalize; diff --git a/node_modules/lodash-es/castArray.js b/node_modules/lodash-es/castArray.js deleted file mode 100644 index 1ec560a..0000000 --- a/node_modules/lodash-es/castArray.js +++ /dev/null @@ -1,44 +0,0 @@ -import isArray from './isArray.js'; - -/** - * Casts `value` as an array if it's not one. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Lang - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast array. - * @example - * - * _.castArray(1); - * // => [1] - * - * _.castArray({ 'a': 1 }); - * // => [{ 'a': 1 }] - * - * _.castArray('abc'); - * // => ['abc'] - * - * _.castArray(null); - * // => [null] - * - * _.castArray(undefined); - * // => [undefined] - * - * _.castArray(); - * // => [] - * - * var array = [1, 2, 3]; - * console.log(_.castArray(array) === array); - * // => true - */ -function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray(value) ? value : [value]; -} - -export default castArray; diff --git a/node_modules/lodash-es/ceil.js b/node_modules/lodash-es/ceil.js deleted file mode 100644 index e86212a..0000000 --- a/node_modules/lodash-es/ceil.js +++ /dev/null @@ -1,26 +0,0 @@ -import createRound from './_createRound.js'; - -/** - * Computes `number` rounded up to `precision`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Math - * @param {number} number The number to round up. - * @param {number} [precision=0] The precision to round up to. - * @returns {number} Returns the rounded up number. - * @example - * - * _.ceil(4.006); - * // => 5 - * - * _.ceil(6.004, 2); - * // => 6.01 - * - * _.ceil(6040, -2); - * // => 6100 - */ -var ceil = createRound('ceil'); - -export default ceil; diff --git a/node_modules/lodash-es/chain.js b/node_modules/lodash-es/chain.js deleted file mode 100644 index 6556af1..0000000 --- a/node_modules/lodash-es/chain.js +++ /dev/null @@ -1,38 +0,0 @@ -import lodash from './wrapperLodash.js'; - -/** - * Creates a `lodash` wrapper instance that wraps `value` with explicit method - * chain sequences enabled. The result of such sequences must be unwrapped - * with `_#value`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Seq - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _ - * .chain(users) - * .sortBy('age') - * .map(function(o) { - * return o.user + ' is ' + o.age; - * }) - * .head() - * .value(); - * // => 'pebbles is 1' - */ -function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; -} - -export default chain; diff --git a/node_modules/lodash-es/chunk.js b/node_modules/lodash-es/chunk.js deleted file mode 100644 index 70dd983..0000000 --- a/node_modules/lodash-es/chunk.js +++ /dev/null @@ -1,50 +0,0 @@ -import baseSlice from './_baseSlice.js'; -import isIterateeCall from './_isIterateeCall.js'; -import toInteger from './toInteger.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * Creates an array of elements split into groups the length of `size`. - * If `array` can't be split evenly, the final chunk will be the remaining - * elements. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array of chunks. - * @example - * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] - * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] - */ -function chunk(array, size, guard) { - if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { - size = 1; - } else { - size = nativeMax(toInteger(size), 0); - } - var length = array == null ? 0 : array.length; - if (!length || size < 1) { - return []; - } - var index = 0, - resIndex = 0, - result = Array(nativeCeil(length / size)); - - while (index < length) { - result[resIndex++] = baseSlice(array, index, (index += size)); - } - return result; -} - -export default chunk; diff --git a/node_modules/lodash-es/clamp.js b/node_modules/lodash-es/clamp.js deleted file mode 100644 index fbb5116..0000000 --- a/node_modules/lodash-es/clamp.js +++ /dev/null @@ -1,39 +0,0 @@ -import baseClamp from './_baseClamp.js'; -import toNumber from './toNumber.js'; - -/** - * Clamps `number` within the inclusive `lower` and `upper` bounds. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Number - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - * @example - * - * _.clamp(-10, -5, 5); - * // => -5 - * - * _.clamp(10, -5, 5); - * // => 5 - */ -function clamp(number, lower, upper) { - if (upper === undefined) { - upper = lower; - lower = undefined; - } - if (upper !== undefined) { - upper = toNumber(upper); - upper = upper === upper ? upper : 0; - } - if (lower !== undefined) { - lower = toNumber(lower); - lower = lower === lower ? lower : 0; - } - return baseClamp(toNumber(number), lower, upper); -} - -export default clamp; diff --git a/node_modules/lodash-es/clone.js b/node_modules/lodash-es/clone.js deleted file mode 100644 index b147012..0000000 --- a/node_modules/lodash-es/clone.js +++ /dev/null @@ -1,36 +0,0 @@ -import baseClone from './_baseClone.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); -} - -export default clone; diff --git a/node_modules/lodash-es/cloneDeep.js b/node_modules/lodash-es/cloneDeep.js deleted file mode 100644 index 44d403d..0000000 --- a/node_modules/lodash-es/cloneDeep.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseClone from './_baseClone.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -export default cloneDeep; diff --git a/node_modules/lodash-es/cloneDeepWith.js b/node_modules/lodash-es/cloneDeepWith.js deleted file mode 100644 index 8cd7885..0000000 --- a/node_modules/lodash-es/cloneDeepWith.js +++ /dev/null @@ -1,40 +0,0 @@ -import baseClone from './_baseClone.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.cloneWith` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the deep cloned value. - * @see _.cloneWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * } - * - * var el = _.cloneDeepWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 20 - */ -function cloneDeepWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); -} - -export default cloneDeepWith; diff --git a/node_modules/lodash-es/cloneWith.js b/node_modules/lodash-es/cloneWith.js deleted file mode 100644 index c900df1..0000000 --- a/node_modules/lodash-es/cloneWith.js +++ /dev/null @@ -1,42 +0,0 @@ -import baseClone from './_baseClone.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it accepts `customizer` which - * is invoked to produce the cloned value. If `customizer` returns `undefined`, - * cloning is handled by the method instead. The `customizer` is invoked with - * up to four arguments; (value [, index|key, object, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the cloned value. - * @see _.cloneDeepWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } - * } - * - * var el = _.cloneWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 0 - */ -function cloneWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); -} - -export default cloneWith; diff --git a/node_modules/lodash-es/collection.default.js b/node_modules/lodash-es/collection.default.js deleted file mode 100644 index 2f262bf..0000000 --- a/node_modules/lodash-es/collection.default.js +++ /dev/null @@ -1,37 +0,0 @@ -import countBy from './countBy.js'; -import each from './each.js'; -import eachRight from './eachRight.js'; -import every from './every.js'; -import filter from './filter.js'; -import find from './find.js'; -import findLast from './findLast.js'; -import flatMap from './flatMap.js'; -import flatMapDeep from './flatMapDeep.js'; -import flatMapDepth from './flatMapDepth.js'; -import forEach from './forEach.js'; -import forEachRight from './forEachRight.js'; -import groupBy from './groupBy.js'; -import includes from './includes.js'; -import invokeMap from './invokeMap.js'; -import keyBy from './keyBy.js'; -import map from './map.js'; -import orderBy from './orderBy.js'; -import partition from './partition.js'; -import reduce from './reduce.js'; -import reduceRight from './reduceRight.js'; -import reject from './reject.js'; -import sample from './sample.js'; -import sampleSize from './sampleSize.js'; -import shuffle from './shuffle.js'; -import size from './size.js'; -import some from './some.js'; -import sortBy from './sortBy.js'; - -export default { - countBy, each, eachRight, every, filter, - find, findLast, flatMap, flatMapDeep, flatMapDepth, - forEach, forEachRight, groupBy, includes, invokeMap, - keyBy, map, orderBy, partition, reduce, - reduceRight, reject, sample, sampleSize, shuffle, - size, some, sortBy -}; diff --git a/node_modules/lodash-es/collection.js b/node_modules/lodash-es/collection.js deleted file mode 100644 index 2c9fab9..0000000 --- a/node_modules/lodash-es/collection.js +++ /dev/null @@ -1,29 +0,0 @@ -export { default as countBy } from './countBy.js'; -export { default as each } from './each.js'; -export { default as eachRight } from './eachRight.js'; -export { default as every } from './every.js'; -export { default as filter } from './filter.js'; -export { default as find } from './find.js'; -export { default as findLast } from './findLast.js'; -export { default as flatMap } from './flatMap.js'; -export { default as flatMapDeep } from './flatMapDeep.js'; -export { default as flatMapDepth } from './flatMapDepth.js'; -export { default as forEach } from './forEach.js'; -export { default as forEachRight } from './forEachRight.js'; -export { default as groupBy } from './groupBy.js'; -export { default as includes } from './includes.js'; -export { default as invokeMap } from './invokeMap.js'; -export { default as keyBy } from './keyBy.js'; -export { default as map } from './map.js'; -export { default as orderBy } from './orderBy.js'; -export { default as partition } from './partition.js'; -export { default as reduce } from './reduce.js'; -export { default as reduceRight } from './reduceRight.js'; -export { default as reject } from './reject.js'; -export { default as sample } from './sample.js'; -export { default as sampleSize } from './sampleSize.js'; -export { default as shuffle } from './shuffle.js'; -export { default as size } from './size.js'; -export { default as some } from './some.js'; -export { default as sortBy } from './sortBy.js'; -export { default } from './collection.default.js'; diff --git a/node_modules/lodash-es/commit.js b/node_modules/lodash-es/commit.js deleted file mode 100644 index e449abe..0000000 --- a/node_modules/lodash-es/commit.js +++ /dev/null @@ -1,33 +0,0 @@ -import LodashWrapper from './_LodashWrapper.js'; - -/** - * Executes the chain sequence and returns the wrapped result. - * - * @name commit - * @memberOf _ - * @since 3.2.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapped = _(array).push(3); - * - * console.log(array); - * // => [1, 2] - * - * wrapped = wrapped.commit(); - * console.log(array); - * // => [1, 2, 3] - * - * wrapped.last(); - * // => 3 - * - * console.log(array); - * // => [1, 2, 3] - */ -function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); -} - -export default wrapperCommit; diff --git a/node_modules/lodash-es/compact.js b/node_modules/lodash-es/compact.js deleted file mode 100644 index b644f28..0000000 --- a/node_modules/lodash-es/compact.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ -function compact(array) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result[resIndex++] = value; - } - } - return result; -} - -export default compact; diff --git a/node_modules/lodash-es/concat.js b/node_modules/lodash-es/concat.js deleted file mode 100644 index 4f598c3..0000000 --- a/node_modules/lodash-es/concat.js +++ /dev/null @@ -1,43 +0,0 @@ -import arrayPush from './_arrayPush.js'; -import baseFlatten from './_baseFlatten.js'; -import copyArray from './_copyArray.js'; -import isArray from './isArray.js'; - -/** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] - */ -function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), - array = arguments[0], - index = length; - - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); -} - -export default concat; diff --git a/node_modules/lodash-es/cond.js b/node_modules/lodash-es/cond.js deleted file mode 100644 index 21eec13..0000000 --- a/node_modules/lodash-es/cond.js +++ /dev/null @@ -1,60 +0,0 @@ -import apply from './_apply.js'; -import arrayMap from './_arrayMap.js'; -import baseIteratee from './_baseIteratee.js'; -import baseRest from './_baseRest.js'; - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that iterates over `pairs` and invokes the corresponding - * function of the first predicate to return truthy. The predicate-function - * pairs are invoked with the `this` binding and arguments of the created - * function. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {Array} pairs The predicate-function pairs. - * @returns {Function} Returns the new composite function. - * @example - * - * var func = _.cond([ - * [_.matches({ 'a': 1 }), _.constant('matches A')], - * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], - * [_.stubTrue, _.constant('no match')] - * ]); - * - * func({ 'a': 1, 'b': 2 }); - * // => 'matches A' - * - * func({ 'a': 0, 'b': 1 }); - * // => 'matches B' - * - * func({ 'a': '1', 'b': '2' }); - * // => 'no match' - */ -function cond(pairs) { - var length = pairs == null ? 0 : pairs.length, - toIteratee = baseIteratee; - - pairs = !length ? [] : arrayMap(pairs, function(pair) { - if (typeof pair[1] != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return [toIteratee(pair[0]), pair[1]]; - }); - - return baseRest(function(args) { - var index = -1; - while (++index < length) { - var pair = pairs[index]; - if (apply(pair[0], this, args)) { - return apply(pair[1], this, args); - } - } - }); -} - -export default cond; diff --git a/node_modules/lodash-es/conforms.js b/node_modules/lodash-es/conforms.js deleted file mode 100644 index 2fb1ebe..0000000 --- a/node_modules/lodash-es/conforms.js +++ /dev/null @@ -1,35 +0,0 @@ -import baseClone from './_baseClone.js'; -import baseConforms from './_baseConforms.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1; - -/** - * Creates a function that invokes the predicate properties of `source` with - * the corresponding property values of a given object, returning `true` if - * all predicates return truthy, else `false`. - * - * **Note:** The created function is equivalent to `_.conformsTo` with - * `source` partially applied. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 2, 'b': 1 }, - * { 'a': 1, 'b': 2 } - * ]; - * - * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); - * // => [{ 'a': 1, 'b': 2 }] - */ -function conforms(source) { - return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); -} - -export default conforms; diff --git a/node_modules/lodash-es/conformsTo.js b/node_modules/lodash-es/conformsTo.js deleted file mode 100644 index 6f011ba..0000000 --- a/node_modules/lodash-es/conformsTo.js +++ /dev/null @@ -1,32 +0,0 @@ -import baseConformsTo from './_baseConformsTo.js'; -import keys from './keys.js'; - -/** - * Checks if `object` conforms to `source` by invoking the predicate - * properties of `source` with the corresponding property values of `object`. - * - * **Note:** This method is equivalent to `_.conforms` when `source` is - * partially applied. - * - * @static - * @memberOf _ - * @since 4.14.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * - * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); - * // => true - * - * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); - * // => false - */ -function conformsTo(object, source) { - return source == null || baseConformsTo(object, source, keys(source)); -} - -export default conformsTo; diff --git a/node_modules/lodash-es/constant.js b/node_modules/lodash-es/constant.js deleted file mode 100644 index c8dac98..0000000 --- a/node_modules/lodash-es/constant.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return function() { - return value; - }; -} - -export default constant; diff --git a/node_modules/lodash-es/countBy.js b/node_modules/lodash-es/countBy.js deleted file mode 100644 index 2d01213..0000000 --- a/node_modules/lodash-es/countBy.js +++ /dev/null @@ -1,40 +0,0 @@ -import baseAssignValue from './_baseAssignValue.js'; -import createAggregator from './_createAggregator.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the number of times the key was returned by `iteratee`. The - * iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.countBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': 1, '6': 2 } - * - * // The `_.property` iteratee shorthand. - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ -var countBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - ++result[key]; - } else { - baseAssignValue(result, key, 1); - } -}); - -export default countBy; diff --git a/node_modules/lodash-es/create.js b/node_modules/lodash-es/create.js deleted file mode 100644 index 5a9aa37..0000000 --- a/node_modules/lodash-es/create.js +++ /dev/null @@ -1,43 +0,0 @@ -import baseAssign from './_baseAssign.js'; -import baseCreate from './_baseCreate.js'; - -/** - * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given, its own enumerable string keyed properties - * are assigned to the created object. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ -function create(prototype, properties) { - var result = baseCreate(prototype); - return properties == null ? result : baseAssign(result, properties); -} - -export default create; diff --git a/node_modules/lodash-es/curry.js b/node_modules/lodash-es/curry.js deleted file mode 100644 index 953102f..0000000 --- a/node_modules/lodash-es/curry.js +++ /dev/null @@ -1,57 +0,0 @@ -import createWrap from './_createWrap.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_CURRY_FLAG = 8; - -/** - * Creates a function that accepts arguments of `func` and either invokes - * `func` returning its result, if at least `arity` number of arguments have - * been provided, or returns a function that accepts the remaining `func` - * arguments, and so on. The arity of `func` may be specified if `func.length` - * is not sufficient. - * - * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curry(abc); - * - * curried(1)(2)(3); - * // => [1, 2, 3] - * - * curried(1, 2)(3); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(1)(_, 3)(2); - * // => [1, 2, 3] - */ -function curry(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curry.placeholder; - return result; -} - -// Assign default placeholders. -curry.placeholder = {}; - -export default curry; diff --git a/node_modules/lodash-es/curryRight.js b/node_modules/lodash-es/curryRight.js deleted file mode 100644 index 5cc33aa..0000000 --- a/node_modules/lodash-es/curryRight.js +++ /dev/null @@ -1,54 +0,0 @@ -import createWrap from './_createWrap.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_CURRY_RIGHT_FLAG = 16; - -/** - * This method is like `_.curry` except that arguments are applied to `func` - * in the manner of `_.partialRight` instead of `_.partial`. - * - * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curryRight(abc); - * - * curried(3)(2)(1); - * // => [1, 2, 3] - * - * curried(2, 3)(1); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(3)(1, _)(2); - * // => [1, 2, 3] - */ -function curryRight(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curryRight.placeholder; - return result; -} - -// Assign default placeholders. -curryRight.placeholder = {}; - -export default curryRight; diff --git a/node_modules/lodash-es/date.default.js b/node_modules/lodash-es/date.default.js deleted file mode 100644 index 9f1ee49..0000000 --- a/node_modules/lodash-es/date.default.js +++ /dev/null @@ -1,5 +0,0 @@ -import now from './now.js'; - -export default { - now -}; diff --git a/node_modules/lodash-es/date.js b/node_modules/lodash-es/date.js deleted file mode 100644 index bea18b6..0000000 --- a/node_modules/lodash-es/date.js +++ /dev/null @@ -1,2 +0,0 @@ -export { default as now } from './now.js'; -export { default } from './date.default.js'; diff --git a/node_modules/lodash-es/debounce.js b/node_modules/lodash-es/debounce.js deleted file mode 100644 index 645754d..0000000 --- a/node_modules/lodash-es/debounce.js +++ /dev/null @@ -1,188 +0,0 @@ -import isObject from './isObject.js'; -import now from './now.js'; -import toNumber from './toNumber.js'; - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); - * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); - */ -function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - result = wait - timeSinceLastCall; - - return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } - - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(now()); - } - - function debounced() { - var time = now(), - isInvoking = shouldInvoke(time); - - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; -} - -export default debounce; diff --git a/node_modules/lodash-es/deburr.js b/node_modules/lodash-es/deburr.js deleted file mode 100644 index 73dc9b3..0000000 --- a/node_modules/lodash-es/deburr.js +++ /dev/null @@ -1,45 +0,0 @@ -import deburrLetter from './_deburrLetter.js'; -import toString from './toString.js'; - -/** Used to match Latin Unicode letters (excluding mathematical operators). */ -var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; - -/** Used to compose unicode character classes. */ -var rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; - -/** Used to compose unicode capture groups. */ -var rsCombo = '[' + rsComboRange + ']'; - -/** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ -var reComboMark = RegExp(rsCombo, 'g'); - -/** - * Deburrs `string` by converting - * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) - * letters to basic Latin letters and removing - * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example - * - * _.deburr('déjà vu'); - * // => 'deja vu' - */ -function deburr(string) { - string = toString(string); - return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); -} - -export default deburr; diff --git a/node_modules/lodash-es/defaultTo.js b/node_modules/lodash-es/defaultTo.js deleted file mode 100644 index 2fafeac..0000000 --- a/node_modules/lodash-es/defaultTo.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Checks `value` to determine whether a default value should be returned in - * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, - * or `undefined`. - * - * @static - * @memberOf _ - * @since 4.14.0 - * @category Util - * @param {*} value The value to check. - * @param {*} defaultValue The default value. - * @returns {*} Returns the resolved value. - * @example - * - * _.defaultTo(1, 10); - * // => 1 - * - * _.defaultTo(undefined, 10); - * // => 10 - */ -function defaultTo(value, defaultValue) { - return (value == null || value !== value) ? defaultValue : value; -} - -export default defaultTo; diff --git a/node_modules/lodash-es/defaults.js b/node_modules/lodash-es/defaults.js deleted file mode 100644 index b27d881..0000000 --- a/node_modules/lodash-es/defaults.js +++ /dev/null @@ -1,32 +0,0 @@ -import apply from './_apply.js'; -import assignInWith from './assignInWith.js'; -import baseRest from './_baseRest.js'; -import customDefaultsAssignIn from './_customDefaultsAssignIn.js'; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = baseRest(function(args) { - args.push(undefined, customDefaultsAssignIn); - return apply(assignInWith, undefined, args); -}); - -export default defaults; diff --git a/node_modules/lodash-es/defaultsDeep.js b/node_modules/lodash-es/defaultsDeep.js deleted file mode 100644 index 409383e..0000000 --- a/node_modules/lodash-es/defaultsDeep.js +++ /dev/null @@ -1,30 +0,0 @@ -import apply from './_apply.js'; -import baseRest from './_baseRest.js'; -import customDefaultsMerge from './_customDefaultsMerge.js'; -import mergeWith from './mergeWith.js'; - -/** - * This method is like `_.defaults` except that it recursively assigns - * default properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaults - * @example - * - * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); - * // => { 'a': { 'b': 2, 'c': 3 } } - */ -var defaultsDeep = baseRest(function(args) { - args.push(undefined, customDefaultsMerge); - return apply(mergeWith, undefined, args); -}); - -export default defaultsDeep; diff --git a/node_modules/lodash-es/defer.js b/node_modules/lodash-es/defer.js deleted file mode 100644 index 7c4c284..0000000 --- a/node_modules/lodash-es/defer.js +++ /dev/null @@ -1,26 +0,0 @@ -import baseDelay from './_baseDelay.js'; -import baseRest from './_baseRest.js'; - -/** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // => Logs 'deferred' after one millisecond. - */ -var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); -}); - -export default defer; diff --git a/node_modules/lodash-es/delay.js b/node_modules/lodash-es/delay.js deleted file mode 100644 index d9b5eb4..0000000 --- a/node_modules/lodash-es/delay.js +++ /dev/null @@ -1,28 +0,0 @@ -import baseDelay from './_baseDelay.js'; -import baseRest from './_baseRest.js'; -import toNumber from './toNumber.js'; - -/** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => Logs 'later' after one second. - */ -var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); -}); - -export default delay; diff --git a/node_modules/lodash-es/difference.js b/node_modules/lodash-es/difference.js deleted file mode 100644 index ddc1db5..0000000 --- a/node_modules/lodash-es/difference.js +++ /dev/null @@ -1,33 +0,0 @@ -import baseDifference from './_baseDifference.js'; -import baseFlatten from './_baseFlatten.js'; -import baseRest from './_baseRest.js'; -import isArrayLikeObject from './isArrayLikeObject.js'; - -/** - * Creates an array of `array` values not included in the other given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * **Note:** Unlike `_.pullAll`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.without, _.xor - * @example - * - * _.difference([2, 1], [2, 3]); - * // => [1] - */ -var difference = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) - : []; -}); - -export default difference; diff --git a/node_modules/lodash-es/differenceBy.js b/node_modules/lodash-es/differenceBy.js deleted file mode 100644 index 983cc54..0000000 --- a/node_modules/lodash-es/differenceBy.js +++ /dev/null @@ -1,44 +0,0 @@ -import baseDifference from './_baseDifference.js'; -import baseFlatten from './_baseFlatten.js'; -import baseIteratee from './_baseIteratee.js'; -import baseRest from './_baseRest.js'; -import isArrayLikeObject from './isArrayLikeObject.js'; -import last from './last.js'; - -/** - * This method is like `_.difference` except that it accepts `iteratee` which - * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * **Note:** Unlike `_.pullAllBy`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2] - * - * // The `_.property` iteratee shorthand. - * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] - */ -var differenceBy = baseRest(function(array, values) { - var iteratee = last(values); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) - : []; -}); - -export default differenceBy; diff --git a/node_modules/lodash-es/differenceWith.js b/node_modules/lodash-es/differenceWith.js deleted file mode 100644 index 980a68c..0000000 --- a/node_modules/lodash-es/differenceWith.js +++ /dev/null @@ -1,40 +0,0 @@ -import baseDifference from './_baseDifference.js'; -import baseFlatten from './_baseFlatten.js'; -import baseRest from './_baseRest.js'; -import isArrayLikeObject from './isArrayLikeObject.js'; -import last from './last.js'; - -/** - * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. The order and - * references of result values are determined by the first array. The comparator - * is invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.pullAllWith`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * - * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); - * // => [{ 'x': 2, 'y': 1 }] - */ -var differenceWith = baseRest(function(array, values) { - var comparator = last(values); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) - : []; -}); - -export default differenceWith; diff --git a/node_modules/lodash-es/divide.js b/node_modules/lodash-es/divide.js deleted file mode 100644 index f281786..0000000 --- a/node_modules/lodash-es/divide.js +++ /dev/null @@ -1,22 +0,0 @@ -import createMathOperation from './_createMathOperation.js'; - -/** - * Divide two numbers. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Math - * @param {number} dividend The first number in a division. - * @param {number} divisor The second number in a division. - * @returns {number} Returns the quotient. - * @example - * - * _.divide(6, 4); - * // => 1.5 - */ -var divide = createMathOperation(function(dividend, divisor) { - return dividend / divisor; -}, 1); - -export default divide; diff --git a/node_modules/lodash-es/drop.js b/node_modules/lodash-es/drop.js deleted file mode 100644 index 03e59a9..0000000 --- a/node_modules/lodash-es/drop.js +++ /dev/null @@ -1,38 +0,0 @@ -import baseSlice from './_baseSlice.js'; -import toInteger from './toInteger.js'; - -/** - * Creates a slice of `array` with `n` elements dropped from the beginning. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.drop([1, 2, 3]); - * // => [2, 3] - * - * _.drop([1, 2, 3], 2); - * // => [3] - * - * _.drop([1, 2, 3], 5); - * // => [] - * - * _.drop([1, 2, 3], 0); - * // => [1, 2, 3] - */ -function drop(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, n < 0 ? 0 : n, length); -} - -export default drop; diff --git a/node_modules/lodash-es/dropRight.js b/node_modules/lodash-es/dropRight.js deleted file mode 100644 index 642f241..0000000 --- a/node_modules/lodash-es/dropRight.js +++ /dev/null @@ -1,39 +0,0 @@ -import baseSlice from './_baseSlice.js'; -import toInteger from './toInteger.js'; - -/** - * Creates a slice of `array` with `n` elements dropped from the end. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRight([1, 2, 3]); - * // => [1, 2] - * - * _.dropRight([1, 2, 3], 2); - * // => [1] - * - * _.dropRight([1, 2, 3], 5); - * // => [] - * - * _.dropRight([1, 2, 3], 0); - * // => [1, 2, 3] - */ -function dropRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, 0, n < 0 ? 0 : n); -} - -export default dropRight; diff --git a/node_modules/lodash-es/dropRightWhile.js b/node_modules/lodash-es/dropRightWhile.js deleted file mode 100644 index c5cdbc6..0000000 --- a/node_modules/lodash-es/dropRightWhile.js +++ /dev/null @@ -1,45 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import baseWhile from './_baseWhile.js'; - -/** - * Creates a slice of `array` excluding elements dropped from the end. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.dropRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney'] - * - * // The `_.matches` iteratee shorthand. - * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropRightWhile(users, ['active', false]); - * // => objects for ['barney'] - * - * // The `_.property` iteratee shorthand. - * _.dropRightWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] - */ -function dropRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, baseIteratee(predicate, 3), true, true) - : []; -} - -export default dropRightWhile; diff --git a/node_modules/lodash-es/dropWhile.js b/node_modules/lodash-es/dropWhile.js deleted file mode 100644 index 688c4dc..0000000 --- a/node_modules/lodash-es/dropWhile.js +++ /dev/null @@ -1,45 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import baseWhile from './_baseWhile.js'; - -/** - * Creates a slice of `array` excluding elements dropped from the beginning. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.dropWhile(users, function(o) { return !o.active; }); - * // => objects for ['pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.dropWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropWhile(users, ['active', false]); - * // => objects for ['pebbles'] - * - * // The `_.property` iteratee shorthand. - * _.dropWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] - */ -function dropWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, baseIteratee(predicate, 3), true) - : []; -} - -export default dropWhile; diff --git a/node_modules/lodash-es/each.js b/node_modules/lodash-es/each.js deleted file mode 100644 index d2fd2ff..0000000 --- a/node_modules/lodash-es/each.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './forEach.js' diff --git a/node_modules/lodash-es/eachRight.js b/node_modules/lodash-es/eachRight.js deleted file mode 100644 index b08d8f5..0000000 --- a/node_modules/lodash-es/eachRight.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './forEachRight.js' diff --git a/node_modules/lodash-es/endsWith.js b/node_modules/lodash-es/endsWith.js deleted file mode 100644 index 1554a6e..0000000 --- a/node_modules/lodash-es/endsWith.js +++ /dev/null @@ -1,43 +0,0 @@ -import baseClamp from './_baseClamp.js'; -import baseToString from './_baseToString.js'; -import toInteger from './toInteger.js'; -import toString from './toString.js'; - -/** - * Checks if `string` ends with the given target string. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search up to. - * @returns {boolean} Returns `true` if `string` ends with `target`, - * else `false`. - * @example - * - * _.endsWith('abc', 'c'); - * // => true - * - * _.endsWith('abc', 'b'); - * // => false - * - * _.endsWith('abc', 'b', 2); - * // => true - */ -function endsWith(string, target, position) { - string = toString(string); - target = baseToString(target); - - var length = string.length; - position = position === undefined - ? length - : baseClamp(toInteger(position), 0, length); - - var end = position; - position -= target.length; - return position >= 0 && string.slice(position, end) == target; -} - -export default endsWith; diff --git a/node_modules/lodash-es/entries.js b/node_modules/lodash-es/entries.js deleted file mode 100644 index d532bf9..0000000 --- a/node_modules/lodash-es/entries.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './toPairs.js' diff --git a/node_modules/lodash-es/entriesIn.js b/node_modules/lodash-es/entriesIn.js deleted file mode 100644 index 74db25d..0000000 --- a/node_modules/lodash-es/entriesIn.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './toPairsIn.js' diff --git a/node_modules/lodash-es/eq.js b/node_modules/lodash-es/eq.js deleted file mode 100644 index c3206c6..0000000 --- a/node_modules/lodash-es/eq.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -export default eq; diff --git a/node_modules/lodash-es/escape.js b/node_modules/lodash-es/escape.js deleted file mode 100644 index 6c720ae..0000000 --- a/node_modules/lodash-es/escape.js +++ /dev/null @@ -1,43 +0,0 @@ -import escapeHtmlChar from './_escapeHtmlChar.js'; -import toString from './toString.js'; - -/** Used to match HTML entities and HTML characters. */ -var reUnescapedHtml = /[&<>"']/g, - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - -/** - * Converts the characters "&", "<", ">", '"', and "'" in `string` to their - * corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. See - * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * When working with HTML you should always - * [quote attribute values](http://wonko.com/post/html-escaping) to reduce - * XSS vectors. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ -function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; -} - -export default escape; diff --git a/node_modules/lodash-es/escapeRegExp.js b/node_modules/lodash-es/escapeRegExp.js deleted file mode 100644 index 0b904ca..0000000 --- a/node_modules/lodash-es/escapeRegExp.js +++ /dev/null @@ -1,32 +0,0 @@ -import toString from './toString.js'; - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, - reHasRegExpChar = RegExp(reRegExpChar.source); - -/** - * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", - * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https://lodash\.com/\)' - */ -function escapeRegExp(string) { - string = toString(string); - return (string && reHasRegExpChar.test(string)) - ? string.replace(reRegExpChar, '\\$&') - : string; -} - -export default escapeRegExp; diff --git a/node_modules/lodash-es/every.js b/node_modules/lodash-es/every.js deleted file mode 100644 index f44d02c..0000000 --- a/node_modules/lodash-es/every.js +++ /dev/null @@ -1,56 +0,0 @@ -import arrayEvery from './_arrayEvery.js'; -import baseEvery from './_baseEvery.js'; -import baseIteratee from './_baseIteratee.js'; -import isArray from './isArray.js'; -import isIterateeCall from './_isIterateeCall.js'; - -/** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * Iteration is stopped once `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * **Note:** This method returns `true` for - * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because - * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of - * elements of empty collections. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.every(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.every(users, 'active'); - * // => false - */ -function every(collection, predicate, guard) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, baseIteratee(predicate, 3)); -} - -export default every; diff --git a/node_modules/lodash-es/extend.js b/node_modules/lodash-es/extend.js deleted file mode 100644 index 2feb9d1..0000000 --- a/node_modules/lodash-es/extend.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './assignIn.js' diff --git a/node_modules/lodash-es/extendWith.js b/node_modules/lodash-es/extendWith.js deleted file mode 100644 index 106469d..0000000 --- a/node_modules/lodash-es/extendWith.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './assignInWith.js' diff --git a/node_modules/lodash-es/fill.js b/node_modules/lodash-es/fill.js deleted file mode 100644 index 42c2ba7..0000000 --- a/node_modules/lodash-es/fill.js +++ /dev/null @@ -1,45 +0,0 @@ -import baseFill from './_baseFill.js'; -import isIterateeCall from './_isIterateeCall.js'; - -/** - * Fills elements of `array` with `value` from `start` up to, but not - * including, `end`. - * - * **Note:** This method mutates `array`. - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Array - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.fill(array, 'a'); - * console.log(array); - * // => ['a', 'a', 'a'] - * - * _.fill(Array(3), 2); - * // => [2, 2, 2] - * - * _.fill([4, 6, 8, 10], '*', 1, 3); - * // => [4, '*', '*', 10] - */ -function fill(array, value, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { - start = 0; - end = length; - } - return baseFill(array, value, start, end); -} - -export default fill; diff --git a/node_modules/lodash-es/filter.js b/node_modules/lodash-es/filter.js deleted file mode 100644 index e45a7ba..0000000 --- a/node_modules/lodash-es/filter.js +++ /dev/null @@ -1,48 +0,0 @@ -import arrayFilter from './_arrayFilter.js'; -import baseFilter from './_baseFilter.js'; -import baseIteratee from './_baseIteratee.js'; -import isArray from './isArray.js'; - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - */ -function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, baseIteratee(predicate, 3)); -} - -export default filter; diff --git a/node_modules/lodash-es/find.js b/node_modules/lodash-es/find.js deleted file mode 100644 index fd8de52..0000000 --- a/node_modules/lodash-es/find.js +++ /dev/null @@ -1,42 +0,0 @@ -import createFind from './_createFind.js'; -import findIndex from './findIndex.js'; - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = createFind(findIndex); - -export default find; diff --git a/node_modules/lodash-es/findIndex.js b/node_modules/lodash-es/findIndex.js deleted file mode 100644 index c1cd7cd..0000000 --- a/node_modules/lodash-es/findIndex.js +++ /dev/null @@ -1,55 +0,0 @@ -import baseFindIndex from './_baseFindIndex.js'; -import baseIteratee from './_baseIteratee.js'; -import toInteger from './toInteger.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index); -} - -export default findIndex; diff --git a/node_modules/lodash-es/findKey.js b/node_modules/lodash-es/findKey.js deleted file mode 100644 index a578ede..0000000 --- a/node_modules/lodash-es/findKey.js +++ /dev/null @@ -1,44 +0,0 @@ -import baseFindKey from './_baseFindKey.js'; -import baseForOwn from './_baseForOwn.js'; -import baseIteratee from './_baseIteratee.js'; - -/** - * This method is like `_.find` except that it returns the key of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findKey(users, function(o) { return o.age < 40; }); - * // => 'barney' (iteration order is not guaranteed) - * - * // The `_.matches` iteratee shorthand. - * _.findKey(users, { 'age': 1, 'active': true }); - * // => 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findKey(users, ['active', false]); - * // => 'fred' - * - * // The `_.property` iteratee shorthand. - * _.findKey(users, 'active'); - * // => 'barney' - */ -function findKey(object, predicate) { - return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); -} - -export default findKey; diff --git a/node_modules/lodash-es/findLast.js b/node_modules/lodash-es/findLast.js deleted file mode 100644 index 0237386..0000000 --- a/node_modules/lodash-es/findLast.js +++ /dev/null @@ -1,25 +0,0 @@ -import createFind from './_createFind.js'; -import findLastIndex from './findLastIndex.js'; - -/** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=collection.length-1] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 - */ -var findLast = createFind(findLastIndex); - -export default findLast; diff --git a/node_modules/lodash-es/findLastIndex.js b/node_modules/lodash-es/findLastIndex.js deleted file mode 100644 index c2bb6dc..0000000 --- a/node_modules/lodash-es/findLastIndex.js +++ /dev/null @@ -1,59 +0,0 @@ -import baseFindIndex from './_baseFindIndex.js'; -import baseIteratee from './_baseIteratee.js'; -import toInteger from './toInteger.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * This method is like `_.findIndex` except that it iterates over elements - * of `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); - * // => 2 - * - * // The `_.matches` iteratee shorthand. - * _.findLastIndex(users, { 'user': 'barney', 'active': true }); - * // => 0 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastIndex(users, ['active', false]); - * // => 2 - * - * // The `_.property` iteratee shorthand. - * _.findLastIndex(users, 'active'); - * // => 0 - */ -function findLastIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length - 1; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = fromIndex < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index, true); -} - -export default findLastIndex; diff --git a/node_modules/lodash-es/findLastKey.js b/node_modules/lodash-es/findLastKey.js deleted file mode 100644 index 6b391dc..0000000 --- a/node_modules/lodash-es/findLastKey.js +++ /dev/null @@ -1,44 +0,0 @@ -import baseFindKey from './_baseFindKey.js'; -import baseForOwnRight from './_baseForOwnRight.js'; -import baseIteratee from './_baseIteratee.js'; - -/** - * This method is like `_.findKey` except that it iterates over elements of - * a collection in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findLastKey(users, function(o) { return o.age < 40; }); - * // => returns 'pebbles' assuming `_.findKey` returns 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.findLastKey(users, { 'age': 36, 'active': true }); - * // => 'barney' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastKey(users, ['active', false]); - * // => 'fred' - * - * // The `_.property` iteratee shorthand. - * _.findLastKey(users, 'active'); - * // => 'pebbles' - */ -function findLastKey(object, predicate) { - return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); -} - -export default findLastKey; diff --git a/node_modules/lodash-es/first.js b/node_modules/lodash-es/first.js deleted file mode 100644 index db707ff..0000000 --- a/node_modules/lodash-es/first.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './head.js' diff --git a/node_modules/lodash-es/flatMap.js b/node_modules/lodash-es/flatMap.js deleted file mode 100644 index 52a6a7a..0000000 --- a/node_modules/lodash-es/flatMap.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseFlatten from './_baseFlatten.js'; -import map from './map.js'; - -/** - * Creates a flattened array of values by running each element in `collection` - * thru `iteratee` and flattening the mapped results. The iteratee is invoked - * with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [n, n]; - * } - * - * _.flatMap([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ -function flatMap(collection, iteratee) { - return baseFlatten(map(collection, iteratee), 1); -} - -export default flatMap; diff --git a/node_modules/lodash-es/flatMapDeep.js b/node_modules/lodash-es/flatMapDeep.js deleted file mode 100644 index d33d219..0000000 --- a/node_modules/lodash-es/flatMapDeep.js +++ /dev/null @@ -1,31 +0,0 @@ -import baseFlatten from './_baseFlatten.js'; -import map from './map.js'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } - * - * _.flatMapDeep([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ -function flatMapDeep(collection, iteratee) { - return baseFlatten(map(collection, iteratee), INFINITY); -} - -export default flatMapDeep; diff --git a/node_modules/lodash-es/flatMapDepth.js b/node_modules/lodash-es/flatMapDepth.js deleted file mode 100644 index 4be0096..0000000 --- a/node_modules/lodash-es/flatMapDepth.js +++ /dev/null @@ -1,31 +0,0 @@ -import baseFlatten from './_baseFlatten.js'; -import map from './map.js'; -import toInteger from './toInteger.js'; - -/** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } - * - * _.flatMapDepth([1, 2], duplicate, 2); - * // => [[1, 1], [2, 2]] - */ -function flatMapDepth(collection, iteratee, depth) { - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(map(collection, iteratee), depth); -} - -export default flatMapDepth; diff --git a/node_modules/lodash-es/flatten.js b/node_modules/lodash-es/flatten.js deleted file mode 100644 index 399b2a7..0000000 --- a/node_modules/lodash-es/flatten.js +++ /dev/null @@ -1,22 +0,0 @@ -import baseFlatten from './_baseFlatten.js'; - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; -} - -export default flatten; diff --git a/node_modules/lodash-es/flattenDeep.js b/node_modules/lodash-es/flattenDeep.js deleted file mode 100644 index 4a7a9a9..0000000 --- a/node_modules/lodash-es/flattenDeep.js +++ /dev/null @@ -1,25 +0,0 @@ -import baseFlatten from './_baseFlatten.js'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Recursively flattens `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] - */ -function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; -} - -export default flattenDeep; diff --git a/node_modules/lodash-es/flattenDepth.js b/node_modules/lodash-es/flattenDepth.js deleted file mode 100644 index 101dc3f..0000000 --- a/node_modules/lodash-es/flattenDepth.js +++ /dev/null @@ -1,33 +0,0 @@ -import baseFlatten from './_baseFlatten.js'; -import toInteger from './toInteger.js'; - -/** - * Recursively flatten `array` up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Array - * @param {Array} array The array to flatten. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * var array = [1, [2, [3, [4]], 5]]; - * - * _.flattenDepth(array, 1); - * // => [1, 2, [3, [4]], 5] - * - * _.flattenDepth(array, 2); - * // => [1, 2, 3, [4], 5] - */ -function flattenDepth(array, depth) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(array, depth); -} - -export default flattenDepth; diff --git a/node_modules/lodash-es/flip.js b/node_modules/lodash-es/flip.js deleted file mode 100644 index 787324c..0000000 --- a/node_modules/lodash-es/flip.js +++ /dev/null @@ -1,28 +0,0 @@ -import createWrap from './_createWrap.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_FLIP_FLAG = 512; - -/** - * Creates a function that invokes `func` with arguments reversed. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new flipped function. - * @example - * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); - * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] - */ -function flip(func) { - return createWrap(func, WRAP_FLIP_FLAG); -} - -export default flip; diff --git a/node_modules/lodash-es/floor.js b/node_modules/lodash-es/floor.js deleted file mode 100644 index 7ea5394..0000000 --- a/node_modules/lodash-es/floor.js +++ /dev/null @@ -1,26 +0,0 @@ -import createRound from './_createRound.js'; - -/** - * Computes `number` rounded down to `precision`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Math - * @param {number} number The number to round down. - * @param {number} [precision=0] The precision to round down to. - * @returns {number} Returns the rounded down number. - * @example - * - * _.floor(4.006); - * // => 4 - * - * _.floor(0.046, 2); - * // => 0.04 - * - * _.floor(4060, -2); - * // => 4000 - */ -var floor = createRound('floor'); - -export default floor; diff --git a/node_modules/lodash-es/flow.js b/node_modules/lodash-es/flow.js deleted file mode 100644 index 0a3e633..0000000 --- a/node_modules/lodash-es/flow.js +++ /dev/null @@ -1,27 +0,0 @@ -import createFlow from './_createFlow.js'; - -/** - * Creates a function that returns the result of invoking the given functions - * with the `this` binding of the created function, where each successive - * invocation is supplied the return value of the previous. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {...(Function|Function[])} [funcs] The functions to invoke. - * @returns {Function} Returns the new composite function. - * @see _.flowRight - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flow([_.add, square]); - * addSquare(1, 2); - * // => 9 - */ -var flow = createFlow(); - -export default flow; diff --git a/node_modules/lodash-es/flowRight.js b/node_modules/lodash-es/flowRight.js deleted file mode 100644 index cec0b80..0000000 --- a/node_modules/lodash-es/flowRight.js +++ /dev/null @@ -1,26 +0,0 @@ -import createFlow from './_createFlow.js'; - -/** - * This method is like `_.flow` except that it creates a function that - * invokes the given functions from right to left. - * - * @static - * @since 3.0.0 - * @memberOf _ - * @category Util - * @param {...(Function|Function[])} [funcs] The functions to invoke. - * @returns {Function} Returns the new composite function. - * @see _.flow - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flowRight([square, _.add]); - * addSquare(1, 2); - * // => 9 - */ -var flowRight = createFlow(true); - -export default flowRight; diff --git a/node_modules/lodash-es/forEach.js b/node_modules/lodash-es/forEach.js deleted file mode 100644 index ac1310c..0000000 --- a/node_modules/lodash-es/forEach.js +++ /dev/null @@ -1,41 +0,0 @@ -import arrayEach from './_arrayEach.js'; -import baseEach from './_baseEach.js'; -import castFunction from './_castFunction.js'; -import isArray from './isArray.js'; - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, castFunction(iteratee)); -} - -export default forEach; diff --git a/node_modules/lodash-es/forEachRight.js b/node_modules/lodash-es/forEachRight.js deleted file mode 100644 index 924548e..0000000 --- a/node_modules/lodash-es/forEachRight.js +++ /dev/null @@ -1,31 +0,0 @@ -import arrayEachRight from './_arrayEachRight.js'; -import baseEachRight from './_baseEachRight.js'; -import castFunction from './_castFunction.js'; -import isArray from './isArray.js'; - -/** - * This method is like `_.forEach` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @alias eachRight - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEach - * @example - * - * _.forEachRight([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `2` then `1`. - */ -function forEachRight(collection, iteratee) { - var func = isArray(collection) ? arrayEachRight : baseEachRight; - return func(collection, castFunction(iteratee)); -} - -export default forEachRight; diff --git a/node_modules/lodash-es/forIn.js b/node_modules/lodash-es/forIn.js deleted file mode 100644 index 436f319..0000000 --- a/node_modules/lodash-es/forIn.js +++ /dev/null @@ -1,39 +0,0 @@ -import baseFor from './_baseFor.js'; -import castFunction from './_castFunction.js'; -import keysIn from './keysIn.js'; - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : baseFor(object, castFunction(iteratee), keysIn); -} - -export default forIn; diff --git a/node_modules/lodash-es/forInRight.js b/node_modules/lodash-es/forInRight.js deleted file mode 100644 index cc92970..0000000 --- a/node_modules/lodash-es/forInRight.js +++ /dev/null @@ -1,37 +0,0 @@ -import baseForRight from './_baseForRight.js'; -import castFunction from './_castFunction.js'; -import keysIn from './keysIn.js'; - -/** - * This method is like `_.forIn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forIn - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forInRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. - */ -function forInRight(object, iteratee) { - return object == null - ? object - : baseForRight(object, castFunction(iteratee), keysIn); -} - -export default forInRight; diff --git a/node_modules/lodash-es/forOwn.js b/node_modules/lodash-es/forOwn.js deleted file mode 100644 index fe66169..0000000 --- a/node_modules/lodash-es/forOwn.js +++ /dev/null @@ -1,36 +0,0 @@ -import baseForOwn from './_baseForOwn.js'; -import castFunction from './_castFunction.js'; - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && baseForOwn(object, castFunction(iteratee)); -} - -export default forOwn; diff --git a/node_modules/lodash-es/forOwnRight.js b/node_modules/lodash-es/forOwnRight.js deleted file mode 100644 index fe2dd28..0000000 --- a/node_modules/lodash-es/forOwnRight.js +++ /dev/null @@ -1,34 +0,0 @@ -import baseForOwnRight from './_baseForOwnRight.js'; -import castFunction from './_castFunction.js'; - -/** - * This method is like `_.forOwn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwn - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwnRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. - */ -function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, castFunction(iteratee)); -} - -export default forOwnRight; diff --git a/node_modules/lodash-es/fromPairs.js b/node_modules/lodash-es/fromPairs.js deleted file mode 100644 index 4267cfb..0000000 --- a/node_modules/lodash-es/fromPairs.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * The inverse of `_.toPairs`; this method returns an object composed - * from key-value `pairs`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} pairs The key-value pairs. - * @returns {Object} Returns the new object. - * @example - * - * _.fromPairs([['a', 1], ['b', 2]]); - * // => { 'a': 1, 'b': 2 } - */ -function fromPairs(pairs) { - var index = -1, - length = pairs == null ? 0 : pairs.length, - result = {}; - - while (++index < length) { - var pair = pairs[index]; - result[pair[0]] = pair[1]; - } - return result; -} - -export default fromPairs; diff --git a/node_modules/lodash-es/function.default.js b/node_modules/lodash-es/function.default.js deleted file mode 100644 index a92f4df..0000000 --- a/node_modules/lodash-es/function.default.js +++ /dev/null @@ -1,31 +0,0 @@ -import after from './after.js'; -import ary from './ary.js'; -import before from './before.js'; -import bind from './bind.js'; -import bindKey from './bindKey.js'; -import curry from './curry.js'; -import curryRight from './curryRight.js'; -import debounce from './debounce.js'; -import defer from './defer.js'; -import delay from './delay.js'; -import flip from './flip.js'; -import memoize from './memoize.js'; -import negate from './negate.js'; -import once from './once.js'; -import overArgs from './overArgs.js'; -import partial from './partial.js'; -import partialRight from './partialRight.js'; -import rearg from './rearg.js'; -import rest from './rest.js'; -import spread from './spread.js'; -import throttle from './throttle.js'; -import unary from './unary.js'; -import wrap from './wrap.js'; - -export default { - after, ary, before, bind, bindKey, - curry, curryRight, debounce, defer, delay, - flip, memoize, negate, once, overArgs, - partial, partialRight, rearg, rest, spread, - throttle, unary, wrap -}; diff --git a/node_modules/lodash-es/function.js b/node_modules/lodash-es/function.js deleted file mode 100644 index 7c1dddf..0000000 --- a/node_modules/lodash-es/function.js +++ /dev/null @@ -1,24 +0,0 @@ -export { default as after } from './after.js'; -export { default as ary } from './ary.js'; -export { default as before } from './before.js'; -export { default as bind } from './bind.js'; -export { default as bindKey } from './bindKey.js'; -export { default as curry } from './curry.js'; -export { default as curryRight } from './curryRight.js'; -export { default as debounce } from './debounce.js'; -export { default as defer } from './defer.js'; -export { default as delay } from './delay.js'; -export { default as flip } from './flip.js'; -export { default as memoize } from './memoize.js'; -export { default as negate } from './negate.js'; -export { default as once } from './once.js'; -export { default as overArgs } from './overArgs.js'; -export { default as partial } from './partial.js'; -export { default as partialRight } from './partialRight.js'; -export { default as rearg } from './rearg.js'; -export { default as rest } from './rest.js'; -export { default as spread } from './spread.js'; -export { default as throttle } from './throttle.js'; -export { default as unary } from './unary.js'; -export { default as wrap } from './wrap.js'; -export { default } from './function.default.js'; diff --git a/node_modules/lodash-es/functions.js b/node_modules/lodash-es/functions.js deleted file mode 100644 index b9ea4de..0000000 --- a/node_modules/lodash-es/functions.js +++ /dev/null @@ -1,31 +0,0 @@ -import baseFunctions from './_baseFunctions.js'; -import keys from './keys.js'; - -/** - * Creates an array of function property names from own enumerable properties - * of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functionsIn - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functions(new Foo); - * // => ['a', 'b'] - */ -function functions(object) { - return object == null ? [] : baseFunctions(object, keys(object)); -} - -export default functions; diff --git a/node_modules/lodash-es/functionsIn.js b/node_modules/lodash-es/functionsIn.js deleted file mode 100644 index fb727f1..0000000 --- a/node_modules/lodash-es/functionsIn.js +++ /dev/null @@ -1,31 +0,0 @@ -import baseFunctions from './_baseFunctions.js'; -import keysIn from './keysIn.js'; - -/** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functions - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functionsIn(new Foo); - * // => ['a', 'b', 'c'] - */ -function functionsIn(object) { - return object == null ? [] : baseFunctions(object, keysIn(object)); -} - -export default functionsIn; diff --git a/node_modules/lodash-es/get.js b/node_modules/lodash-es/get.js deleted file mode 100644 index 5517835..0000000 --- a/node_modules/lodash-es/get.js +++ /dev/null @@ -1,33 +0,0 @@ -import baseGet from './_baseGet.js'; - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; -} - -export default get; diff --git a/node_modules/lodash-es/groupBy.js b/node_modules/lodash-es/groupBy.js deleted file mode 100644 index ba83631..0000000 --- a/node_modules/lodash-es/groupBy.js +++ /dev/null @@ -1,41 +0,0 @@ -import baseAssignValue from './_baseAssignValue.js'; -import createAggregator from './_createAggregator.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The order of grouped values - * is determined by the order they occur in `collection`. The corresponding - * value of each key is an array of elements responsible for generating the - * key. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } - * - * // The `_.property` iteratee shorthand. - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ -var groupBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - result[key].push(value); - } else { - baseAssignValue(result, key, [value]); - } -}); - -export default groupBy; diff --git a/node_modules/lodash-es/gt.js b/node_modules/lodash-es/gt.js deleted file mode 100644 index 6a7227f..0000000 --- a/node_modules/lodash-es/gt.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseGt from './_baseGt.js'; -import createRelationalOperation from './_createRelationalOperation.js'; - -/** - * Checks if `value` is greater than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - * @see _.lt - * @example - * - * _.gt(3, 1); - * // => true - * - * _.gt(3, 3); - * // => false - * - * _.gt(1, 3); - * // => false - */ -var gt = createRelationalOperation(baseGt); - -export default gt; diff --git a/node_modules/lodash-es/gte.js b/node_modules/lodash-es/gte.js deleted file mode 100644 index 22c72b2..0000000 --- a/node_modules/lodash-es/gte.js +++ /dev/null @@ -1,30 +0,0 @@ -import createRelationalOperation from './_createRelationalOperation.js'; - -/** - * Checks if `value` is greater than or equal to `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than or equal to - * `other`, else `false`. - * @see _.lte - * @example - * - * _.gte(3, 1); - * // => true - * - * _.gte(3, 3); - * // => true - * - * _.gte(1, 3); - * // => false - */ -var gte = createRelationalOperation(function(value, other) { - return value >= other; -}); - -export default gte; diff --git a/node_modules/lodash-es/has.js b/node_modules/lodash-es/has.js deleted file mode 100644 index 83c8e49..0000000 --- a/node_modules/lodash-es/has.js +++ /dev/null @@ -1,35 +0,0 @@ -import baseHas from './_baseHas.js'; -import hasPath from './_hasPath.js'; - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && hasPath(object, path, baseHas); -} - -export default has; diff --git a/node_modules/lodash-es/hasIn.js b/node_modules/lodash-es/hasIn.js deleted file mode 100644 index c02eb1f..0000000 --- a/node_modules/lodash-es/hasIn.js +++ /dev/null @@ -1,34 +0,0 @@ -import baseHasIn from './_baseHasIn.js'; -import hasPath from './_hasPath.js'; - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); -} - -export default hasIn; diff --git a/node_modules/lodash-es/head.js b/node_modules/lodash-es/head.js deleted file mode 100644 index 0a62691..0000000 --- a/node_modules/lodash-es/head.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias first - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.head([1, 2, 3]); - * // => 1 - * - * _.head([]); - * // => undefined - */ -function head(array) { - return (array && array.length) ? array[0] : undefined; -} - -export default head; diff --git a/node_modules/lodash-es/identity.js b/node_modules/lodash-es/identity.js deleted file mode 100644 index ed074d8..0000000 --- a/node_modules/lodash-es/identity.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} - -export default identity; diff --git a/node_modules/lodash-es/inRange.js b/node_modules/lodash-es/inRange.js deleted file mode 100644 index 0e130ab..0000000 --- a/node_modules/lodash-es/inRange.js +++ /dev/null @@ -1,55 +0,0 @@ -import baseInRange from './_baseInRange.js'; -import toFinite from './toFinite.js'; -import toNumber from './toNumber.js'; - -/** - * Checks if `n` is between `start` and up to, but not including, `end`. If - * `end` is not specified, it's set to `start` with `start` then set to `0`. - * If `start` is greater than `end` the params are swapped to support - * negative ranges. - * - * @static - * @memberOf _ - * @since 3.3.0 - * @category Number - * @param {number} number The number to check. - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - * @see _.range, _.rangeRight - * @example - * - * _.inRange(3, 2, 4); - * // => true - * - * _.inRange(4, 8); - * // => true - * - * _.inRange(4, 2); - * // => false - * - * _.inRange(2, 2); - * // => false - * - * _.inRange(1.2, 2); - * // => true - * - * _.inRange(5.2, 4); - * // => false - * - * _.inRange(-3, -2, -6); - * // => true - */ -function inRange(number, start, end) { - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - number = toNumber(number); - return baseInRange(number, start, end); -} - -export default inRange; diff --git a/node_modules/lodash-es/includes.js b/node_modules/lodash-es/includes.js deleted file mode 100644 index 7bb3793..0000000 --- a/node_modules/lodash-es/includes.js +++ /dev/null @@ -1,53 +0,0 @@ -import baseIndexOf from './_baseIndexOf.js'; -import isArrayLike from './isArrayLike.js'; -import isString from './isString.js'; -import toInteger from './toInteger.js'; -import values from './values.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'a': 1, 'b': 2 }, 1); - * // => true - * - * _.includes('abcd', 'bc'); - * // => true - */ -function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; - - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) - ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) - : (!!length && baseIndexOf(collection, value, fromIndex) > -1); -} - -export default includes; diff --git a/node_modules/lodash-es/indexOf.js b/node_modules/lodash-es/indexOf.js deleted file mode 100644 index ea3f959..0000000 --- a/node_modules/lodash-es/indexOf.js +++ /dev/null @@ -1,42 +0,0 @@ -import baseIndexOf from './_baseIndexOf.js'; -import toInteger from './toInteger.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the - * offset from the end of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // Search from the `fromIndex`. - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - */ -function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseIndexOf(array, value, index); -} - -export default indexOf; diff --git a/node_modules/lodash-es/initial.js b/node_modules/lodash-es/initial.js deleted file mode 100644 index 908e560..0000000 --- a/node_modules/lodash-es/initial.js +++ /dev/null @@ -1,22 +0,0 @@ -import baseSlice from './_baseSlice.js'; - -/** - * Gets all but the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.initial([1, 2, 3]); - * // => [1, 2] - */ -function initial(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 0, -1) : []; -} - -export default initial; diff --git a/node_modules/lodash-es/intersection.js b/node_modules/lodash-es/intersection.js deleted file mode 100644 index 9d4ef19..0000000 --- a/node_modules/lodash-es/intersection.js +++ /dev/null @@ -1,30 +0,0 @@ -import arrayMap from './_arrayMap.js'; -import baseIntersection from './_baseIntersection.js'; -import baseRest from './_baseRest.js'; -import castArrayLikeObject from './_castArrayLikeObject.js'; - -/** - * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersection([2, 1], [2, 3]); - * // => [2] - */ -var intersection = baseRest(function(arrays) { - var mapped = arrayMap(arrays, castArrayLikeObject); - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped) - : []; -}); - -export default intersection; diff --git a/node_modules/lodash-es/intersectionBy.js b/node_modules/lodash-es/intersectionBy.js deleted file mode 100644 index 6886f90..0000000 --- a/node_modules/lodash-es/intersectionBy.js +++ /dev/null @@ -1,45 +0,0 @@ -import arrayMap from './_arrayMap.js'; -import baseIntersection from './_baseIntersection.js'; -import baseIteratee from './_baseIteratee.js'; -import baseRest from './_baseRest.js'; -import castArrayLikeObject from './_castArrayLikeObject.js'; -import last from './last.js'; - -/** - * This method is like `_.intersection` except that it accepts `iteratee` - * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [2.1] - * - * // The `_.property` iteratee shorthand. - * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }] - */ -var intersectionBy = baseRest(function(arrays) { - var iteratee = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - if (iteratee === last(mapped)) { - iteratee = undefined; - } else { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, baseIteratee(iteratee, 2)) - : []; -}); - -export default intersectionBy; diff --git a/node_modules/lodash-es/intersectionWith.js b/node_modules/lodash-es/intersectionWith.js deleted file mode 100644 index 79e9424..0000000 --- a/node_modules/lodash-es/intersectionWith.js +++ /dev/null @@ -1,41 +0,0 @@ -import arrayMap from './_arrayMap.js'; -import baseIntersection from './_baseIntersection.js'; -import baseRest from './_baseRest.js'; -import castArrayLikeObject from './_castArrayLikeObject.js'; -import last from './last.js'; - -/** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The order and references - * of result values are determined by the first array. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] - */ -var intersectionWith = baseRest(function(arrays) { - var comparator = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - comparator = typeof comparator == 'function' ? comparator : undefined; - if (comparator) { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, undefined, comparator) - : []; -}); - -export default intersectionWith; diff --git a/node_modules/lodash-es/invert.js b/node_modules/lodash-es/invert.js deleted file mode 100644 index 3ad074d..0000000 --- a/node_modules/lodash-es/invert.js +++ /dev/null @@ -1,27 +0,0 @@ -import constant from './constant.js'; -import createInverter from './_createInverter.js'; -import identity from './identity.js'; - -/** - * Creates an object composed of the inverted keys and values of `object`. - * If `object` contains duplicate values, subsequent values overwrite - * property assignments of previous values. - * - * @static - * @memberOf _ - * @since 0.7.0 - * @category Object - * @param {Object} object The object to invert. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invert(object); - * // => { '1': 'c', '2': 'b' } - */ -var invert = createInverter(function(result, value, key) { - result[value] = key; -}, constant(identity)); - -export default invert; diff --git a/node_modules/lodash-es/invertBy.js b/node_modules/lodash-es/invertBy.js deleted file mode 100644 index e29fc9d..0000000 --- a/node_modules/lodash-es/invertBy.js +++ /dev/null @@ -1,44 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import createInverter from './_createInverter.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * This method is like `_.invert` except that the inverted object is generated - * from the results of running each element of `object` thru `iteratee`. The - * corresponding inverted value of each inverted key is an array of keys - * responsible for generating the inverted value. The iteratee is invoked - * with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.1.0 - * @category Object - * @param {Object} object The object to invert. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invertBy(object); - * // => { '1': ['a', 'c'], '2': ['b'] } - * - * _.invertBy(object, function(value) { - * return 'group' + value; - * }); - * // => { 'group1': ['a', 'c'], 'group2': ['b'] } - */ -var invertBy = createInverter(function(result, value, key) { - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } -}, baseIteratee); - -export default invertBy; diff --git a/node_modules/lodash-es/invoke.js b/node_modules/lodash-es/invoke.js deleted file mode 100644 index a21208b..0000000 --- a/node_modules/lodash-es/invoke.js +++ /dev/null @@ -1,24 +0,0 @@ -import baseInvoke from './_baseInvoke.js'; -import baseRest from './_baseRest.js'; - -/** - * Invokes the method at `path` of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - * @example - * - * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; - * - * _.invoke(object, 'a[0].b.c.slice', 1, 3); - * // => [2, 3] - */ -var invoke = baseRest(baseInvoke); - -export default invoke; diff --git a/node_modules/lodash-es/invokeMap.js b/node_modules/lodash-es/invokeMap.js deleted file mode 100644 index bab3383..0000000 --- a/node_modules/lodash-es/invokeMap.js +++ /dev/null @@ -1,41 +0,0 @@ -import apply from './_apply.js'; -import baseEach from './_baseEach.js'; -import baseInvoke from './_baseInvoke.js'; -import baseRest from './_baseRest.js'; -import isArrayLike from './isArrayLike.js'; - -/** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `path` is a function, it's invoked - * for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke each method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invokeMap([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ -var invokeMap = baseRest(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); - }); - return result; -}); - -export default invokeMap; diff --git a/node_modules/lodash-es/isArguments.js b/node_modules/lodash-es/isArguments.js deleted file mode 100644 index 6c49fe5..0000000 --- a/node_modules/lodash-es/isArguments.js +++ /dev/null @@ -1,36 +0,0 @@ -import baseIsArguments from './_baseIsArguments.js'; -import isObjectLike from './isObjectLike.js'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); -}; - -export default isArguments; diff --git a/node_modules/lodash-es/isArray.js b/node_modules/lodash-es/isArray.js deleted file mode 100644 index 5643c19..0000000 --- a/node_modules/lodash-es/isArray.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -export default isArray; diff --git a/node_modules/lodash-es/isArrayBuffer.js b/node_modules/lodash-es/isArrayBuffer.js deleted file mode 100644 index 32f91ac..0000000 --- a/node_modules/lodash-es/isArrayBuffer.js +++ /dev/null @@ -1,27 +0,0 @@ -import baseIsArrayBuffer from './_baseIsArrayBuffer.js'; -import baseUnary from './_baseUnary.js'; -import nodeUtil from './_nodeUtil.js'; - -/* Node.js helper references. */ -var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; - -/** - * Checks if `value` is classified as an `ArrayBuffer` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - * @example - * - * _.isArrayBuffer(new ArrayBuffer(2)); - * // => true - * - * _.isArrayBuffer(new Array(2)); - * // => false - */ -var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; - -export default isArrayBuffer; diff --git a/node_modules/lodash-es/isArrayLike.js b/node_modules/lodash-es/isArrayLike.js deleted file mode 100644 index f763abd..0000000 --- a/node_modules/lodash-es/isArrayLike.js +++ /dev/null @@ -1,33 +0,0 @@ -import isFunction from './isFunction.js'; -import isLength from './isLength.js'; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -export default isArrayLike; diff --git a/node_modules/lodash-es/isArrayLikeObject.js b/node_modules/lodash-es/isArrayLikeObject.js deleted file mode 100644 index 0332da4..0000000 --- a/node_modules/lodash-es/isArrayLikeObject.js +++ /dev/null @@ -1,33 +0,0 @@ -import isArrayLike from './isArrayLike.js'; -import isObjectLike from './isObjectLike.js'; - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -export default isArrayLikeObject; diff --git a/node_modules/lodash-es/isBoolean.js b/node_modules/lodash-es/isBoolean.js deleted file mode 100644 index 883cee9..0000000 --- a/node_modules/lodash-es/isBoolean.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]'; - -/** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ -function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); -} - -export default isBoolean; diff --git a/node_modules/lodash-es/isBuffer.js b/node_modules/lodash-es/isBuffer.js deleted file mode 100644 index d7ba078..0000000 --- a/node_modules/lodash-es/isBuffer.js +++ /dev/null @@ -1,38 +0,0 @@ -import root from './_root.js'; -import stubFalse from './stubFalse.js'; - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; - -export default isBuffer; diff --git a/node_modules/lodash-es/isDate.js b/node_modules/lodash-es/isDate.js deleted file mode 100644 index d586c51..0000000 --- a/node_modules/lodash-es/isDate.js +++ /dev/null @@ -1,27 +0,0 @@ -import baseIsDate from './_baseIsDate.js'; -import baseUnary from './_baseUnary.js'; -import nodeUtil from './_nodeUtil.js'; - -/* Node.js helper references. */ -var nodeIsDate = nodeUtil && nodeUtil.isDate; - -/** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ -var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; - -export default isDate; diff --git a/node_modules/lodash-es/isElement.js b/node_modules/lodash-es/isElement.js deleted file mode 100644 index c79ba5b..0000000 --- a/node_modules/lodash-es/isElement.js +++ /dev/null @@ -1,25 +0,0 @@ -import isObjectLike from './isObjectLike.js'; -import isPlainObject from './isPlainObject.js'; - -/** - * Checks if `value` is likely a DOM element. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. - * @example - * - * _.isElement(document.body); - * // => true - * - * _.isElement(''); - * // => false - */ -function isElement(value) { - return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); -} - -export default isElement; diff --git a/node_modules/lodash-es/isEmpty.js b/node_modules/lodash-es/isEmpty.js deleted file mode 100644 index c2e55f8..0000000 --- a/node_modules/lodash-es/isEmpty.js +++ /dev/null @@ -1,77 +0,0 @@ -import baseKeys from './_baseKeys.js'; -import getTag from './_getTag.js'; -import isArguments from './isArguments.js'; -import isArray from './isArray.js'; -import isArrayLike from './isArrayLike.js'; -import isBuffer from './isBuffer.js'; -import isPrototype from './_isPrototype.js'; -import isTypedArray from './isTypedArray.js'; - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ -function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && - (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || - isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; - } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } - if (isPrototype(value)) { - return !baseKeys(value).length; - } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } - } - return true; -} - -export default isEmpty; diff --git a/node_modules/lodash-es/isEqual.js b/node_modules/lodash-es/isEqual.js deleted file mode 100644 index 8be0e2c..0000000 --- a/node_modules/lodash-es/isEqual.js +++ /dev/null @@ -1,35 +0,0 @@ -import baseIsEqual from './_baseIsEqual.js'; - -/** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ -function isEqual(value, other) { - return baseIsEqual(value, other); -} - -export default isEqual; diff --git a/node_modules/lodash-es/isEqualWith.js b/node_modules/lodash-es/isEqualWith.js deleted file mode 100644 index c16f205..0000000 --- a/node_modules/lodash-es/isEqualWith.js +++ /dev/null @@ -1,41 +0,0 @@ -import baseIsEqual from './_baseIsEqual.js'; - -/** - * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with up to - * six arguments: (objValue, othValue [, index|key, object, other, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqualWith(array, other, customizer); - * // => true - */ -function isEqualWith(value, other, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; -} - -export default isEqualWith; diff --git a/node_modules/lodash-es/isError.js b/node_modules/lodash-es/isError.js deleted file mode 100644 index c57a38b..0000000 --- a/node_modules/lodash-es/isError.js +++ /dev/null @@ -1,36 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isObjectLike from './isObjectLike.js'; -import isPlainObject from './isPlainObject.js'; - -/** `Object#toString` result references. */ -var domExcTag = '[object DOMException]', - errorTag = '[object Error]'; - -/** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. - * @example - * - * _.isError(new Error); - * // => true - * - * _.isError(Error); - * // => false - */ -function isError(value) { - if (!isObjectLike(value)) { - return false; - } - var tag = baseGetTag(value); - return tag == errorTag || tag == domExcTag || - (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); -} - -export default isError; diff --git a/node_modules/lodash-es/isFinite.js b/node_modules/lodash-es/isFinite.js deleted file mode 100644 index 1c6a506..0000000 --- a/node_modules/lodash-es/isFinite.js +++ /dev/null @@ -1,36 +0,0 @@ -import root from './_root.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsFinite = root.isFinite; - -/** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. - * @example - * - * _.isFinite(3); - * // => true - * - * _.isFinite(Number.MIN_VALUE); - * // => true - * - * _.isFinite(Infinity); - * // => false - * - * _.isFinite('3'); - * // => false - */ -function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); -} - -export default isFinite; diff --git a/node_modules/lodash-es/isFunction.js b/node_modules/lodash-es/isFunction.js deleted file mode 100644 index 57c133d..0000000 --- a/node_modules/lodash-es/isFunction.js +++ /dev/null @@ -1,37 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isObject from './isObject.js'; - -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -export default isFunction; diff --git a/node_modules/lodash-es/isInteger.js b/node_modules/lodash-es/isInteger.js deleted file mode 100644 index 8284ac0..0000000 --- a/node_modules/lodash-es/isInteger.js +++ /dev/null @@ -1,33 +0,0 @@ -import toInteger from './toInteger.js'; - -/** - * Checks if `value` is an integer. - * - * **Note:** This method is based on - * [`Number.isInteger`](https://mdn.io/Number/isInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. - * @example - * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false - */ -function isInteger(value) { - return typeof value == 'number' && value == toInteger(value); -} - -export default isInteger; diff --git a/node_modules/lodash-es/isLength.js b/node_modules/lodash-es/isLength.js deleted file mode 100644 index 2acf24e..0000000 --- a/node_modules/lodash-es/isLength.js +++ /dev/null @@ -1,35 +0,0 @@ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -export default isLength; diff --git a/node_modules/lodash-es/isMap.js b/node_modules/lodash-es/isMap.js deleted file mode 100644 index d867dfa..0000000 --- a/node_modules/lodash-es/isMap.js +++ /dev/null @@ -1,27 +0,0 @@ -import baseIsMap from './_baseIsMap.js'; -import baseUnary from './_baseUnary.js'; -import nodeUtil from './_nodeUtil.js'; - -/* Node.js helper references. */ -var nodeIsMap = nodeUtil && nodeUtil.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - -export default isMap; diff --git a/node_modules/lodash-es/isMatch.js b/node_modules/lodash-es/isMatch.js deleted file mode 100644 index 4872ebf..0000000 --- a/node_modules/lodash-es/isMatch.js +++ /dev/null @@ -1,36 +0,0 @@ -import baseIsMatch from './_baseIsMatch.js'; -import getMatchData from './_getMatchData.js'; - -/** - * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. - * - * **Note:** This method is equivalent to `_.matches` when `source` is - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * - * _.isMatch(object, { 'b': 2 }); - * // => true - * - * _.isMatch(object, { 'b': 1 }); - * // => false - */ -function isMatch(object, source) { - return object === source || baseIsMatch(object, source, getMatchData(source)); -} - -export default isMatch; diff --git a/node_modules/lodash-es/isMatchWith.js b/node_modules/lodash-es/isMatchWith.js deleted file mode 100644 index aeec8f5..0000000 --- a/node_modules/lodash-es/isMatchWith.js +++ /dev/null @@ -1,41 +0,0 @@ -import baseIsMatch from './_baseIsMatch.js'; -import getMatchData from './_getMatchData.js'; - -/** - * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with five - * arguments: (objValue, srcValue, index|key, object, source). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, srcValue) { - * if (isGreeting(objValue) && isGreeting(srcValue)) { - * return true; - * } - * } - * - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; - * - * _.isMatchWith(object, source, customizer); - * // => true - */ -function isMatchWith(object, source, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseIsMatch(object, source, getMatchData(source), customizer); -} - -export default isMatchWith; diff --git a/node_modules/lodash-es/isNaN.js b/node_modules/lodash-es/isNaN.js deleted file mode 100644 index c1747b3..0000000 --- a/node_modules/lodash-es/isNaN.js +++ /dev/null @@ -1,38 +0,0 @@ -import isNumber from './isNumber.js'; - -/** - * Checks if `value` is `NaN`. - * - * **Note:** This method is based on - * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as - * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for - * `undefined` and other non-number values. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ -function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some - // ActiveX objects in IE. - return isNumber(value) && value != +value; -} - -export default isNaN; diff --git a/node_modules/lodash-es/isNative.js b/node_modules/lodash-es/isNative.js deleted file mode 100644 index f1d2c32..0000000 --- a/node_modules/lodash-es/isNative.js +++ /dev/null @@ -1,40 +0,0 @@ -import baseIsNative from './_baseIsNative.js'; -import isMaskable from './_isMaskable.js'; - -/** Error message constants. */ -var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; - -/** - * Checks if `value` is a pristine native function. - * - * **Note:** This method can't reliably detect native functions in the presence - * of the core-js package because core-js circumvents this kind of detection. - * Despite multiple requests, the core-js maintainer has made it clear: any - * attempt to fix the detection will be obstructed. As a result, we're left - * with little choice but to throw an error. Unfortunately, this also affects - * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), - * which rely on core-js. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ -function isNative(value) { - if (isMaskable(value)) { - throw new Error(CORE_ERROR_TEXT); - } - return baseIsNative(value); -} - -export default isNative; diff --git a/node_modules/lodash-es/isNil.js b/node_modules/lodash-es/isNil.js deleted file mode 100644 index 9c4a93c..0000000 --- a/node_modules/lodash-es/isNil.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Checks if `value` is `null` or `undefined`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is nullish, else `false`. - * @example - * - * _.isNil(null); - * // => true - * - * _.isNil(void 0); - * // => true - * - * _.isNil(NaN); - * // => false - */ -function isNil(value) { - return value == null; -} - -export default isNil; diff --git a/node_modules/lodash-es/isNull.js b/node_modules/lodash-es/isNull.js deleted file mode 100644 index 5d88598..0000000 --- a/node_modules/lodash-es/isNull.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ -function isNull(value) { - return value === null; -} - -export default isNull; diff --git a/node_modules/lodash-es/isNumber.js b/node_modules/lodash-es/isNumber.js deleted file mode 100644 index 8cbdaa6..0000000 --- a/node_modules/lodash-es/isNumber.js +++ /dev/null @@ -1,38 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var numberTag = '[object Number]'; - -/** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ -function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); -} - -export default isNumber; diff --git a/node_modules/lodash-es/isObject.js b/node_modules/lodash-es/isObject.js deleted file mode 100644 index ddfebd5..0000000 --- a/node_modules/lodash-es/isObject.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -export default isObject; diff --git a/node_modules/lodash-es/isObjectLike.js b/node_modules/lodash-es/isObjectLike.js deleted file mode 100644 index 0e931b1..0000000 --- a/node_modules/lodash-es/isObjectLike.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -export default isObjectLike; diff --git a/node_modules/lodash-es/isPlainObject.js b/node_modules/lodash-es/isPlainObject.js deleted file mode 100644 index 45ec39f..0000000 --- a/node_modules/lodash-es/isPlainObject.js +++ /dev/null @@ -1,62 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import getPrototype from './_getPrototype.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} - -export default isPlainObject; diff --git a/node_modules/lodash-es/isRegExp.js b/node_modules/lodash-es/isRegExp.js deleted file mode 100644 index 19580db..0000000 --- a/node_modules/lodash-es/isRegExp.js +++ /dev/null @@ -1,27 +0,0 @@ -import baseIsRegExp from './_baseIsRegExp.js'; -import baseUnary from './_baseUnary.js'; -import nodeUtil from './_nodeUtil.js'; - -/* Node.js helper references. */ -var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; - -/** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ -var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; - -export default isRegExp; diff --git a/node_modules/lodash-es/isSafeInteger.js b/node_modules/lodash-es/isSafeInteger.js deleted file mode 100644 index beda911..0000000 --- a/node_modules/lodash-es/isSafeInteger.js +++ /dev/null @@ -1,37 +0,0 @@ -import isInteger from './isInteger.js'; - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 - * double precision number which isn't the result of a rounded unsafe integer. - * - * **Note:** This method is based on - * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. - * @example - * - * _.isSafeInteger(3); - * // => true - * - * _.isSafeInteger(Number.MIN_VALUE); - * // => false - * - * _.isSafeInteger(Infinity); - * // => false - * - * _.isSafeInteger('3'); - * // => false - */ -function isSafeInteger(value) { - return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; -} - -export default isSafeInteger; diff --git a/node_modules/lodash-es/isSet.js b/node_modules/lodash-es/isSet.js deleted file mode 100644 index 78c8198..0000000 --- a/node_modules/lodash-es/isSet.js +++ /dev/null @@ -1,27 +0,0 @@ -import baseIsSet from './_baseIsSet.js'; -import baseUnary from './_baseUnary.js'; -import nodeUtil from './_nodeUtil.js'; - -/* Node.js helper references. */ -var nodeIsSet = nodeUtil && nodeUtil.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - -export default isSet; diff --git a/node_modules/lodash-es/isString.js b/node_modules/lodash-es/isString.js deleted file mode 100644 index a422954..0000000 --- a/node_modules/lodash-es/isString.js +++ /dev/null @@ -1,30 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isArray from './isArray.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); -} - -export default isString; diff --git a/node_modules/lodash-es/isSymbol.js b/node_modules/lodash-es/isSymbol.js deleted file mode 100644 index 61702c6..0000000 --- a/node_modules/lodash-es/isSymbol.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -export default isSymbol; diff --git a/node_modules/lodash-es/isTypedArray.js b/node_modules/lodash-es/isTypedArray.js deleted file mode 100644 index 8cffbef..0000000 --- a/node_modules/lodash-es/isTypedArray.js +++ /dev/null @@ -1,27 +0,0 @@ -import baseIsTypedArray from './_baseIsTypedArray.js'; -import baseUnary from './_baseUnary.js'; -import nodeUtil from './_nodeUtil.js'; - -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -export default isTypedArray; diff --git a/node_modules/lodash-es/isUndefined.js b/node_modules/lodash-es/isUndefined.js deleted file mode 100644 index d4f97d5..0000000 --- a/node_modules/lodash-es/isUndefined.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -export default isUndefined; diff --git a/node_modules/lodash-es/isWeakMap.js b/node_modules/lodash-es/isWeakMap.js deleted file mode 100644 index a85307f..0000000 --- a/node_modules/lodash-es/isWeakMap.js +++ /dev/null @@ -1,28 +0,0 @@ -import getTag from './_getTag.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var weakMapTag = '[object WeakMap]'; - -/** - * Checks if `value` is classified as a `WeakMap` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. - * @example - * - * _.isWeakMap(new WeakMap); - * // => true - * - * _.isWeakMap(new Map); - * // => false - */ -function isWeakMap(value) { - return isObjectLike(value) && getTag(value) == weakMapTag; -} - -export default isWeakMap; diff --git a/node_modules/lodash-es/isWeakSet.js b/node_modules/lodash-es/isWeakSet.js deleted file mode 100644 index 69ad22e..0000000 --- a/node_modules/lodash-es/isWeakSet.js +++ /dev/null @@ -1,28 +0,0 @@ -import baseGetTag from './_baseGetTag.js'; -import isObjectLike from './isObjectLike.js'; - -/** `Object#toString` result references. */ -var weakSetTag = '[object WeakSet]'; - -/** - * Checks if `value` is classified as a `WeakSet` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. - * @example - * - * _.isWeakSet(new WeakSet); - * // => true - * - * _.isWeakSet(new Set); - * // => false - */ -function isWeakSet(value) { - return isObjectLike(value) && baseGetTag(value) == weakSetTag; -} - -export default isWeakSet; diff --git a/node_modules/lodash-es/iteratee.js b/node_modules/lodash-es/iteratee.js deleted file mode 100644 index a2a4af2..0000000 --- a/node_modules/lodash-es/iteratee.js +++ /dev/null @@ -1,53 +0,0 @@ -import baseClone from './_baseClone.js'; -import baseIteratee from './_baseIteratee.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1; - -/** - * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name, the created function returns the - * property value for a given element. If `func` is an array or object, the - * created function returns `true` for elements that contain the equivalent - * source properties, otherwise it returns `false`. - * - * @static - * @since 4.0.0 - * @memberOf _ - * @category Util - * @param {*} [func=_.identity] The value to convert to a callback. - * @returns {Function} Returns the callback. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); - * // => [{ 'user': 'barney', 'age': 36, 'active': true }] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, _.iteratee(['user', 'fred'])); - * // => [{ 'user': 'fred', 'age': 40 }] - * - * // The `_.property` iteratee shorthand. - * _.map(users, _.iteratee('user')); - * // => ['barney', 'fred'] - * - * // Create custom iteratee shorthands. - * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { - * return !_.isRegExp(func) ? iteratee(func) : function(string) { - * return func.test(string); - * }; - * }); - * - * _.filter(['abc', 'def'], /ef/); - * // => ['def'] - */ -function iteratee(func) { - return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); -} - -export default iteratee; diff --git a/node_modules/lodash-es/join.js b/node_modules/lodash-es/join.js deleted file mode 100644 index 61dd65b..0000000 --- a/node_modules/lodash-es/join.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeJoin = arrayProto.join; - -/** - * Converts all elements in `array` into a string separated by `separator`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to convert. - * @param {string} [separator=','] The element separator. - * @returns {string} Returns the joined string. - * @example - * - * _.join(['a', 'b', 'c'], '~'); - * // => 'a~b~c' - */ -function join(array, separator) { - return array == null ? '' : nativeJoin.call(array, separator); -} - -export default join; diff --git a/node_modules/lodash-es/kebabCase.js b/node_modules/lodash-es/kebabCase.js deleted file mode 100644 index 1df34db..0000000 --- a/node_modules/lodash-es/kebabCase.js +++ /dev/null @@ -1,28 +0,0 @@ -import createCompounder from './_createCompounder.js'; - -/** - * Converts `string` to - * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the kebab cased string. - * @example - * - * _.kebabCase('Foo Bar'); - * // => 'foo-bar' - * - * _.kebabCase('fooBar'); - * // => 'foo-bar' - * - * _.kebabCase('__FOO_BAR__'); - * // => 'foo-bar' - */ -var kebabCase = createCompounder(function(result, word, index) { - return result + (index ? '-' : '') + word.toLowerCase(); -}); - -export default kebabCase; diff --git a/node_modules/lodash-es/keyBy.js b/node_modules/lodash-es/keyBy.js deleted file mode 100644 index 3349522..0000000 --- a/node_modules/lodash-es/keyBy.js +++ /dev/null @@ -1,36 +0,0 @@ -import baseAssignValue from './_baseAssignValue.js'; -import createAggregator from './_createAggregator.js'; - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the last element responsible for generating the key. The - * iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * var array = [ - * { 'dir': 'left', 'code': 97 }, - * { 'dir': 'right', 'code': 100 } - * ]; - * - * _.keyBy(array, function(o) { - * return String.fromCharCode(o.code); - * }); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - * - * _.keyBy(array, 'dir'); - * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } - */ -var keyBy = createAggregator(function(result, value, key) { - baseAssignValue(result, key, value); -}); - -export default keyBy; diff --git a/node_modules/lodash-es/keys.js b/node_modules/lodash-es/keys.js deleted file mode 100644 index fd7089b..0000000 --- a/node_modules/lodash-es/keys.js +++ /dev/null @@ -1,37 +0,0 @@ -import arrayLikeKeys from './_arrayLikeKeys.js'; -import baseKeys from './_baseKeys.js'; -import isArrayLike from './isArrayLike.js'; - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -export default keys; diff --git a/node_modules/lodash-es/keysIn.js b/node_modules/lodash-es/keysIn.js deleted file mode 100644 index a77147a..0000000 --- a/node_modules/lodash-es/keysIn.js +++ /dev/null @@ -1,32 +0,0 @@ -import arrayLikeKeys from './_arrayLikeKeys.js'; -import baseKeysIn from './_baseKeysIn.js'; -import isArrayLike from './isArrayLike.js'; - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); -} - -export default keysIn; diff --git a/node_modules/lodash-es/lang.default.js b/node_modules/lodash-es/lang.default.js deleted file mode 100644 index 8fd434d..0000000 --- a/node_modules/lodash-es/lang.default.js +++ /dev/null @@ -1,71 +0,0 @@ -import castArray from './castArray.js'; -import clone from './clone.js'; -import cloneDeep from './cloneDeep.js'; -import cloneDeepWith from './cloneDeepWith.js'; -import cloneWith from './cloneWith.js'; -import conformsTo from './conformsTo.js'; -import eq from './eq.js'; -import gt from './gt.js'; -import gte from './gte.js'; -import isArguments from './isArguments.js'; -import isArray from './isArray.js'; -import isArrayBuffer from './isArrayBuffer.js'; -import isArrayLike from './isArrayLike.js'; -import isArrayLikeObject from './isArrayLikeObject.js'; -import isBoolean from './isBoolean.js'; -import isBuffer from './isBuffer.js'; -import isDate from './isDate.js'; -import isElement from './isElement.js'; -import isEmpty from './isEmpty.js'; -import isEqual from './isEqual.js'; -import isEqualWith from './isEqualWith.js'; -import isError from './isError.js'; -import isFinite from './isFinite.js'; -import isFunction from './isFunction.js'; -import isInteger from './isInteger.js'; -import isLength from './isLength.js'; -import isMap from './isMap.js'; -import isMatch from './isMatch.js'; -import isMatchWith from './isMatchWith.js'; -import isNaN from './isNaN.js'; -import isNative from './isNative.js'; -import isNil from './isNil.js'; -import isNull from './isNull.js'; -import isNumber from './isNumber.js'; -import isObject from './isObject.js'; -import isObjectLike from './isObjectLike.js'; -import isPlainObject from './isPlainObject.js'; -import isRegExp from './isRegExp.js'; -import isSafeInteger from './isSafeInteger.js'; -import isSet from './isSet.js'; -import isString from './isString.js'; -import isSymbol from './isSymbol.js'; -import isTypedArray from './isTypedArray.js'; -import isUndefined from './isUndefined.js'; -import isWeakMap from './isWeakMap.js'; -import isWeakSet from './isWeakSet.js'; -import lt from './lt.js'; -import lte from './lte.js'; -import toArray from './toArray.js'; -import toFinite from './toFinite.js'; -import toInteger from './toInteger.js'; -import toLength from './toLength.js'; -import toNumber from './toNumber.js'; -import toPlainObject from './toPlainObject.js'; -import toSafeInteger from './toSafeInteger.js'; -import toString from './toString.js'; - -export default { - castArray, clone, cloneDeep, cloneDeepWith, cloneWith, - conformsTo, eq, gt, gte, isArguments, - isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, - isBuffer, isDate, isElement, isEmpty, isEqual, - isEqualWith, isError, isFinite, isFunction, isInteger, - isLength, isMap, isMatch, isMatchWith, isNaN, - isNative, isNil, isNull, isNumber, isObject, - isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, - isString, isSymbol, isTypedArray, isUndefined, isWeakMap, - isWeakSet, lt, lte, toArray, toFinite, - toInteger, toLength, toNumber, toPlainObject, toSafeInteger, - toString -}; diff --git a/node_modules/lodash-es/lang.js b/node_modules/lodash-es/lang.js deleted file mode 100644 index eb837d9..0000000 --- a/node_modules/lodash-es/lang.js +++ /dev/null @@ -1,57 +0,0 @@ -export { default as castArray } from './castArray.js'; -export { default as clone } from './clone.js'; -export { default as cloneDeep } from './cloneDeep.js'; -export { default as cloneDeepWith } from './cloneDeepWith.js'; -export { default as cloneWith } from './cloneWith.js'; -export { default as conformsTo } from './conformsTo.js'; -export { default as eq } from './eq.js'; -export { default as gt } from './gt.js'; -export { default as gte } from './gte.js'; -export { default as isArguments } from './isArguments.js'; -export { default as isArray } from './isArray.js'; -export { default as isArrayBuffer } from './isArrayBuffer.js'; -export { default as isArrayLike } from './isArrayLike.js'; -export { default as isArrayLikeObject } from './isArrayLikeObject.js'; -export { default as isBoolean } from './isBoolean.js'; -export { default as isBuffer } from './isBuffer.js'; -export { default as isDate } from './isDate.js'; -export { default as isElement } from './isElement.js'; -export { default as isEmpty } from './isEmpty.js'; -export { default as isEqual } from './isEqual.js'; -export { default as isEqualWith } from './isEqualWith.js'; -export { default as isError } from './isError.js'; -export { default as isFinite } from './isFinite.js'; -export { default as isFunction } from './isFunction.js'; -export { default as isInteger } from './isInteger.js'; -export { default as isLength } from './isLength.js'; -export { default as isMap } from './isMap.js'; -export { default as isMatch } from './isMatch.js'; -export { default as isMatchWith } from './isMatchWith.js'; -export { default as isNaN } from './isNaN.js'; -export { default as isNative } from './isNative.js'; -export { default as isNil } from './isNil.js'; -export { default as isNull } from './isNull.js'; -export { default as isNumber } from './isNumber.js'; -export { default as isObject } from './isObject.js'; -export { default as isObjectLike } from './isObjectLike.js'; -export { default as isPlainObject } from './isPlainObject.js'; -export { default as isRegExp } from './isRegExp.js'; -export { default as isSafeInteger } from './isSafeInteger.js'; -export { default as isSet } from './isSet.js'; -export { default as isString } from './isString.js'; -export { default as isSymbol } from './isSymbol.js'; -export { default as isTypedArray } from './isTypedArray.js'; -export { default as isUndefined } from './isUndefined.js'; -export { default as isWeakMap } from './isWeakMap.js'; -export { default as isWeakSet } from './isWeakSet.js'; -export { default as lt } from './lt.js'; -export { default as lte } from './lte.js'; -export { default as toArray } from './toArray.js'; -export { default as toFinite } from './toFinite.js'; -export { default as toInteger } from './toInteger.js'; -export { default as toLength } from './toLength.js'; -export { default as toNumber } from './toNumber.js'; -export { default as toPlainObject } from './toPlainObject.js'; -export { default as toSafeInteger } from './toSafeInteger.js'; -export { default as toString } from './toString.js'; -export { default } from './lang.default.js'; diff --git a/node_modules/lodash-es/last.js b/node_modules/lodash-es/last.js deleted file mode 100644 index b4135f7..0000000 --- a/node_modules/lodash-es/last.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -export default last; diff --git a/node_modules/lodash-es/lastIndexOf.js b/node_modules/lodash-es/lastIndexOf.js deleted file mode 100644 index bf6eac8..0000000 --- a/node_modules/lodash-es/lastIndexOf.js +++ /dev/null @@ -1,46 +0,0 @@ -import baseFindIndex from './_baseFindIndex.js'; -import baseIsNaN from './_baseIsNaN.js'; -import strictLastIndexOf from './_strictLastIndexOf.js'; -import toInteger from './toInteger.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * This method is like `_.indexOf` except that it iterates over elements of - * `array` from right to left. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.lastIndexOf([1, 2, 1, 2], 2); - * // => 3 - * - * // Search from the `fromIndex`. - * _.lastIndexOf([1, 2, 1, 2], 2, 2); - * // => 1 - */ -function lastIndexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); - } - return value === value - ? strictLastIndexOf(array, value, index) - : baseFindIndex(array, baseIsNaN, index, true); -} - -export default lastIndexOf; diff --git a/node_modules/lodash-es/lodash.default.js b/node_modules/lodash-es/lodash.default.js deleted file mode 100644 index e920da7..0000000 --- a/node_modules/lodash-es/lodash.default.js +++ /dev/null @@ -1,642 +0,0 @@ -/** - * @license - * Lodash (Custom Build) - * Build: `lodash modularize exports="es" -o ./` - * Copyright JS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -import array from './array.js'; -import collection from './collection.js'; -import date from './date.js'; -import func from './function.js'; -import lang from './lang.js'; -import math from './math.js'; -import number from './number.js'; -import object from './object.js'; -import seq from './seq.js'; -import string from './string.js'; -import util from './util.js'; -import LazyWrapper from './_LazyWrapper.js'; -import LodashWrapper from './_LodashWrapper.js'; -import Symbol from './_Symbol.js'; -import arrayEach from './_arrayEach.js'; -import arrayPush from './_arrayPush.js'; -import baseForOwn from './_baseForOwn.js'; -import baseFunctions from './_baseFunctions.js'; -import baseInvoke from './_baseInvoke.js'; -import baseIteratee from './_baseIteratee.js'; -import baseRest from './_baseRest.js'; -import createHybrid from './_createHybrid.js'; -import identity from './identity.js'; -import isArray from './isArray.js'; -import isObject from './isObject.js'; -import keys from './keys.js'; -import last from './last.js'; -import lazyClone from './_lazyClone.js'; -import lazyReverse from './_lazyReverse.js'; -import lazyValue from './_lazyValue.js'; -import _mixin from './mixin.js'; -import negate from './negate.js'; -import realNames from './_realNames.js'; -import thru from './thru.js'; -import toInteger from './toInteger.js'; -import lodash from './wrapperLodash.js'; - -/** Used as the semantic version number. */ -var VERSION = '4.17.4'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_KEY_FLAG = 2; - -/** Used to indicate the type of lazy iteratees. */ -var LAZY_FILTER_FLAG = 1, - LAZY_WHILE_FLAG = 3; - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295; - -/** Used for built-in method references. */ -var arrayProto = Array.prototype, - objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Built-in value references. */ -var symIterator = Symbol ? Symbol.iterator : undefined; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -// wrap `_.mixin` so it works when provided only one argument -var mixin = (function(func) { - return function(object, source, options) { - if (options == null) { - var isObj = isObject(source), - props = isObj && keys(source), - methodNames = props && props.length && baseFunctions(source, props); - - if (!(methodNames ? methodNames.length : isObj)) { - options = source; - source = object; - object = this; - } - } - return func(object, source, options); - }; -}(_mixin)); - -// Add methods that return wrapped values in chain sequences. -lodash.after = func.after; -lodash.ary = func.ary; -lodash.assign = object.assign; -lodash.assignIn = object.assignIn; -lodash.assignInWith = object.assignInWith; -lodash.assignWith = object.assignWith; -lodash.at = object.at; -lodash.before = func.before; -lodash.bind = func.bind; -lodash.bindAll = util.bindAll; -lodash.bindKey = func.bindKey; -lodash.castArray = lang.castArray; -lodash.chain = seq.chain; -lodash.chunk = array.chunk; -lodash.compact = array.compact; -lodash.concat = array.concat; -lodash.cond = util.cond; -lodash.conforms = util.conforms; -lodash.constant = util.constant; -lodash.countBy = collection.countBy; -lodash.create = object.create; -lodash.curry = func.curry; -lodash.curryRight = func.curryRight; -lodash.debounce = func.debounce; -lodash.defaults = object.defaults; -lodash.defaultsDeep = object.defaultsDeep; -lodash.defer = func.defer; -lodash.delay = func.delay; -lodash.difference = array.difference; -lodash.differenceBy = array.differenceBy; -lodash.differenceWith = array.differenceWith; -lodash.drop = array.drop; -lodash.dropRight = array.dropRight; -lodash.dropRightWhile = array.dropRightWhile; -lodash.dropWhile = array.dropWhile; -lodash.fill = array.fill; -lodash.filter = collection.filter; -lodash.flatMap = collection.flatMap; -lodash.flatMapDeep = collection.flatMapDeep; -lodash.flatMapDepth = collection.flatMapDepth; -lodash.flatten = array.flatten; -lodash.flattenDeep = array.flattenDeep; -lodash.flattenDepth = array.flattenDepth; -lodash.flip = func.flip; -lodash.flow = util.flow; -lodash.flowRight = util.flowRight; -lodash.fromPairs = array.fromPairs; -lodash.functions = object.functions; -lodash.functionsIn = object.functionsIn; -lodash.groupBy = collection.groupBy; -lodash.initial = array.initial; -lodash.intersection = array.intersection; -lodash.intersectionBy = array.intersectionBy; -lodash.intersectionWith = array.intersectionWith; -lodash.invert = object.invert; -lodash.invertBy = object.invertBy; -lodash.invokeMap = collection.invokeMap; -lodash.iteratee = util.iteratee; -lodash.keyBy = collection.keyBy; -lodash.keys = keys; -lodash.keysIn = object.keysIn; -lodash.map = collection.map; -lodash.mapKeys = object.mapKeys; -lodash.mapValues = object.mapValues; -lodash.matches = util.matches; -lodash.matchesProperty = util.matchesProperty; -lodash.memoize = func.memoize; -lodash.merge = object.merge; -lodash.mergeWith = object.mergeWith; -lodash.method = util.method; -lodash.methodOf = util.methodOf; -lodash.mixin = mixin; -lodash.negate = negate; -lodash.nthArg = util.nthArg; -lodash.omit = object.omit; -lodash.omitBy = object.omitBy; -lodash.once = func.once; -lodash.orderBy = collection.orderBy; -lodash.over = util.over; -lodash.overArgs = func.overArgs; -lodash.overEvery = util.overEvery; -lodash.overSome = util.overSome; -lodash.partial = func.partial; -lodash.partialRight = func.partialRight; -lodash.partition = collection.partition; -lodash.pick = object.pick; -lodash.pickBy = object.pickBy; -lodash.property = util.property; -lodash.propertyOf = util.propertyOf; -lodash.pull = array.pull; -lodash.pullAll = array.pullAll; -lodash.pullAllBy = array.pullAllBy; -lodash.pullAllWith = array.pullAllWith; -lodash.pullAt = array.pullAt; -lodash.range = util.range; -lodash.rangeRight = util.rangeRight; -lodash.rearg = func.rearg; -lodash.reject = collection.reject; -lodash.remove = array.remove; -lodash.rest = func.rest; -lodash.reverse = array.reverse; -lodash.sampleSize = collection.sampleSize; -lodash.set = object.set; -lodash.setWith = object.setWith; -lodash.shuffle = collection.shuffle; -lodash.slice = array.slice; -lodash.sortBy = collection.sortBy; -lodash.sortedUniq = array.sortedUniq; -lodash.sortedUniqBy = array.sortedUniqBy; -lodash.split = string.split; -lodash.spread = func.spread; -lodash.tail = array.tail; -lodash.take = array.take; -lodash.takeRight = array.takeRight; -lodash.takeRightWhile = array.takeRightWhile; -lodash.takeWhile = array.takeWhile; -lodash.tap = seq.tap; -lodash.throttle = func.throttle; -lodash.thru = thru; -lodash.toArray = lang.toArray; -lodash.toPairs = object.toPairs; -lodash.toPairsIn = object.toPairsIn; -lodash.toPath = util.toPath; -lodash.toPlainObject = lang.toPlainObject; -lodash.transform = object.transform; -lodash.unary = func.unary; -lodash.union = array.union; -lodash.unionBy = array.unionBy; -lodash.unionWith = array.unionWith; -lodash.uniq = array.uniq; -lodash.uniqBy = array.uniqBy; -lodash.uniqWith = array.uniqWith; -lodash.unset = object.unset; -lodash.unzip = array.unzip; -lodash.unzipWith = array.unzipWith; -lodash.update = object.update; -lodash.updateWith = object.updateWith; -lodash.values = object.values; -lodash.valuesIn = object.valuesIn; -lodash.without = array.without; -lodash.words = string.words; -lodash.wrap = func.wrap; -lodash.xor = array.xor; -lodash.xorBy = array.xorBy; -lodash.xorWith = array.xorWith; -lodash.zip = array.zip; -lodash.zipObject = array.zipObject; -lodash.zipObjectDeep = array.zipObjectDeep; -lodash.zipWith = array.zipWith; - -// Add aliases. -lodash.entries = object.toPairs; -lodash.entriesIn = object.toPairsIn; -lodash.extend = object.assignIn; -lodash.extendWith = object.assignInWith; - -// Add methods to `lodash.prototype`. -mixin(lodash, lodash); - -// Add methods that return unwrapped values in chain sequences. -lodash.add = math.add; -lodash.attempt = util.attempt; -lodash.camelCase = string.camelCase; -lodash.capitalize = string.capitalize; -lodash.ceil = math.ceil; -lodash.clamp = number.clamp; -lodash.clone = lang.clone; -lodash.cloneDeep = lang.cloneDeep; -lodash.cloneDeepWith = lang.cloneDeepWith; -lodash.cloneWith = lang.cloneWith; -lodash.conformsTo = lang.conformsTo; -lodash.deburr = string.deburr; -lodash.defaultTo = util.defaultTo; -lodash.divide = math.divide; -lodash.endsWith = string.endsWith; -lodash.eq = lang.eq; -lodash.escape = string.escape; -lodash.escapeRegExp = string.escapeRegExp; -lodash.every = collection.every; -lodash.find = collection.find; -lodash.findIndex = array.findIndex; -lodash.findKey = object.findKey; -lodash.findLast = collection.findLast; -lodash.findLastIndex = array.findLastIndex; -lodash.findLastKey = object.findLastKey; -lodash.floor = math.floor; -lodash.forEach = collection.forEach; -lodash.forEachRight = collection.forEachRight; -lodash.forIn = object.forIn; -lodash.forInRight = object.forInRight; -lodash.forOwn = object.forOwn; -lodash.forOwnRight = object.forOwnRight; -lodash.get = object.get; -lodash.gt = lang.gt; -lodash.gte = lang.gte; -lodash.has = object.has; -lodash.hasIn = object.hasIn; -lodash.head = array.head; -lodash.identity = identity; -lodash.includes = collection.includes; -lodash.indexOf = array.indexOf; -lodash.inRange = number.inRange; -lodash.invoke = object.invoke; -lodash.isArguments = lang.isArguments; -lodash.isArray = isArray; -lodash.isArrayBuffer = lang.isArrayBuffer; -lodash.isArrayLike = lang.isArrayLike; -lodash.isArrayLikeObject = lang.isArrayLikeObject; -lodash.isBoolean = lang.isBoolean; -lodash.isBuffer = lang.isBuffer; -lodash.isDate = lang.isDate; -lodash.isElement = lang.isElement; -lodash.isEmpty = lang.isEmpty; -lodash.isEqual = lang.isEqual; -lodash.isEqualWith = lang.isEqualWith; -lodash.isError = lang.isError; -lodash.isFinite = lang.isFinite; -lodash.isFunction = lang.isFunction; -lodash.isInteger = lang.isInteger; -lodash.isLength = lang.isLength; -lodash.isMap = lang.isMap; -lodash.isMatch = lang.isMatch; -lodash.isMatchWith = lang.isMatchWith; -lodash.isNaN = lang.isNaN; -lodash.isNative = lang.isNative; -lodash.isNil = lang.isNil; -lodash.isNull = lang.isNull; -lodash.isNumber = lang.isNumber; -lodash.isObject = isObject; -lodash.isObjectLike = lang.isObjectLike; -lodash.isPlainObject = lang.isPlainObject; -lodash.isRegExp = lang.isRegExp; -lodash.isSafeInteger = lang.isSafeInteger; -lodash.isSet = lang.isSet; -lodash.isString = lang.isString; -lodash.isSymbol = lang.isSymbol; -lodash.isTypedArray = lang.isTypedArray; -lodash.isUndefined = lang.isUndefined; -lodash.isWeakMap = lang.isWeakMap; -lodash.isWeakSet = lang.isWeakSet; -lodash.join = array.join; -lodash.kebabCase = string.kebabCase; -lodash.last = last; -lodash.lastIndexOf = array.lastIndexOf; -lodash.lowerCase = string.lowerCase; -lodash.lowerFirst = string.lowerFirst; -lodash.lt = lang.lt; -lodash.lte = lang.lte; -lodash.max = math.max; -lodash.maxBy = math.maxBy; -lodash.mean = math.mean; -lodash.meanBy = math.meanBy; -lodash.min = math.min; -lodash.minBy = math.minBy; -lodash.stubArray = util.stubArray; -lodash.stubFalse = util.stubFalse; -lodash.stubObject = util.stubObject; -lodash.stubString = util.stubString; -lodash.stubTrue = util.stubTrue; -lodash.multiply = math.multiply; -lodash.nth = array.nth; -lodash.noop = util.noop; -lodash.now = date.now; -lodash.pad = string.pad; -lodash.padEnd = string.padEnd; -lodash.padStart = string.padStart; -lodash.parseInt = string.parseInt; -lodash.random = number.random; -lodash.reduce = collection.reduce; -lodash.reduceRight = collection.reduceRight; -lodash.repeat = string.repeat; -lodash.replace = string.replace; -lodash.result = object.result; -lodash.round = math.round; -lodash.sample = collection.sample; -lodash.size = collection.size; -lodash.snakeCase = string.snakeCase; -lodash.some = collection.some; -lodash.sortedIndex = array.sortedIndex; -lodash.sortedIndexBy = array.sortedIndexBy; -lodash.sortedIndexOf = array.sortedIndexOf; -lodash.sortedLastIndex = array.sortedLastIndex; -lodash.sortedLastIndexBy = array.sortedLastIndexBy; -lodash.sortedLastIndexOf = array.sortedLastIndexOf; -lodash.startCase = string.startCase; -lodash.startsWith = string.startsWith; -lodash.subtract = math.subtract; -lodash.sum = math.sum; -lodash.sumBy = math.sumBy; -lodash.template = string.template; -lodash.times = util.times; -lodash.toFinite = lang.toFinite; -lodash.toInteger = toInteger; -lodash.toLength = lang.toLength; -lodash.toLower = string.toLower; -lodash.toNumber = lang.toNumber; -lodash.toSafeInteger = lang.toSafeInteger; -lodash.toString = lang.toString; -lodash.toUpper = string.toUpper; -lodash.trim = string.trim; -lodash.trimEnd = string.trimEnd; -lodash.trimStart = string.trimStart; -lodash.truncate = string.truncate; -lodash.unescape = string.unescape; -lodash.uniqueId = util.uniqueId; -lodash.upperCase = string.upperCase; -lodash.upperFirst = string.upperFirst; - -// Add aliases. -lodash.each = collection.forEach; -lodash.eachRight = collection.forEachRight; -lodash.first = array.head; - -mixin(lodash, (function() { - var source = {}; - baseForOwn(lodash, function(func, methodName) { - if (!hasOwnProperty.call(lodash.prototype, methodName)) { - source[methodName] = func; - } - }); - return source; -}()), { 'chain': false }); - -/** - * The semantic version number. - * - * @static - * @memberOf _ - * @type {string} - */ -lodash.VERSION = VERSION; -(lodash.templateSettings = string.templateSettings).imports._ = lodash; - -// Assign default placeholders. -arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) { - lodash[methodName].placeholder = lodash; -}); - -// Add `LazyWrapper` methods for `_.drop` and `_.take` variants. -arrayEach(['drop', 'take'], function(methodName, index) { - LazyWrapper.prototype[methodName] = function(n) { - n = n === undefined ? 1 : nativeMax(toInteger(n), 0); - - var result = (this.__filtered__ && !index) - ? new LazyWrapper(this) - : this.clone(); - - if (result.__filtered__) { - result.__takeCount__ = nativeMin(n, result.__takeCount__); - } else { - result.__views__.push({ - 'size': nativeMin(n, MAX_ARRAY_LENGTH), - 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') - }); - } - return result; - }; - - LazyWrapper.prototype[methodName + 'Right'] = function(n) { - return this.reverse()[methodName](n).reverse(); - }; -}); - -// Add `LazyWrapper` methods that accept an `iteratee` value. -arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) { - var type = index + 1, - isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; - - LazyWrapper.prototype[methodName] = function(iteratee) { - var result = this.clone(); - result.__iteratees__.push({ - 'iteratee': baseIteratee(iteratee, 3), - 'type': type - }); - result.__filtered__ = result.__filtered__ || isFilter; - return result; - }; -}); - -// Add `LazyWrapper` methods for `_.head` and `_.last`. -arrayEach(['head', 'last'], function(methodName, index) { - var takeName = 'take' + (index ? 'Right' : ''); - - LazyWrapper.prototype[methodName] = function() { - return this[takeName](1).value()[0]; - }; -}); - -// Add `LazyWrapper` methods for `_.initial` and `_.tail`. -arrayEach(['initial', 'tail'], function(methodName, index) { - var dropName = 'drop' + (index ? '' : 'Right'); - - LazyWrapper.prototype[methodName] = function() { - return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); - }; -}); - -LazyWrapper.prototype.compact = function() { - return this.filter(identity); -}; - -LazyWrapper.prototype.find = function(predicate) { - return this.filter(predicate).head(); -}; - -LazyWrapper.prototype.findLast = function(predicate) { - return this.reverse().find(predicate); -}; - -LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { - if (typeof path == 'function') { - return new LazyWrapper(this); - } - return this.map(function(value) { - return baseInvoke(value, path, args); - }); -}); - -LazyWrapper.prototype.reject = function(predicate) { - return this.filter(negate(baseIteratee(predicate))); -}; - -LazyWrapper.prototype.slice = function(start, end) { - start = toInteger(start); - - var result = this; - if (result.__filtered__ && (start > 0 || end < 0)) { - return new LazyWrapper(result); - } - if (start < 0) { - result = result.takeRight(-start); - } else if (start) { - result = result.drop(start); - } - if (end !== undefined) { - end = toInteger(end); - result = end < 0 ? result.dropRight(-end) : result.take(end - start); - } - return result; -}; - -LazyWrapper.prototype.takeRightWhile = function(predicate) { - return this.reverse().takeWhile(predicate).reverse(); -}; - -LazyWrapper.prototype.toArray = function() { - return this.take(MAX_ARRAY_LENGTH); -}; - -// Add `LazyWrapper` methods to `lodash.prototype`. -baseForOwn(LazyWrapper.prototype, function(func, methodName) { - var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), - isTaker = /^(?:head|last)$/.test(methodName), - lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName], - retUnwrapped = isTaker || /^find/.test(methodName); - - if (!lodashFunc) { - return; - } - lodash.prototype[methodName] = function() { - var value = this.__wrapped__, - args = isTaker ? [1] : arguments, - isLazy = value instanceof LazyWrapper, - iteratee = args[0], - useLazy = isLazy || isArray(value); - - var interceptor = function(value) { - var result = lodashFunc.apply(lodash, arrayPush([value], args)); - return (isTaker && chainAll) ? result[0] : result; - }; - - if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { - // Avoid lazy use if the iteratee has a "length" value other than `1`. - isLazy = useLazy = false; - } - var chainAll = this.__chain__, - isHybrid = !!this.__actions__.length, - isUnwrapped = retUnwrapped && !chainAll, - onlyLazy = isLazy && !isHybrid; - - if (!retUnwrapped && useLazy) { - value = onlyLazy ? value : new LazyWrapper(this); - var result = func.apply(value, args); - result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); - return new LodashWrapper(result, chainAll); - } - if (isUnwrapped && onlyLazy) { - return func.apply(this, args); - } - result = this.thru(interceptor); - return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; - }; -}); - -// Add `Array` methods to `lodash.prototype`. -arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { - var func = arrayProto[methodName], - chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', - retUnwrapped = /^(?:pop|shift)$/.test(methodName); - - lodash.prototype[methodName] = function() { - var args = arguments; - if (retUnwrapped && !this.__chain__) { - var value = this.value(); - return func.apply(isArray(value) ? value : [], args); - } - return this[chainName](function(value) { - return func.apply(isArray(value) ? value : [], args); - }); - }; -}); - -// Map minified method names to their real names. -baseForOwn(LazyWrapper.prototype, function(func, methodName) { - var lodashFunc = lodash[methodName]; - if (lodashFunc) { - var key = (lodashFunc.name + ''), - names = realNames[key] || (realNames[key] = []); - - names.push({ 'name': methodName, 'func': lodashFunc }); - } -}); - -realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{ - 'name': 'wrapper', - 'func': undefined -}]; - -// Add methods to `LazyWrapper`. -LazyWrapper.prototype.clone = lazyClone; -LazyWrapper.prototype.reverse = lazyReverse; -LazyWrapper.prototype.value = lazyValue; - -// Add chain sequence methods to the `lodash` wrapper. -lodash.prototype.at = seq.at; -lodash.prototype.chain = seq.wrapperChain; -lodash.prototype.commit = seq.commit; -lodash.prototype.next = seq.next; -lodash.prototype.plant = seq.plant; -lodash.prototype.reverse = seq.reverse; -lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = seq.value; - -// Add lazy aliases. -lodash.prototype.first = lodash.prototype.head; - -if (symIterator) { - lodash.prototype[symIterator] = seq.toIterator; -} - -export default lodash; diff --git a/node_modules/lodash-es/lodash.js b/node_modules/lodash-es/lodash.js deleted file mode 100644 index 706eb5e..0000000 --- a/node_modules/lodash-es/lodash.js +++ /dev/null @@ -1,331 +0,0 @@ -/** - * @license - * Lodash (Custom Build) - * Build: `lodash modularize exports="es" -o ./` - * Copyright JS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -export { default as add } from './add.js'; -export { default as after } from './after.js'; -export { default as ary } from './ary.js'; -export { default as assign } from './assign.js'; -export { default as assignIn } from './assignIn.js'; -export { default as assignInWith } from './assignInWith.js'; -export { default as assignWith } from './assignWith.js'; -export { default as at } from './at.js'; -export { default as attempt } from './attempt.js'; -export { default as before } from './before.js'; -export { default as bind } from './bind.js'; -export { default as bindAll } from './bindAll.js'; -export { default as bindKey } from './bindKey.js'; -export { default as camelCase } from './camelCase.js'; -export { default as capitalize } from './capitalize.js'; -export { default as castArray } from './castArray.js'; -export { default as ceil } from './ceil.js'; -export { default as chain } from './chain.js'; -export { default as chunk } from './chunk.js'; -export { default as clamp } from './clamp.js'; -export { default as clone } from './clone.js'; -export { default as cloneDeep } from './cloneDeep.js'; -export { default as cloneDeepWith } from './cloneDeepWith.js'; -export { default as cloneWith } from './cloneWith.js'; -export { default as commit } from './commit.js'; -export { default as compact } from './compact.js'; -export { default as concat } from './concat.js'; -export { default as cond } from './cond.js'; -export { default as conforms } from './conforms.js'; -export { default as conformsTo } from './conformsTo.js'; -export { default as constant } from './constant.js'; -export { default as countBy } from './countBy.js'; -export { default as create } from './create.js'; -export { default as curry } from './curry.js'; -export { default as curryRight } from './curryRight.js'; -export { default as debounce } from './debounce.js'; -export { default as deburr } from './deburr.js'; -export { default as defaultTo } from './defaultTo.js'; -export { default as defaults } from './defaults.js'; -export { default as defaultsDeep } from './defaultsDeep.js'; -export { default as defer } from './defer.js'; -export { default as delay } from './delay.js'; -export { default as difference } from './difference.js'; -export { default as differenceBy } from './differenceBy.js'; -export { default as differenceWith } from './differenceWith.js'; -export { default as divide } from './divide.js'; -export { default as drop } from './drop.js'; -export { default as dropRight } from './dropRight.js'; -export { default as dropRightWhile } from './dropRightWhile.js'; -export { default as dropWhile } from './dropWhile.js'; -export { default as each } from './each.js'; -export { default as eachRight } from './eachRight.js'; -export { default as endsWith } from './endsWith.js'; -export { default as entries } from './entries.js'; -export { default as entriesIn } from './entriesIn.js'; -export { default as eq } from './eq.js'; -export { default as escape } from './escape.js'; -export { default as escapeRegExp } from './escapeRegExp.js'; -export { default as every } from './every.js'; -export { default as extend } from './extend.js'; -export { default as extendWith } from './extendWith.js'; -export { default as fill } from './fill.js'; -export { default as filter } from './filter.js'; -export { default as find } from './find.js'; -export { default as findIndex } from './findIndex.js'; -export { default as findKey } from './findKey.js'; -export { default as findLast } from './findLast.js'; -export { default as findLastIndex } from './findLastIndex.js'; -export { default as findLastKey } from './findLastKey.js'; -export { default as first } from './first.js'; -export { default as flatMap } from './flatMap.js'; -export { default as flatMapDeep } from './flatMapDeep.js'; -export { default as flatMapDepth } from './flatMapDepth.js'; -export { default as flatten } from './flatten.js'; -export { default as flattenDeep } from './flattenDeep.js'; -export { default as flattenDepth } from './flattenDepth.js'; -export { default as flip } from './flip.js'; -export { default as floor } from './floor.js'; -export { default as flow } from './flow.js'; -export { default as flowRight } from './flowRight.js'; -export { default as forEach } from './forEach.js'; -export { default as forEachRight } from './forEachRight.js'; -export { default as forIn } from './forIn.js'; -export { default as forInRight } from './forInRight.js'; -export { default as forOwn } from './forOwn.js'; -export { default as forOwnRight } from './forOwnRight.js'; -export { default as fromPairs } from './fromPairs.js'; -export { default as functions } from './functions.js'; -export { default as functionsIn } from './functionsIn.js'; -export { default as get } from './get.js'; -export { default as groupBy } from './groupBy.js'; -export { default as gt } from './gt.js'; -export { default as gte } from './gte.js'; -export { default as has } from './has.js'; -export { default as hasIn } from './hasIn.js'; -export { default as head } from './head.js'; -export { default as identity } from './identity.js'; -export { default as inRange } from './inRange.js'; -export { default as includes } from './includes.js'; -export { default as indexOf } from './indexOf.js'; -export { default as initial } from './initial.js'; -export { default as intersection } from './intersection.js'; -export { default as intersectionBy } from './intersectionBy.js'; -export { default as intersectionWith } from './intersectionWith.js'; -export { default as invert } from './invert.js'; -export { default as invertBy } from './invertBy.js'; -export { default as invoke } from './invoke.js'; -export { default as invokeMap } from './invokeMap.js'; -export { default as isArguments } from './isArguments.js'; -export { default as isArray } from './isArray.js'; -export { default as isArrayBuffer } from './isArrayBuffer.js'; -export { default as isArrayLike } from './isArrayLike.js'; -export { default as isArrayLikeObject } from './isArrayLikeObject.js'; -export { default as isBoolean } from './isBoolean.js'; -export { default as isBuffer } from './isBuffer.js'; -export { default as isDate } from './isDate.js'; -export { default as isElement } from './isElement.js'; -export { default as isEmpty } from './isEmpty.js'; -export { default as isEqual } from './isEqual.js'; -export { default as isEqualWith } from './isEqualWith.js'; -export { default as isError } from './isError.js'; -export { default as isFinite } from './isFinite.js'; -export { default as isFunction } from './isFunction.js'; -export { default as isInteger } from './isInteger.js'; -export { default as isLength } from './isLength.js'; -export { default as isMap } from './isMap.js'; -export { default as isMatch } from './isMatch.js'; -export { default as isMatchWith } from './isMatchWith.js'; -export { default as isNaN } from './isNaN.js'; -export { default as isNative } from './isNative.js'; -export { default as isNil } from './isNil.js'; -export { default as isNull } from './isNull.js'; -export { default as isNumber } from './isNumber.js'; -export { default as isObject } from './isObject.js'; -export { default as isObjectLike } from './isObjectLike.js'; -export { default as isPlainObject } from './isPlainObject.js'; -export { default as isRegExp } from './isRegExp.js'; -export { default as isSafeInteger } from './isSafeInteger.js'; -export { default as isSet } from './isSet.js'; -export { default as isString } from './isString.js'; -export { default as isSymbol } from './isSymbol.js'; -export { default as isTypedArray } from './isTypedArray.js'; -export { default as isUndefined } from './isUndefined.js'; -export { default as isWeakMap } from './isWeakMap.js'; -export { default as isWeakSet } from './isWeakSet.js'; -export { default as iteratee } from './iteratee.js'; -export { default as join } from './join.js'; -export { default as kebabCase } from './kebabCase.js'; -export { default as keyBy } from './keyBy.js'; -export { default as keys } from './keys.js'; -export { default as keysIn } from './keysIn.js'; -export { default as last } from './last.js'; -export { default as lastIndexOf } from './lastIndexOf.js'; -export { default as lodash } from './wrapperLodash.js'; -export { default as lowerCase } from './lowerCase.js'; -export { default as lowerFirst } from './lowerFirst.js'; -export { default as lt } from './lt.js'; -export { default as lte } from './lte.js'; -export { default as map } from './map.js'; -export { default as mapKeys } from './mapKeys.js'; -export { default as mapValues } from './mapValues.js'; -export { default as matches } from './matches.js'; -export { default as matchesProperty } from './matchesProperty.js'; -export { default as max } from './max.js'; -export { default as maxBy } from './maxBy.js'; -export { default as mean } from './mean.js'; -export { default as meanBy } from './meanBy.js'; -export { default as memoize } from './memoize.js'; -export { default as merge } from './merge.js'; -export { default as mergeWith } from './mergeWith.js'; -export { default as method } from './method.js'; -export { default as methodOf } from './methodOf.js'; -export { default as min } from './min.js'; -export { default as minBy } from './minBy.js'; -export { default as mixin } from './mixin.js'; -export { default as multiply } from './multiply.js'; -export { default as negate } from './negate.js'; -export { default as next } from './next.js'; -export { default as noop } from './noop.js'; -export { default as now } from './now.js'; -export { default as nth } from './nth.js'; -export { default as nthArg } from './nthArg.js'; -export { default as omit } from './omit.js'; -export { default as omitBy } from './omitBy.js'; -export { default as once } from './once.js'; -export { default as orderBy } from './orderBy.js'; -export { default as over } from './over.js'; -export { default as overArgs } from './overArgs.js'; -export { default as overEvery } from './overEvery.js'; -export { default as overSome } from './overSome.js'; -export { default as pad } from './pad.js'; -export { default as padEnd } from './padEnd.js'; -export { default as padStart } from './padStart.js'; -export { default as parseInt } from './parseInt.js'; -export { default as partial } from './partial.js'; -export { default as partialRight } from './partialRight.js'; -export { default as partition } from './partition.js'; -export { default as pick } from './pick.js'; -export { default as pickBy } from './pickBy.js'; -export { default as plant } from './plant.js'; -export { default as property } from './property.js'; -export { default as propertyOf } from './propertyOf.js'; -export { default as pull } from './pull.js'; -export { default as pullAll } from './pullAll.js'; -export { default as pullAllBy } from './pullAllBy.js'; -export { default as pullAllWith } from './pullAllWith.js'; -export { default as pullAt } from './pullAt.js'; -export { default as random } from './random.js'; -export { default as range } from './range.js'; -export { default as rangeRight } from './rangeRight.js'; -export { default as rearg } from './rearg.js'; -export { default as reduce } from './reduce.js'; -export { default as reduceRight } from './reduceRight.js'; -export { default as reject } from './reject.js'; -export { default as remove } from './remove.js'; -export { default as repeat } from './repeat.js'; -export { default as replace } from './replace.js'; -export { default as rest } from './rest.js'; -export { default as result } from './result.js'; -export { default as reverse } from './reverse.js'; -export { default as round } from './round.js'; -export { default as sample } from './sample.js'; -export { default as sampleSize } from './sampleSize.js'; -export { default as set } from './set.js'; -export { default as setWith } from './setWith.js'; -export { default as shuffle } from './shuffle.js'; -export { default as size } from './size.js'; -export { default as slice } from './slice.js'; -export { default as snakeCase } from './snakeCase.js'; -export { default as some } from './some.js'; -export { default as sortBy } from './sortBy.js'; -export { default as sortedIndex } from './sortedIndex.js'; -export { default as sortedIndexBy } from './sortedIndexBy.js'; -export { default as sortedIndexOf } from './sortedIndexOf.js'; -export { default as sortedLastIndex } from './sortedLastIndex.js'; -export { default as sortedLastIndexBy } from './sortedLastIndexBy.js'; -export { default as sortedLastIndexOf } from './sortedLastIndexOf.js'; -export { default as sortedUniq } from './sortedUniq.js'; -export { default as sortedUniqBy } from './sortedUniqBy.js'; -export { default as split } from './split.js'; -export { default as spread } from './spread.js'; -export { default as startCase } from './startCase.js'; -export { default as startsWith } from './startsWith.js'; -export { default as stubArray } from './stubArray.js'; -export { default as stubFalse } from './stubFalse.js'; -export { default as stubObject } from './stubObject.js'; -export { default as stubString } from './stubString.js'; -export { default as stubTrue } from './stubTrue.js'; -export { default as subtract } from './subtract.js'; -export { default as sum } from './sum.js'; -export { default as sumBy } from './sumBy.js'; -export { default as tail } from './tail.js'; -export { default as take } from './take.js'; -export { default as takeRight } from './takeRight.js'; -export { default as takeRightWhile } from './takeRightWhile.js'; -export { default as takeWhile } from './takeWhile.js'; -export { default as tap } from './tap.js'; -export { default as template } from './template.js'; -export { default as templateSettings } from './templateSettings.js'; -export { default as throttle } from './throttle.js'; -export { default as thru } from './thru.js'; -export { default as times } from './times.js'; -export { default as toArray } from './toArray.js'; -export { default as toFinite } from './toFinite.js'; -export { default as toInteger } from './toInteger.js'; -export { default as toIterator } from './toIterator.js'; -export { default as toJSON } from './toJSON.js'; -export { default as toLength } from './toLength.js'; -export { default as toLower } from './toLower.js'; -export { default as toNumber } from './toNumber.js'; -export { default as toPairs } from './toPairs.js'; -export { default as toPairsIn } from './toPairsIn.js'; -export { default as toPath } from './toPath.js'; -export { default as toPlainObject } from './toPlainObject.js'; -export { default as toSafeInteger } from './toSafeInteger.js'; -export { default as toString } from './toString.js'; -export { default as toUpper } from './toUpper.js'; -export { default as transform } from './transform.js'; -export { default as trim } from './trim.js'; -export { default as trimEnd } from './trimEnd.js'; -export { default as trimStart } from './trimStart.js'; -export { default as truncate } from './truncate.js'; -export { default as unary } from './unary.js'; -export { default as unescape } from './unescape.js'; -export { default as union } from './union.js'; -export { default as unionBy } from './unionBy.js'; -export { default as unionWith } from './unionWith.js'; -export { default as uniq } from './uniq.js'; -export { default as uniqBy } from './uniqBy.js'; -export { default as uniqWith } from './uniqWith.js'; -export { default as uniqueId } from './uniqueId.js'; -export { default as unset } from './unset.js'; -export { default as unzip } from './unzip.js'; -export { default as unzipWith } from './unzipWith.js'; -export { default as update } from './update.js'; -export { default as updateWith } from './updateWith.js'; -export { default as upperCase } from './upperCase.js'; -export { default as upperFirst } from './upperFirst.js'; -export { default as value } from './value.js'; -export { default as valueOf } from './valueOf.js'; -export { default as values } from './values.js'; -export { default as valuesIn } from './valuesIn.js'; -export { default as without } from './without.js'; -export { default as words } from './words.js'; -export { default as wrap } from './wrap.js'; -export { default as wrapperAt } from './wrapperAt.js'; -export { default as wrapperChain } from './wrapperChain.js'; -export { default as wrapperCommit } from './commit.js'; -export { default as wrapperLodash } from './wrapperLodash.js'; -export { default as wrapperNext } from './next.js'; -export { default as wrapperPlant } from './plant.js'; -export { default as wrapperReverse } from './wrapperReverse.js'; -export { default as wrapperToIterator } from './toIterator.js'; -export { default as wrapperValue } from './wrapperValue.js'; -export { default as xor } from './xor.js'; -export { default as xorBy } from './xorBy.js'; -export { default as xorWith } from './xorWith.js'; -export { default as zip } from './zip.js'; -export { default as zipObject } from './zipObject.js'; -export { default as zipObjectDeep } from './zipObjectDeep.js'; -export { default as zipWith } from './zipWith.js'; -export { default } from './lodash.default.js'; diff --git a/node_modules/lodash-es/lowerCase.js b/node_modules/lodash-es/lowerCase.js deleted file mode 100644 index 570d3b6..0000000 --- a/node_modules/lodash-es/lowerCase.js +++ /dev/null @@ -1,27 +0,0 @@ -import createCompounder from './_createCompounder.js'; - -/** - * Converts `string`, as space separated words, to lower case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the lower cased string. - * @example - * - * _.lowerCase('--Foo-Bar--'); - * // => 'foo bar' - * - * _.lowerCase('fooBar'); - * // => 'foo bar' - * - * _.lowerCase('__FOO_BAR__'); - * // => 'foo bar' - */ -var lowerCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + word.toLowerCase(); -}); - -export default lowerCase; diff --git a/node_modules/lodash-es/lowerFirst.js b/node_modules/lodash-es/lowerFirst.js deleted file mode 100644 index d7cb4b0..0000000 --- a/node_modules/lodash-es/lowerFirst.js +++ /dev/null @@ -1,22 +0,0 @@ -import createCaseFirst from './_createCaseFirst.js'; - -/** - * Converts the first character of `string` to lower case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.lowerFirst('Fred'); - * // => 'fred' - * - * _.lowerFirst('FRED'); - * // => 'fRED' - */ -var lowerFirst = createCaseFirst('toLowerCase'); - -export default lowerFirst; diff --git a/node_modules/lodash-es/lt.js b/node_modules/lodash-es/lt.js deleted file mode 100644 index 8418113..0000000 --- a/node_modules/lodash-es/lt.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseLt from './_baseLt.js'; -import createRelationalOperation from './_createRelationalOperation.js'; - -/** - * Checks if `value` is less than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - * @see _.gt - * @example - * - * _.lt(1, 3); - * // => true - * - * _.lt(3, 3); - * // => false - * - * _.lt(3, 1); - * // => false - */ -var lt = createRelationalOperation(baseLt); - -export default lt; diff --git a/node_modules/lodash-es/lte.js b/node_modules/lodash-es/lte.js deleted file mode 100644 index 50c90a9..0000000 --- a/node_modules/lodash-es/lte.js +++ /dev/null @@ -1,30 +0,0 @@ -import createRelationalOperation from './_createRelationalOperation.js'; - -/** - * Checks if `value` is less than or equal to `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than or equal to - * `other`, else `false`. - * @see _.gte - * @example - * - * _.lte(1, 3); - * // => true - * - * _.lte(3, 3); - * // => true - * - * _.lte(3, 1); - * // => false - */ -var lte = createRelationalOperation(function(value, other) { - return value <= other; -}); - -export default lte; diff --git a/node_modules/lodash-es/map.js b/node_modules/lodash-es/map.js deleted file mode 100644 index 36139f9..0000000 --- a/node_modules/lodash-es/map.js +++ /dev/null @@ -1,53 +0,0 @@ -import arrayMap from './_arrayMap.js'; -import baseIteratee from './_baseIteratee.js'; -import baseMap from './_baseMap.js'; -import isArray from './isArray.js'; - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, baseIteratee(iteratee, 3)); -} - -export default map; diff --git a/node_modules/lodash-es/mapKeys.js b/node_modules/lodash-es/mapKeys.js deleted file mode 100644 index 24fc689..0000000 --- a/node_modules/lodash-es/mapKeys.js +++ /dev/null @@ -1,36 +0,0 @@ -import baseAssignValue from './_baseAssignValue.js'; -import baseForOwn from './_baseForOwn.js'; -import baseIteratee from './_baseIteratee.js'; - -/** - * The opposite of `_.mapValues`; this method creates an object with the - * same values as `object` and keys generated by running each own enumerable - * string keyed property of `object` thru `iteratee`. The iteratee is invoked - * with three arguments: (value, key, object). - * - * @static - * @memberOf _ - * @since 3.8.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapValues - * @example - * - * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { - * return key + value; - * }); - * // => { 'a1': 1, 'b2': 2 } - */ -function mapKeys(object, iteratee) { - var result = {}; - iteratee = baseIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, iteratee(value, key, object), value); - }); - return result; -} - -export default mapKeys; diff --git a/node_modules/lodash-es/mapValues.js b/node_modules/lodash-es/mapValues.js deleted file mode 100644 index bcc48e0..0000000 --- a/node_modules/lodash-es/mapValues.js +++ /dev/null @@ -1,43 +0,0 @@ -import baseAssignValue from './_baseAssignValue.js'; -import baseForOwn from './_baseForOwn.js'; -import baseIteratee from './_baseIteratee.js'; - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = baseIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, key, iteratee(value, key, object)); - }); - return result; -} - -export default mapValues; diff --git a/node_modules/lodash-es/matches.js b/node_modules/lodash-es/matches.js deleted file mode 100644 index 62aed6c..0000000 --- a/node_modules/lodash-es/matches.js +++ /dev/null @@ -1,39 +0,0 @@ -import baseClone from './_baseClone.js'; -import baseMatches from './_baseMatches.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1; - -/** - * Creates a function that performs a partial deep comparison between a given - * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. - * - * **Note:** The created function is equivalent to `_.isMatch` with `source` - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 1, 'b': 2, 'c': 3 }, - * { 'a': 4, 'b': 5, 'c': 6 } - * ]; - * - * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); - * // => [{ 'a': 4, 'b': 5, 'c': 6 }] - */ -function matches(source) { - return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); -} - -export default matches; diff --git a/node_modules/lodash-es/matchesProperty.js b/node_modules/lodash-es/matchesProperty.js deleted file mode 100644 index a98fea9..0000000 --- a/node_modules/lodash-es/matchesProperty.js +++ /dev/null @@ -1,37 +0,0 @@ -import baseClone from './_baseClone.js'; -import baseMatchesProperty from './_baseMatchesProperty.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1; - -/** - * Creates a function that performs a partial deep comparison between the - * value at `path` of a given object to `srcValue`, returning `true` if the - * object value is equivalent, else `false`. - * - * **Note:** Partial comparisons will match empty array and empty object - * `srcValue` values against any array or object value, respectively. See - * `_.isEqual` for a list of supported value comparisons. - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 1, 'b': 2, 'c': 3 }, - * { 'a': 4, 'b': 5, 'c': 6 } - * ]; - * - * _.find(objects, _.matchesProperty('a', 4)); - * // => { 'a': 4, 'b': 5, 'c': 6 } - */ -function matchesProperty(path, srcValue) { - return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); -} - -export default matchesProperty; diff --git a/node_modules/lodash-es/math.default.js b/node_modules/lodash-es/math.default.js deleted file mode 100644 index 3705ee5..0000000 --- a/node_modules/lodash-es/math.default.js +++ /dev/null @@ -1,21 +0,0 @@ -import add from './add.js'; -import ceil from './ceil.js'; -import divide from './divide.js'; -import floor from './floor.js'; -import max from './max.js'; -import maxBy from './maxBy.js'; -import mean from './mean.js'; -import meanBy from './meanBy.js'; -import min from './min.js'; -import minBy from './minBy.js'; -import multiply from './multiply.js'; -import round from './round.js'; -import subtract from './subtract.js'; -import sum from './sum.js'; -import sumBy from './sumBy.js'; - -export default { - add, ceil, divide, floor, max, - maxBy, mean, meanBy, min, minBy, - multiply, round, subtract, sum, sumBy -}; diff --git a/node_modules/lodash-es/math.js b/node_modules/lodash-es/math.js deleted file mode 100644 index 8be0338..0000000 --- a/node_modules/lodash-es/math.js +++ /dev/null @@ -1,16 +0,0 @@ -export { default as add } from './add.js'; -export { default as ceil } from './ceil.js'; -export { default as divide } from './divide.js'; -export { default as floor } from './floor.js'; -export { default as max } from './max.js'; -export { default as maxBy } from './maxBy.js'; -export { default as mean } from './mean.js'; -export { default as meanBy } from './meanBy.js'; -export { default as min } from './min.js'; -export { default as minBy } from './minBy.js'; -export { default as multiply } from './multiply.js'; -export { default as round } from './round.js'; -export { default as subtract } from './subtract.js'; -export { default as sum } from './sum.js'; -export { default as sumBy } from './sumBy.js'; -export { default } from './math.default.js'; diff --git a/node_modules/lodash-es/max.js b/node_modules/lodash-es/max.js deleted file mode 100644 index 3394969..0000000 --- a/node_modules/lodash-es/max.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseExtremum from './_baseExtremum.js'; -import baseGt from './_baseGt.js'; -import identity from './identity.js'; - -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseGt) - : undefined; -} - -export default max; diff --git a/node_modules/lodash-es/maxBy.js b/node_modules/lodash-es/maxBy.js deleted file mode 100644 index 6cbd1ce..0000000 --- a/node_modules/lodash-es/maxBy.js +++ /dev/null @@ -1,34 +0,0 @@ -import baseExtremum from './_baseExtremum.js'; -import baseGt from './_baseGt.js'; -import baseIteratee from './_baseIteratee.js'; - -/** - * This method is like `_.max` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the maximum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.maxBy(objects, function(o) { return o.n; }); - * // => { 'n': 2 } - * - * // The `_.property` iteratee shorthand. - * _.maxBy(objects, 'n'); - * // => { 'n': 2 } - */ -function maxBy(array, iteratee) { - return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt) - : undefined; -} - -export default maxBy; diff --git a/node_modules/lodash-es/mean.js b/node_modules/lodash-es/mean.js deleted file mode 100644 index 2323aef..0000000 --- a/node_modules/lodash-es/mean.js +++ /dev/null @@ -1,22 +0,0 @@ -import baseMean from './_baseMean.js'; -import identity from './identity.js'; - -/** - * Computes the mean of the values in `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @returns {number} Returns the mean. - * @example - * - * _.mean([4, 2, 8, 6]); - * // => 5 - */ -function mean(array) { - return baseMean(array, identity); -} - -export default mean; diff --git a/node_modules/lodash-es/meanBy.js b/node_modules/lodash-es/meanBy.js deleted file mode 100644 index 4a29ebd..0000000 --- a/node_modules/lodash-es/meanBy.js +++ /dev/null @@ -1,31 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import baseMean from './_baseMean.js'; - -/** - * This method is like `_.mean` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the value to be averaged. - * The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the mean. - * @example - * - * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; - * - * _.meanBy(objects, function(o) { return o.n; }); - * // => 5 - * - * // The `_.property` iteratee shorthand. - * _.meanBy(objects, 'n'); - * // => 5 - */ -function meanBy(array, iteratee) { - return baseMean(array, baseIteratee(iteratee, 2)); -} - -export default meanBy; diff --git a/node_modules/lodash-es/memoize.js b/node_modules/lodash-es/memoize.js deleted file mode 100644 index 41a1615..0000000 --- a/node_modules/lodash-es/memoize.js +++ /dev/null @@ -1,73 +0,0 @@ -import MapCache from './_MapCache.js'; - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; -} - -// Expose `MapCache`. -memoize.Cache = MapCache; - -export default memoize; diff --git a/node_modules/lodash-es/merge.js b/node_modules/lodash-es/merge.js deleted file mode 100644 index 9aab628..0000000 --- a/node_modules/lodash-es/merge.js +++ /dev/null @@ -1,39 +0,0 @@ -import baseMerge from './_baseMerge.js'; -import createAssigner from './_createAssigner.js'; - -/** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; - * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } - */ -var merge = createAssigner(function(object, source, srcIndex) { - baseMerge(object, source, srcIndex); -}); - -export default merge; diff --git a/node_modules/lodash-es/mergeWith.js b/node_modules/lodash-es/mergeWith.js deleted file mode 100644 index 6b7e098..0000000 --- a/node_modules/lodash-es/mergeWith.js +++ /dev/null @@ -1,39 +0,0 @@ -import baseMerge from './_baseMerge.js'; -import createAssigner from './_createAssigner.js'; - -/** - * This method is like `_.merge` except that it accepts `customizer` which - * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with six arguments: - * (objValue, srcValue, key, object, source, stack). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * if (_.isArray(objValue)) { - * return objValue.concat(srcValue); - * } - * } - * - * var object = { 'a': [1], 'b': [2] }; - * var other = { 'a': [3], 'b': [4] }; - * - * _.mergeWith(object, other, customizer); - * // => { 'a': [1, 3], 'b': [2, 4] } - */ -var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { - baseMerge(object, source, srcIndex, customizer); -}); - -export default mergeWith; diff --git a/node_modules/lodash-es/method.js b/node_modules/lodash-es/method.js deleted file mode 100644 index 9daed78..0000000 --- a/node_modules/lodash-es/method.js +++ /dev/null @@ -1,34 +0,0 @@ -import baseInvoke from './_baseInvoke.js'; -import baseRest from './_baseRest.js'; - -/** - * Creates a function that invokes the method at `path` of a given object. - * Any additional arguments are provided to the invoked method. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Util - * @param {Array|string} path The path of the method to invoke. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new invoker function. - * @example - * - * var objects = [ - * { 'a': { 'b': _.constant(2) } }, - * { 'a': { 'b': _.constant(1) } } - * ]; - * - * _.map(objects, _.method('a.b')); - * // => [2, 1] - * - * _.map(objects, _.method(['a', 'b'])); - * // => [2, 1] - */ -var method = baseRest(function(path, args) { - return function(object) { - return baseInvoke(object, path, args); - }; -}); - -export default method; diff --git a/node_modules/lodash-es/methodOf.js b/node_modules/lodash-es/methodOf.js deleted file mode 100644 index 1a4d98d..0000000 --- a/node_modules/lodash-es/methodOf.js +++ /dev/null @@ -1,33 +0,0 @@ -import baseInvoke from './_baseInvoke.js'; -import baseRest from './_baseRest.js'; - -/** - * The opposite of `_.method`; this method creates a function that invokes - * the method at a given path of `object`. Any additional arguments are - * provided to the invoked method. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Util - * @param {Object} object The object to query. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new invoker function. - * @example - * - * var array = _.times(3, _.constant), - * object = { 'a': array, 'b': array, 'c': array }; - * - * _.map(['a[2]', 'c[0]'], _.methodOf(object)); - * // => [2, 0] - * - * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); - * // => [2, 0] - */ -var methodOf = baseRest(function(object, args) { - return function(path) { - return baseInvoke(object, path, args); - }; -}); - -export default methodOf; diff --git a/node_modules/lodash-es/min.js b/node_modules/lodash-es/min.js deleted file mode 100644 index c411e51..0000000 --- a/node_modules/lodash-es/min.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseExtremum from './_baseExtremum.js'; -import baseLt from './_baseLt.js'; -import identity from './identity.js'; - -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseLt) - : undefined; -} - -export default min; diff --git a/node_modules/lodash-es/minBy.js b/node_modules/lodash-es/minBy.js deleted file mode 100644 index 2d810a8..0000000 --- a/node_modules/lodash-es/minBy.js +++ /dev/null @@ -1,34 +0,0 @@ -import baseExtremum from './_baseExtremum.js'; -import baseIteratee from './_baseIteratee.js'; -import baseLt from './_baseLt.js'; - -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt) - : undefined; -} - -export default minBy; diff --git a/node_modules/lodash-es/mixin.js b/node_modules/lodash-es/mixin.js deleted file mode 100644 index 7d33a25..0000000 --- a/node_modules/lodash-es/mixin.js +++ /dev/null @@ -1,74 +0,0 @@ -import arrayEach from './_arrayEach.js'; -import arrayPush from './_arrayPush.js'; -import baseFunctions from './_baseFunctions.js'; -import copyArray from './_copyArray.js'; -import isFunction from './isFunction.js'; -import isObject from './isObject.js'; -import keys from './keys.js'; - -/** - * Adds all own enumerable string keyed function properties of a source - * object to the destination object. If `object` is a function, then methods - * are added to its prototype as well. - * - * **Note:** Use `_.runInContext` to create a pristine `lodash` function to - * avoid conflicts caused by modifying the original. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {Function|Object} [object=lodash] The destination object. - * @param {Object} source The object of functions to add. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.chain=true] Specify whether mixins are chainable. - * @returns {Function|Object} Returns `object`. - * @example - * - * function vowels(string) { - * return _.filter(string, function(v) { - * return /[aeiou]/i.test(v); - * }); - * } - * - * _.mixin({ 'vowels': vowels }); - * _.vowels('fred'); - * // => ['e'] - * - * _('fred').vowels().value(); - * // => ['e'] - * - * _.mixin({ 'vowels': vowels }, { 'chain': false }); - * _('fred').vowels(); - * // => ['e'] - */ -function mixin(object, source, options) { - var props = keys(source), - methodNames = baseFunctions(source, props); - - var chain = !(isObject(options) && 'chain' in options) || !!options.chain, - isFunc = isFunction(object); - - arrayEach(methodNames, function(methodName) { - var func = source[methodName]; - object[methodName] = func; - if (isFunc) { - object.prototype[methodName] = function() { - var chainAll = this.__chain__; - if (chain || chainAll) { - var result = object(this.__wrapped__), - actions = result.__actions__ = copyArray(this.__actions__); - - actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); - result.__chain__ = chainAll; - return result; - } - return func.apply(object, arrayPush([this.value()], arguments)); - }; - } - }); - - return object; -} - -export default mixin; diff --git a/node_modules/lodash-es/multiply.js b/node_modules/lodash-es/multiply.js deleted file mode 100644 index 19aba72..0000000 --- a/node_modules/lodash-es/multiply.js +++ /dev/null @@ -1,22 +0,0 @@ -import createMathOperation from './_createMathOperation.js'; - -/** - * Multiply two numbers. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Math - * @param {number} multiplier The first number in a multiplication. - * @param {number} multiplicand The second number in a multiplication. - * @returns {number} Returns the product. - * @example - * - * _.multiply(6, 4); - * // => 24 - */ -var multiply = createMathOperation(function(multiplier, multiplicand) { - return multiplier * multiplicand; -}, 1); - -export default multiply; diff --git a/node_modules/lodash-es/negate.js b/node_modules/lodash-es/negate.js deleted file mode 100644 index 9c23aa8..0000000 --- a/node_modules/lodash-es/negate.js +++ /dev/null @@ -1,40 +0,0 @@ -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new negated function. - * @example - * - * function isEven(n) { - * return n % 2 == 0; - * } - * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] - */ -function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - var args = arguments; - switch (args.length) { - case 0: return !predicate.call(this); - case 1: return !predicate.call(this, args[0]); - case 2: return !predicate.call(this, args[0], args[1]); - case 3: return !predicate.call(this, args[0], args[1], args[2]); - } - return !predicate.apply(this, args); - }; -} - -export default negate; diff --git a/node_modules/lodash-es/next.js b/node_modules/lodash-es/next.js deleted file mode 100644 index bb7117b..0000000 --- a/node_modules/lodash-es/next.js +++ /dev/null @@ -1,35 +0,0 @@ -import toArray from './toArray.js'; - -/** - * Gets the next value on a wrapped object following the - * [iterator protocol](https://mdn.io/iteration_protocols#iterator). - * - * @name next - * @memberOf _ - * @since 4.0.0 - * @category Seq - * @returns {Object} Returns the next iterator value. - * @example - * - * var wrapped = _([1, 2]); - * - * wrapped.next(); - * // => { 'done': false, 'value': 1 } - * - * wrapped.next(); - * // => { 'done': false, 'value': 2 } - * - * wrapped.next(); - * // => { 'done': true, 'value': undefined } - */ -function wrapperNext() { - if (this.__values__ === undefined) { - this.__values__ = toArray(this.value()); - } - var done = this.__index__ >= this.__values__.length, - value = done ? undefined : this.__values__[this.__index__++]; - - return { 'done': done, 'value': value }; -} - -export default wrapperNext; diff --git a/node_modules/lodash-es/noop.js b/node_modules/lodash-es/noop.js deleted file mode 100644 index 6b4847c..0000000 --- a/node_modules/lodash-es/noop.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -export default noop; diff --git a/node_modules/lodash-es/now.js b/node_modules/lodash-es/now.js deleted file mode 100644 index 096807b..0000000 --- a/node_modules/lodash-es/now.js +++ /dev/null @@ -1,23 +0,0 @@ -import root from './_root.js'; - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return root.Date.now(); -}; - -export default now; diff --git a/node_modules/lodash-es/nth.js b/node_modules/lodash-es/nth.js deleted file mode 100644 index 8ebf949..0000000 --- a/node_modules/lodash-es/nth.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseNth from './_baseNth.js'; -import toInteger from './toInteger.js'; - -/** - * Gets the element at index `n` of `array`. If `n` is negative, the nth - * element from the end is returned. - * - * @static - * @memberOf _ - * @since 4.11.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=0] The index of the element to return. - * @returns {*} Returns the nth element of `array`. - * @example - * - * var array = ['a', 'b', 'c', 'd']; - * - * _.nth(array, 1); - * // => 'b' - * - * _.nth(array, -2); - * // => 'c'; - */ -function nth(array, n) { - return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; -} - -export default nth; diff --git a/node_modules/lodash-es/nthArg.js b/node_modules/lodash-es/nthArg.js deleted file mode 100644 index be3a4cc..0000000 --- a/node_modules/lodash-es/nthArg.js +++ /dev/null @@ -1,32 +0,0 @@ -import baseNth from './_baseNth.js'; -import baseRest from './_baseRest.js'; -import toInteger from './toInteger.js'; - -/** - * Creates a function that gets the argument at index `n`. If `n` is negative, - * the nth argument from the end is returned. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {number} [n=0] The index of the argument to return. - * @returns {Function} Returns the new pass-thru function. - * @example - * - * var func = _.nthArg(1); - * func('a', 'b', 'c', 'd'); - * // => 'b' - * - * var func = _.nthArg(-2); - * func('a', 'b', 'c', 'd'); - * // => 'c' - */ -function nthArg(n) { - n = toInteger(n); - return baseRest(function(args) { - return baseNth(args, n); - }); -} - -export default nthArg; diff --git a/node_modules/lodash-es/number.default.js b/node_modules/lodash-es/number.default.js deleted file mode 100644 index 5eef337..0000000 --- a/node_modules/lodash-es/number.default.js +++ /dev/null @@ -1,7 +0,0 @@ -import clamp from './clamp.js'; -import inRange from './inRange.js'; -import random from './random.js'; - -export default { - clamp, inRange, random -}; diff --git a/node_modules/lodash-es/number.js b/node_modules/lodash-es/number.js deleted file mode 100644 index 2ff09e3..0000000 --- a/node_modules/lodash-es/number.js +++ /dev/null @@ -1,4 +0,0 @@ -export { default as clamp } from './clamp.js'; -export { default as inRange } from './inRange.js'; -export { default as random } from './random.js'; -export { default } from './number.default.js'; diff --git a/node_modules/lodash-es/object.default.js b/node_modules/lodash-es/object.default.js deleted file mode 100644 index 931ac0e..0000000 --- a/node_modules/lodash-es/object.default.js +++ /dev/null @@ -1,60 +0,0 @@ -import assign from './assign.js'; -import assignIn from './assignIn.js'; -import assignInWith from './assignInWith.js'; -import assignWith from './assignWith.js'; -import at from './at.js'; -import create from './create.js'; -import defaults from './defaults.js'; -import defaultsDeep from './defaultsDeep.js'; -import entries from './entries.js'; -import entriesIn from './entriesIn.js'; -import extend from './extend.js'; -import extendWith from './extendWith.js'; -import findKey from './findKey.js'; -import findLastKey from './findLastKey.js'; -import forIn from './forIn.js'; -import forInRight from './forInRight.js'; -import forOwn from './forOwn.js'; -import forOwnRight from './forOwnRight.js'; -import functions from './functions.js'; -import functionsIn from './functionsIn.js'; -import get from './get.js'; -import has from './has.js'; -import hasIn from './hasIn.js'; -import invert from './invert.js'; -import invertBy from './invertBy.js'; -import invoke from './invoke.js'; -import keys from './keys.js'; -import keysIn from './keysIn.js'; -import mapKeys from './mapKeys.js'; -import mapValues from './mapValues.js'; -import merge from './merge.js'; -import mergeWith from './mergeWith.js'; -import omit from './omit.js'; -import omitBy from './omitBy.js'; -import pick from './pick.js'; -import pickBy from './pickBy.js'; -import result from './result.js'; -import set from './set.js'; -import setWith from './setWith.js'; -import toPairs from './toPairs.js'; -import toPairsIn from './toPairsIn.js'; -import transform from './transform.js'; -import unset from './unset.js'; -import update from './update.js'; -import updateWith from './updateWith.js'; -import values from './values.js'; -import valuesIn from './valuesIn.js'; - -export default { - assign, assignIn, assignInWith, assignWith, at, - create, defaults, defaultsDeep, entries, entriesIn, - extend, extendWith, findKey, findLastKey, forIn, - forInRight, forOwn, forOwnRight, functions, functionsIn, - get, has, hasIn, invert, invertBy, - invoke, keys, keysIn, mapKeys, mapValues, - merge, mergeWith, omit, omitBy, pick, - pickBy, result, set, setWith, toPairs, - toPairsIn, transform, unset, update, updateWith, - values, valuesIn -}; diff --git a/node_modules/lodash-es/object.js b/node_modules/lodash-es/object.js deleted file mode 100644 index aa7ce3d..0000000 --- a/node_modules/lodash-es/object.js +++ /dev/null @@ -1,48 +0,0 @@ -export { default as assign } from './assign.js'; -export { default as assignIn } from './assignIn.js'; -export { default as assignInWith } from './assignInWith.js'; -export { default as assignWith } from './assignWith.js'; -export { default as at } from './at.js'; -export { default as create } from './create.js'; -export { default as defaults } from './defaults.js'; -export { default as defaultsDeep } from './defaultsDeep.js'; -export { default as entries } from './entries.js'; -export { default as entriesIn } from './entriesIn.js'; -export { default as extend } from './extend.js'; -export { default as extendWith } from './extendWith.js'; -export { default as findKey } from './findKey.js'; -export { default as findLastKey } from './findLastKey.js'; -export { default as forIn } from './forIn.js'; -export { default as forInRight } from './forInRight.js'; -export { default as forOwn } from './forOwn.js'; -export { default as forOwnRight } from './forOwnRight.js'; -export { default as functions } from './functions.js'; -export { default as functionsIn } from './functionsIn.js'; -export { default as get } from './get.js'; -export { default as has } from './has.js'; -export { default as hasIn } from './hasIn.js'; -export { default as invert } from './invert.js'; -export { default as invertBy } from './invertBy.js'; -export { default as invoke } from './invoke.js'; -export { default as keys } from './keys.js'; -export { default as keysIn } from './keysIn.js'; -export { default as mapKeys } from './mapKeys.js'; -export { default as mapValues } from './mapValues.js'; -export { default as merge } from './merge.js'; -export { default as mergeWith } from './mergeWith.js'; -export { default as omit } from './omit.js'; -export { default as omitBy } from './omitBy.js'; -export { default as pick } from './pick.js'; -export { default as pickBy } from './pickBy.js'; -export { default as result } from './result.js'; -export { default as set } from './set.js'; -export { default as setWith } from './setWith.js'; -export { default as toPairs } from './toPairs.js'; -export { default as toPairsIn } from './toPairsIn.js'; -export { default as transform } from './transform.js'; -export { default as unset } from './unset.js'; -export { default as update } from './update.js'; -export { default as updateWith } from './updateWith.js'; -export { default as values } from './values.js'; -export { default as valuesIn } from './valuesIn.js'; -export { default } from './object.default.js'; diff --git a/node_modules/lodash-es/omit.js b/node_modules/lodash-es/omit.js deleted file mode 100644 index 4657d0c..0000000 --- a/node_modules/lodash-es/omit.js +++ /dev/null @@ -1,57 +0,0 @@ -import arrayMap from './_arrayMap.js'; -import baseClone from './_baseClone.js'; -import baseUnset from './_baseUnset.js'; -import castPath from './_castPath.js'; -import copyObject from './_copyObject.js'; -import customOmitClone from './_customOmitClone.js'; -import flatRest from './_flatRest.js'; -import getAllKeysIn from './_getAllKeysIn.js'; - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** - * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable property paths of `object` that are not omitted. - * - * **Note:** This method is considerably slower than `_.pick`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to omit. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omit(object, ['a', 'c']); - * // => { 'b': '2' } - */ -var omit = flatRest(function(object, paths) { - var result = {}; - if (object == null) { - return result; - } - var isDeep = false; - paths = arrayMap(paths, function(path) { - path = castPath(path, object); - isDeep || (isDeep = path.length > 1); - return path; - }); - copyObject(object, getAllKeysIn(object), result); - if (isDeep) { - result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); - } - var length = paths.length; - while (length--) { - baseUnset(result, paths[length]); - } - return result; -}); - -export default omit; diff --git a/node_modules/lodash-es/omitBy.js b/node_modules/lodash-es/omitBy.js deleted file mode 100644 index cab01bd..0000000 --- a/node_modules/lodash-es/omitBy.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import negate from './negate.js'; -import pickBy from './pickBy.js'; - -/** - * The opposite of `_.pickBy`; this method creates an object composed of - * the own and inherited enumerable string keyed properties of `object` that - * `predicate` doesn't return truthy for. The predicate is invoked with two - * arguments: (value, key). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omitBy(object, _.isNumber); - * // => { 'b': '2' } - */ -function omitBy(object, predicate) { - return pickBy(object, negate(baseIteratee(predicate))); -} - -export default omitBy; diff --git a/node_modules/lodash-es/once.js b/node_modules/lodash-es/once.js deleted file mode 100644 index 603c73e..0000000 --- a/node_modules/lodash-es/once.js +++ /dev/null @@ -1,25 +0,0 @@ -import before from './before.js'; - -/** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once - */ -function once(func) { - return before(2, func); -} - -export default once; diff --git a/node_modules/lodash-es/orderBy.js b/node_modules/lodash-es/orderBy.js deleted file mode 100644 index 2f9e00e..0000000 --- a/node_modules/lodash-es/orderBy.js +++ /dev/null @@ -1,47 +0,0 @@ -import baseOrderBy from './_baseOrderBy.js'; -import isArray from './isArray.js'; - -/** - * This method is like `_.sortBy` except that it allows specifying the sort - * orders of the iteratees to sort by. If `orders` is unspecified, all values - * are sorted in ascending order. Otherwise, specify an order of "desc" for - * descending or "asc" for ascending sort order of corresponding values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] - * The iteratees to sort by. - * @param {string[]} [orders] The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'barney', 'age': 36 } - * ]; - * - * // Sort by `user` in ascending order and by `age` in descending order. - * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] - */ -function orderBy(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (!isArray(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; - } - orders = guard ? undefined : orders; - if (!isArray(orders)) { - orders = orders == null ? [] : [orders]; - } - return baseOrderBy(collection, iteratees, orders); -} - -export default orderBy; diff --git a/node_modules/lodash-es/over.js b/node_modules/lodash-es/over.js deleted file mode 100644 index 51b6339..0000000 --- a/node_modules/lodash-es/over.js +++ /dev/null @@ -1,24 +0,0 @@ -import arrayMap from './_arrayMap.js'; -import createOver from './_createOver.js'; - -/** - * Creates a function that invokes `iteratees` with the arguments it receives - * and returns their results. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to invoke. - * @returns {Function} Returns the new function. - * @example - * - * var func = _.over([Math.max, Math.min]); - * - * func(1, 2, 3, 4); - * // => [4, 1] - */ -var over = createOver(arrayMap); - -export default over; diff --git a/node_modules/lodash-es/overArgs.js b/node_modules/lodash-es/overArgs.js deleted file mode 100644 index c9409f4..0000000 --- a/node_modules/lodash-es/overArgs.js +++ /dev/null @@ -1,61 +0,0 @@ -import apply from './_apply.js'; -import arrayMap from './_arrayMap.js'; -import baseFlatten from './_baseFlatten.js'; -import baseIteratee from './_baseIteratee.js'; -import baseRest from './_baseRest.js'; -import baseUnary from './_baseUnary.js'; -import castRest from './_castRest.js'; -import isArray from './isArray.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Creates a function that invokes `func` with its arguments transformed. - * - * @static - * @since 4.0.0 - * @memberOf _ - * @category Function - * @param {Function} func The function to wrap. - * @param {...(Function|Function[])} [transforms=[_.identity]] - * The argument transforms. - * @returns {Function} Returns the new function. - * @example - * - * function doubled(n) { - * return n * 2; - * } - * - * function square(n) { - * return n * n; - * } - * - * var func = _.overArgs(function(x, y) { - * return [x, y]; - * }, [square, doubled]); - * - * func(9, 3); - * // => [81, 6] - * - * func(10, 5); - * // => [100, 10] - */ -var overArgs = castRest(function(func, transforms) { - transforms = (transforms.length == 1 && isArray(transforms[0])) - ? arrayMap(transforms[0], baseUnary(baseIteratee)) - : arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee)); - - var funcsLength = transforms.length; - return baseRest(function(args) { - var index = -1, - length = nativeMin(args.length, funcsLength); - - while (++index < length) { - args[index] = transforms[index].call(this, args[index]); - } - return apply(func, this, args); - }); -}); - -export default overArgs; diff --git a/node_modules/lodash-es/overEvery.js b/node_modules/lodash-es/overEvery.js deleted file mode 100644 index 6b262d8..0000000 --- a/node_modules/lodash-es/overEvery.js +++ /dev/null @@ -1,30 +0,0 @@ -import arrayEvery from './_arrayEvery.js'; -import createOver from './_createOver.js'; - -/** - * Creates a function that checks if **all** of the `predicates` return - * truthy when invoked with the arguments it receives. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {...(Function|Function[])} [predicates=[_.identity]] - * The predicates to check. - * @returns {Function} Returns the new function. - * @example - * - * var func = _.overEvery([Boolean, isFinite]); - * - * func('1'); - * // => true - * - * func(null); - * // => false - * - * func(NaN); - * // => false - */ -var overEvery = createOver(arrayEvery); - -export default overEvery; diff --git a/node_modules/lodash-es/overSome.js b/node_modules/lodash-es/overSome.js deleted file mode 100644 index 9893ba6..0000000 --- a/node_modules/lodash-es/overSome.js +++ /dev/null @@ -1,30 +0,0 @@ -import arraySome from './_arraySome.js'; -import createOver from './_createOver.js'; - -/** - * Creates a function that checks if **any** of the `predicates` return - * truthy when invoked with the arguments it receives. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {...(Function|Function[])} [predicates=[_.identity]] - * The predicates to check. - * @returns {Function} Returns the new function. - * @example - * - * var func = _.overSome([Boolean, isFinite]); - * - * func('1'); - * // => true - * - * func(null); - * // => true - * - * func(NaN); - * // => false - */ -var overSome = createOver(arraySome); - -export default overSome; diff --git a/node_modules/lodash-es/package.json b/node_modules/lodash-es/package.json deleted file mode 100644 index c49ea57..0000000 --- a/node_modules/lodash-es/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "lodash-es", - "version": "4.17.4", - "description": "Lodash exported as ES modules.", - "keywords": "es6, modules, stdlib, util", - "homepage": "https://lodash.com/custom-builds", - "bugs": "https://github.com/lodash/lodash-cli/issues", - "repository": "lodash/lodash", - "license": "MIT", - "jsnext:main": "lodash.js", - "main": "lodash.js", - "module": "lodash.js", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/node_modules/lodash-es/pad.js b/node_modules/lodash-es/pad.js deleted file mode 100644 index b74a097..0000000 --- a/node_modules/lodash-es/pad.js +++ /dev/null @@ -1,49 +0,0 @@ -import createPadding from './_createPadding.js'; -import stringSize from './_stringSize.js'; -import toInteger from './toInteger.js'; -import toString from './toString.js'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeFloor = Math.floor; - -/** - * Pads `string` on the left and right sides if it's shorter than `length`. - * Padding characters are truncated if they can't be evenly divided by `length`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.pad('abc', 8); - * // => ' abc ' - * - * _.pad('abc', 8, '_-'); - * // => '_-abc_-_' - * - * _.pad('abc', 3); - * // => 'abc' - */ -function pad(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - if (!length || strLength >= length) { - return string; - } - var mid = (length - strLength) / 2; - return ( - createPadding(nativeFloor(mid), chars) + - string + - createPadding(nativeCeil(mid), chars) - ); -} - -export default pad; diff --git a/node_modules/lodash-es/padEnd.js b/node_modules/lodash-es/padEnd.js deleted file mode 100644 index c7df21b..0000000 --- a/node_modules/lodash-es/padEnd.js +++ /dev/null @@ -1,39 +0,0 @@ -import createPadding from './_createPadding.js'; -import stringSize from './_stringSize.js'; -import toInteger from './toInteger.js'; -import toString from './toString.js'; - -/** - * Pads `string` on the right side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.padEnd('abc', 6); - * // => 'abc ' - * - * _.padEnd('abc', 6, '_-'); - * // => 'abc_-_' - * - * _.padEnd('abc', 3); - * // => 'abc' - */ -function padEnd(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - return (length && strLength < length) - ? (string + createPadding(length - strLength, chars)) - : string; -} - -export default padEnd; diff --git a/node_modules/lodash-es/padStart.js b/node_modules/lodash-es/padStart.js deleted file mode 100644 index c61644a..0000000 --- a/node_modules/lodash-es/padStart.js +++ /dev/null @@ -1,39 +0,0 @@ -import createPadding from './_createPadding.js'; -import stringSize from './_stringSize.js'; -import toInteger from './toInteger.js'; -import toString from './toString.js'; - -/** - * Pads `string` on the left side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.padStart('abc', 6); - * // => ' abc' - * - * _.padStart('abc', 6, '_-'); - * // => '_-_abc' - * - * _.padStart('abc', 3); - * // => 'abc' - */ -function padStart(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - return (length && strLength < length) - ? (createPadding(length - strLength, chars) + string) - : string; -} - -export default padStart; diff --git a/node_modules/lodash-es/parseInt.js b/node_modules/lodash-es/parseInt.js deleted file mode 100644 index 3400b6b..0000000 --- a/node_modules/lodash-es/parseInt.js +++ /dev/null @@ -1,43 +0,0 @@ -import root from './_root.js'; -import toString from './toString.js'; - -/** Used to match leading and trailing whitespace. */ -var reTrimStart = /^\s+/; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeParseInt = root.parseInt; - -/** - * Converts `string` to an integer of the specified radix. If `radix` is - * `undefined` or `0`, a `radix` of `10` is used unless `value` is a - * hexadecimal, in which case a `radix` of `16` is used. - * - * **Note:** This method aligns with the - * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category String - * @param {string} string The string to convert. - * @param {number} [radix=10] The radix to interpret `value` by. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {number} Returns the converted integer. - * @example - * - * _.parseInt('08'); - * // => 8 - * - * _.map(['6', '08', '10'], _.parseInt); - * // => [6, 8, 10] - */ -function parseInt(string, radix, guard) { - if (guard || radix == null) { - radix = 0; - } else if (radix) { - radix = +radix; - } - return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); -} - -export default parseInt; diff --git a/node_modules/lodash-es/partial.js b/node_modules/lodash-es/partial.js deleted file mode 100644 index eaf6c43..0000000 --- a/node_modules/lodash-es/partial.js +++ /dev/null @@ -1,50 +0,0 @@ -import baseRest from './_baseRest.js'; -import createWrap from './_createWrap.js'; -import getHolder from './_getHolder.js'; -import replaceHolders from './_replaceHolders.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes `func` with `partials` prepended to the - * arguments it receives. This method is like `_.bind` except it does **not** - * alter the `this` binding. - * - * The `_.partial.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @since 0.2.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * function greet(greeting, name) { - * return greeting + ' ' + name; - * } - * - * var sayHelloTo = _.partial(greet, 'hello'); - * sayHelloTo('fred'); - * // => 'hello fred' - * - * // Partially applied with placeholders. - * var greetFred = _.partial(greet, _, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - */ -var partial = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partial)); - return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); -}); - -// Assign default placeholders. -partial.placeholder = {}; - -export default partial; diff --git a/node_modules/lodash-es/partialRight.js b/node_modules/lodash-es/partialRight.js deleted file mode 100644 index 8ffe3eb..0000000 --- a/node_modules/lodash-es/partialRight.js +++ /dev/null @@ -1,49 +0,0 @@ -import baseRest from './_baseRest.js'; -import createWrap from './_createWrap.js'; -import getHolder from './_getHolder.js'; -import replaceHolders from './_replaceHolders.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_PARTIAL_RIGHT_FLAG = 64; - -/** - * This method is like `_.partial` except that partially applied arguments - * are appended to the arguments it receives. - * - * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * function greet(greeting, name) { - * return greeting + ' ' + name; - * } - * - * var greetFred = _.partialRight(greet, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - * - * // Partially applied with placeholders. - * var sayHelloTo = _.partialRight(greet, 'hello', _); - * sayHelloTo('fred'); - * // => 'hello fred' - */ -var partialRight = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partialRight)); - return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); -}); - -// Assign default placeholders. -partialRight.placeholder = {}; - -export default partialRight; diff --git a/node_modules/lodash-es/partition.js b/node_modules/lodash-es/partition.js deleted file mode 100644 index a58b6de..0000000 --- a/node_modules/lodash-es/partition.js +++ /dev/null @@ -1,43 +0,0 @@ -import createAggregator from './_createAggregator.js'; - -/** - * Creates an array of elements split into two groups, the first of which - * contains elements `predicate` returns truthy for, the second of which - * contains elements `predicate` returns falsey for. The predicate is - * invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the array of grouped elements. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true }, - * { 'user': 'pebbles', 'age': 1, 'active': false } - * ]; - * - * _.partition(users, function(o) { return o.active; }); - * // => objects for [['fred'], ['barney', 'pebbles']] - * - * // The `_.matches` iteratee shorthand. - * _.partition(users, { 'age': 1, 'active': false }); - * // => objects for [['pebbles'], ['barney', 'fred']] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.partition(users, ['active', false]); - * // => objects for [['barney', 'pebbles'], ['fred']] - * - * // The `_.property` iteratee shorthand. - * _.partition(users, 'active'); - * // => objects for [['fred'], ['barney', 'pebbles']] - */ -var partition = createAggregator(function(result, value, key) { - result[key ? 0 : 1].push(value); -}, function() { return [[], []]; }); - -export default partition; diff --git a/node_modules/lodash-es/pick.js b/node_modules/lodash-es/pick.js deleted file mode 100644 index fb84992..0000000 --- a/node_modules/lodash-es/pick.js +++ /dev/null @@ -1,25 +0,0 @@ -import basePick from './_basePick.js'; -import flatRest from './_flatRest.js'; - -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); -}); - -export default pick; diff --git a/node_modules/lodash-es/pickBy.js b/node_modules/lodash-es/pickBy.js deleted file mode 100644 index 4ff3598..0000000 --- a/node_modules/lodash-es/pickBy.js +++ /dev/null @@ -1,37 +0,0 @@ -import arrayMap from './_arrayMap.js'; -import baseIteratee from './_baseIteratee.js'; -import basePickBy from './_basePickBy.js'; -import getAllKeysIn from './_getAllKeysIn.js'; - -/** - * Creates an object composed of the `object` properties `predicate` returns - * truthy for. The predicate is invoked with two arguments: (value, key). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pickBy(object, _.isNumber); - * // => { 'a': 1, 'c': 3 } - */ -function pickBy(object, predicate) { - if (object == null) { - return {}; - } - var props = arrayMap(getAllKeysIn(object), function(prop) { - return [prop]; - }); - predicate = baseIteratee(predicate); - return basePickBy(object, props, function(value, path) { - return predicate(value, path[0]); - }); -} - -export default pickBy; diff --git a/node_modules/lodash-es/plant.js b/node_modules/lodash-es/plant.js deleted file mode 100644 index c165ea5..0000000 --- a/node_modules/lodash-es/plant.js +++ /dev/null @@ -1,48 +0,0 @@ -import baseLodash from './_baseLodash.js'; -import wrapperClone from './_wrapperClone.js'; - -/** - * Creates a clone of the chain sequence planting `value` as the wrapped value. - * - * @name plant - * @memberOf _ - * @since 3.2.0 - * @category Seq - * @param {*} value The value to plant. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2]).map(square); - * var other = wrapped.plant([3, 4]); - * - * other.value(); - * // => [9, 16] - * - * wrapped.value(); - * // => [1, 4] - */ -function wrapperPlant(value) { - var result, - parent = this; - - while (parent instanceof baseLodash) { - var clone = wrapperClone(parent); - clone.__index__ = 0; - clone.__values__ = undefined; - if (result) { - previous.__wrapped__ = clone; - } else { - result = clone; - } - var previous = clone; - parent = parent.__wrapped__; - } - previous.__wrapped__ = value; - return result; -} - -export default wrapperPlant; diff --git a/node_modules/lodash-es/property.js b/node_modules/lodash-es/property.js deleted file mode 100644 index 45152aa..0000000 --- a/node_modules/lodash-es/property.js +++ /dev/null @@ -1,32 +0,0 @@ -import baseProperty from './_baseProperty.js'; -import basePropertyDeep from './_basePropertyDeep.js'; -import isKey from './_isKey.js'; -import toKey from './_toKey.js'; - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); -} - -export default property; diff --git a/node_modules/lodash-es/propertyOf.js b/node_modules/lodash-es/propertyOf.js deleted file mode 100644 index 457c759..0000000 --- a/node_modules/lodash-es/propertyOf.js +++ /dev/null @@ -1,30 +0,0 @@ -import baseGet from './_baseGet.js'; - -/** - * The opposite of `_.property`; this method creates a function that returns - * the value at a given path of `object`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - * @example - * - * var array = [0, 1, 2], - * object = { 'a': array, 'b': array, 'c': array }; - * - * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); - * // => [2, 0] - * - * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); - * // => [2, 0] - */ -function propertyOf(object) { - return function(path) { - return object == null ? undefined : baseGet(object, path); - }; -} - -export default propertyOf; diff --git a/node_modules/lodash-es/pull.js b/node_modules/lodash-es/pull.js deleted file mode 100644 index 10872f2..0000000 --- a/node_modules/lodash-es/pull.js +++ /dev/null @@ -1,29 +0,0 @@ -import baseRest from './_baseRest.js'; -import pullAll from './pullAll.js'; - -/** - * Removes all given values from `array` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` - * to remove elements from an array by predicate. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pull(array, 'a', 'c'); - * console.log(array); - * // => ['b', 'b'] - */ -var pull = baseRest(pullAll); - -export default pull; diff --git a/node_modules/lodash-es/pullAll.js b/node_modules/lodash-es/pullAll.js deleted file mode 100644 index fe3a2b5..0000000 --- a/node_modules/lodash-es/pullAll.js +++ /dev/null @@ -1,29 +0,0 @@ -import basePullAll from './_basePullAll.js'; - -/** - * This method is like `_.pull` except that it accepts an array of values to remove. - * - * **Note:** Unlike `_.difference`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pullAll(array, ['a', 'c']); - * console.log(array); - * // => ['b', 'b'] - */ -function pullAll(array, values) { - return (array && array.length && values && values.length) - ? basePullAll(array, values) - : array; -} - -export default pullAll; diff --git a/node_modules/lodash-es/pullAllBy.js b/node_modules/lodash-es/pullAllBy.js deleted file mode 100644 index 2f9e415..0000000 --- a/node_modules/lodash-es/pullAllBy.js +++ /dev/null @@ -1,33 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import basePullAll from './_basePullAll.js'; - -/** - * This method is like `_.pullAll` except that it accepts `iteratee` which is - * invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The iteratee is invoked with one argument: (value). - * - * **Note:** Unlike `_.differenceBy`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; - * - * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); - * console.log(array); - * // => [{ 'x': 2 }] - */ -function pullAllBy(array, values, iteratee) { - return (array && array.length && values && values.length) - ? basePullAll(array, values, baseIteratee(iteratee, 2)) - : array; -} - -export default pullAllBy; diff --git a/node_modules/lodash-es/pullAllWith.js b/node_modules/lodash-es/pullAllWith.js deleted file mode 100644 index f60530d..0000000 --- a/node_modules/lodash-es/pullAllWith.js +++ /dev/null @@ -1,32 +0,0 @@ -import basePullAll from './_basePullAll.js'; - -/** - * This method is like `_.pullAll` except that it accepts `comparator` which - * is invoked to compare elements of `array` to `values`. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.differenceWith`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.6.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; - * - * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); - * console.log(array); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] - */ -function pullAllWith(array, values, comparator) { - return (array && array.length && values && values.length) - ? basePullAll(array, values, undefined, comparator) - : array; -} - -export default pullAllWith; diff --git a/node_modules/lodash-es/pullAt.js b/node_modules/lodash-es/pullAt.js deleted file mode 100644 index 23213c7..0000000 --- a/node_modules/lodash-es/pullAt.js +++ /dev/null @@ -1,43 +0,0 @@ -import arrayMap from './_arrayMap.js'; -import baseAt from './_baseAt.js'; -import basePullAt from './_basePullAt.js'; -import compareAscending from './_compareAscending.js'; -import flatRest from './_flatRest.js'; -import isIndex from './_isIndex.js'; - -/** - * Removes elements from `array` corresponding to `indexes` and returns an - * array of removed elements. - * - * **Note:** Unlike `_.at`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...(number|number[])} [indexes] The indexes of elements to remove. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = ['a', 'b', 'c', 'd']; - * var pulled = _.pullAt(array, [1, 3]); - * - * console.log(array); - * // => ['a', 'c'] - * - * console.log(pulled); - * // => ['b', 'd'] - */ -var pullAt = flatRest(function(array, indexes) { - var length = array == null ? 0 : array.length, - result = baseAt(array, indexes); - - basePullAt(array, arrayMap(indexes, function(index) { - return isIndex(index, length) ? +index : index; - }).sort(compareAscending)); - - return result; -}); - -export default pullAt; diff --git a/node_modules/lodash-es/random.js b/node_modules/lodash-es/random.js deleted file mode 100644 index b97563d..0000000 --- a/node_modules/lodash-es/random.js +++ /dev/null @@ -1,82 +0,0 @@ -import baseRandom from './_baseRandom.js'; -import isIterateeCall from './_isIterateeCall.js'; -import toFinite from './toFinite.js'; - -/** Built-in method references without a dependency on `root`. */ -var freeParseFloat = parseFloat; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min, - nativeRandom = Math.random; - -/** - * Produces a random number between the inclusive `lower` and `upper` bounds. - * If only one argument is provided a number between `0` and the given number - * is returned. If `floating` is `true`, or either `lower` or `upper` are - * floats, a floating-point number is returned instead of an integer. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @memberOf _ - * @since 0.7.0 - * @category Number - * @param {number} [lower=0] The lower bound. - * @param {number} [upper=1] The upper bound. - * @param {boolean} [floating] Specify returning a floating-point number. - * @returns {number} Returns the random number. - * @example - * - * _.random(0, 5); - * // => an integer between 0 and 5 - * - * _.random(5); - * // => also an integer between 0 and 5 - * - * _.random(5, true); - * // => a floating-point number between 0 and 5 - * - * _.random(1.2, 5.2); - * // => a floating-point number between 1.2 and 5.2 - */ -function random(lower, upper, floating) { - if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { - upper = floating = undefined; - } - if (floating === undefined) { - if (typeof upper == 'boolean') { - floating = upper; - upper = undefined; - } - else if (typeof lower == 'boolean') { - floating = lower; - lower = undefined; - } - } - if (lower === undefined && upper === undefined) { - lower = 0; - upper = 1; - } - else { - lower = toFinite(lower); - if (upper === undefined) { - upper = lower; - lower = 0; - } else { - upper = toFinite(upper); - } - } - if (lower > upper) { - var temp = lower; - lower = upper; - upper = temp; - } - if (floating || lower % 1 || upper % 1) { - var rand = nativeRandom(); - return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); - } - return baseRandom(lower, upper); -} - -export default random; diff --git a/node_modules/lodash-es/range.js b/node_modules/lodash-es/range.js deleted file mode 100644 index 71f26da..0000000 --- a/node_modules/lodash-es/range.js +++ /dev/null @@ -1,46 +0,0 @@ -import createRange from './_createRange.js'; - -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = createRange(); - -export default range; diff --git a/node_modules/lodash-es/rangeRight.js b/node_modules/lodash-es/rangeRight.js deleted file mode 100644 index 3472513..0000000 --- a/node_modules/lodash-es/rangeRight.js +++ /dev/null @@ -1,41 +0,0 @@ -import createRange from './_createRange.js'; - -/** - * This method is like `_.range` except that it populates values in - * descending order. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.range - * @example - * - * _.rangeRight(4); - * // => [3, 2, 1, 0] - * - * _.rangeRight(-4); - * // => [-3, -2, -1, 0] - * - * _.rangeRight(1, 5); - * // => [4, 3, 2, 1] - * - * _.rangeRight(0, 20, 5); - * // => [15, 10, 5, 0] - * - * _.rangeRight(0, -4, -1); - * // => [-3, -2, -1, 0] - * - * _.rangeRight(1, 4, 0); - * // => [1, 1, 1] - * - * _.rangeRight(0); - * // => [] - */ -var rangeRight = createRange(true); - -export default rangeRight; diff --git a/node_modules/lodash-es/rearg.js b/node_modules/lodash-es/rearg.js deleted file mode 100644 index 6bdda0c..0000000 --- a/node_modules/lodash-es/rearg.js +++ /dev/null @@ -1,33 +0,0 @@ -import createWrap from './_createWrap.js'; -import flatRest from './_flatRest.js'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_REARG_FLAG = 256; - -/** - * Creates a function that invokes `func` with arguments arranged according - * to the specified `indexes` where the argument value at the first index is - * provided as the first argument, the argument value at the second index is - * provided as the second argument, and so on. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to rearrange arguments for. - * @param {...(number|number[])} indexes The arranged argument indexes. - * @returns {Function} Returns the new function. - * @example - * - * var rearged = _.rearg(function(a, b, c) { - * return [a, b, c]; - * }, [2, 0, 1]); - * - * rearged('b', 'c', 'a') - * // => ['a', 'b', 'c'] - */ -var rearg = flatRest(function(func, indexes) { - return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); -}); - -export default rearg; diff --git a/node_modules/lodash-es/reduce.js b/node_modules/lodash-es/reduce.js deleted file mode 100644 index 5dc6c12..0000000 --- a/node_modules/lodash-es/reduce.js +++ /dev/null @@ -1,51 +0,0 @@ -import arrayReduce from './_arrayReduce.js'; -import baseEach from './_baseEach.js'; -import baseIteratee from './_baseIteratee.js'; -import baseReduce from './_baseReduce.js'; -import isArray from './isArray.js'; - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduce : baseReduce, - initAccum = arguments.length < 3; - - return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); -} - -export default reduce; diff --git a/node_modules/lodash-es/reduceRight.js b/node_modules/lodash-es/reduceRight.js deleted file mode 100644 index b0f5d82..0000000 --- a/node_modules/lodash-es/reduceRight.js +++ /dev/null @@ -1,36 +0,0 @@ -import arrayReduceRight from './_arrayReduceRight.js'; -import baseEachRight from './_baseEachRight.js'; -import baseIteratee from './_baseIteratee.js'; -import baseReduce from './_baseReduce.js'; -import isArray from './isArray.js'; - -/** - * This method is like `_.reduce` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduce - * @example - * - * var array = [[0, 1], [2, 3], [4, 5]]; - * - * _.reduceRight(array, function(flattened, other) { - * return flattened.concat(other); - * }, []); - * // => [4, 5, 2, 3, 0, 1] - */ -function reduceRight(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduceRight : baseReduce, - initAccum = arguments.length < 3; - - return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); -} - -export default reduceRight; diff --git a/node_modules/lodash-es/reject.js b/node_modules/lodash-es/reject.js deleted file mode 100644 index f3a1c55..0000000 --- a/node_modules/lodash-es/reject.js +++ /dev/null @@ -1,46 +0,0 @@ -import arrayFilter from './_arrayFilter.js'; -import baseFilter from './_baseFilter.js'; -import baseIteratee from './_baseIteratee.js'; -import isArray from './isArray.js'; -import negate from './negate.js'; - -/** - * The opposite of `_.filter`; this method returns the elements of `collection` - * that `predicate` does **not** return truthy for. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.filter - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true } - * ]; - * - * _.reject(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.reject(users, { 'age': 40, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.reject(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.reject(users, 'active'); - * // => objects for ['barney'] - */ -function reject(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, negate(baseIteratee(predicate, 3))); -} - -export default reject; diff --git a/node_modules/lodash-es/remove.js b/node_modules/lodash-es/remove.js deleted file mode 100644 index c1e775f..0000000 --- a/node_modules/lodash-es/remove.js +++ /dev/null @@ -1,53 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import basePullAt from './_basePullAt.js'; - -/** - * Removes all elements from `array` that `predicate` returns truthy for - * and returns an array of the removed elements. The predicate is invoked - * with three arguments: (value, index, array). - * - * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` - * to pull elements from an array by value. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = [1, 2, 3, 4]; - * var evens = _.remove(array, function(n) { - * return n % 2 == 0; - * }); - * - * console.log(array); - * // => [1, 3] - * - * console.log(evens); - * // => [2, 4] - */ -function remove(array, predicate) { - var result = []; - if (!(array && array.length)) { - return result; - } - var index = -1, - indexes = [], - length = array.length; - - predicate = baseIteratee(predicate, 3); - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result.push(value); - indexes.push(index); - } - } - basePullAt(array, indexes); - return result; -} - -export default remove; diff --git a/node_modules/lodash-es/repeat.js b/node_modules/lodash-es/repeat.js deleted file mode 100644 index 353e98c..0000000 --- a/node_modules/lodash-es/repeat.js +++ /dev/null @@ -1,37 +0,0 @@ -import baseRepeat from './_baseRepeat.js'; -import isIterateeCall from './_isIterateeCall.js'; -import toInteger from './toInteger.js'; -import toString from './toString.js'; - -/** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=1] The number of times to repeat the string. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ -function repeat(string, n, guard) { - if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { - n = 1; - } else { - n = toInteger(n); - } - return baseRepeat(toString(string), n); -} - -export default repeat; diff --git a/node_modules/lodash-es/replace.js b/node_modules/lodash-es/replace.js deleted file mode 100644 index c14a169..0000000 --- a/node_modules/lodash-es/replace.js +++ /dev/null @@ -1,29 +0,0 @@ -import toString from './toString.js'; - -/** - * Replaces matches for `pattern` in `string` with `replacement`. - * - * **Note:** This method is based on - * [`String#replace`](https://mdn.io/String/replace). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to modify. - * @param {RegExp|string} pattern The pattern to replace. - * @param {Function|string} replacement The match replacement. - * @returns {string} Returns the modified string. - * @example - * - * _.replace('Hi Fred', 'Fred', 'Barney'); - * // => 'Hi Barney' - */ -function replace() { - var args = arguments, - string = toString(args[0]); - - return args.length < 3 ? string : string.replace(args[1], args[2]); -} - -export default replace; diff --git a/node_modules/lodash-es/rest.js b/node_modules/lodash-es/rest.js deleted file mode 100644 index c460425..0000000 --- a/node_modules/lodash-es/rest.js +++ /dev/null @@ -1,40 +0,0 @@ -import baseRest from './_baseRest.js'; -import toInteger from './toInteger.js'; - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as - * an array. - * - * **Note:** This method is based on the - * [rest parameter](https://mdn.io/rest_parameters). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.rest(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ -function rest(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start === undefined ? start : toInteger(start); - return baseRest(func, start); -} - -export default rest; diff --git a/node_modules/lodash-es/result.js b/node_modules/lodash-es/result.js deleted file mode 100644 index fe519c8..0000000 --- a/node_modules/lodash-es/result.js +++ /dev/null @@ -1,56 +0,0 @@ -import castPath from './_castPath.js'; -import isFunction from './isFunction.js'; -import toKey from './_toKey.js'; - -/** - * This method is like `_.get` except that if the resolved value is a - * function it's invoked with the `this` binding of its parent object and - * its result is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 - * - * _.result(object, 'a[0].b.c3', 'default'); - * // => 'default' - * - * _.result(object, 'a[0].b.c3', _.constant('default')); - * // => 'default' - */ -function result(object, path, defaultValue) { - path = castPath(path, object); - - var index = -1, - length = path.length; - - // Ensure the loop is entered when path is empty. - if (!length) { - length = 1; - object = undefined; - } - while (++index < length) { - var value = object == null ? undefined : object[toKey(path[index])]; - if (value === undefined) { - index = length; - value = defaultValue; - } - object = isFunction(value) ? value.call(object) : value; - } - return object; -} - -export default result; diff --git a/node_modules/lodash-es/reverse.js b/node_modules/lodash-es/reverse.js deleted file mode 100644 index 33156a2..0000000 --- a/node_modules/lodash-es/reverse.js +++ /dev/null @@ -1,34 +0,0 @@ -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeReverse = arrayProto.reverse; - -/** - * Reverses `array` so that the first element becomes the last, the second - * element becomes the second to last, and so on. - * - * **Note:** This method mutates `array` and is based on - * [`Array#reverse`](https://mdn.io/Array/reverse). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.reverse(array); - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ -function reverse(array) { - return array == null ? array : nativeReverse.call(array); -} - -export default reverse; diff --git a/node_modules/lodash-es/round.js b/node_modules/lodash-es/round.js deleted file mode 100644 index f4616dc..0000000 --- a/node_modules/lodash-es/round.js +++ /dev/null @@ -1,26 +0,0 @@ -import createRound from './_createRound.js'; - -/** - * Computes `number` rounded to `precision`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Math - * @param {number} number The number to round. - * @param {number} [precision=0] The precision to round to. - * @returns {number} Returns the rounded number. - * @example - * - * _.round(4.006); - * // => 4 - * - * _.round(4.006, 2); - * // => 4.01 - * - * _.round(4060, -2); - * // => 4100 - */ -var round = createRound('round'); - -export default round; diff --git a/node_modules/lodash-es/sample.js b/node_modules/lodash-es/sample.js deleted file mode 100644 index bebe569..0000000 --- a/node_modules/lodash-es/sample.js +++ /dev/null @@ -1,24 +0,0 @@ -import arraySample from './_arraySample.js'; -import baseSample from './_baseSample.js'; -import isArray from './isArray.js'; - -/** - * Gets a random element from `collection`. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. - * @example - * - * _.sample([1, 2, 3, 4]); - * // => 2 - */ -function sample(collection) { - var func = isArray(collection) ? arraySample : baseSample; - return func(collection); -} - -export default sample; diff --git a/node_modules/lodash-es/sampleSize.js b/node_modules/lodash-es/sampleSize.js deleted file mode 100644 index 152bedb..0000000 --- a/node_modules/lodash-es/sampleSize.js +++ /dev/null @@ -1,37 +0,0 @@ -import arraySampleSize from './_arraySampleSize.js'; -import baseSampleSize from './_baseSampleSize.js'; -import isArray from './isArray.js'; -import isIterateeCall from './_isIterateeCall.js'; -import toInteger from './toInteger.js'; - -/** - * Gets `n` random elements at unique keys from `collection` up to the - * size of `collection`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to sample. - * @param {number} [n=1] The number of elements to sample. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the random elements. - * @example - * - * _.sampleSize([1, 2, 3], 2); - * // => [3, 1] - * - * _.sampleSize([1, 2, 3], 4); - * // => [2, 3, 1] - */ -function sampleSize(collection, n, guard) { - if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { - n = 1; - } else { - n = toInteger(n); - } - var func = isArray(collection) ? arraySampleSize : baseSampleSize; - return func(collection, n); -} - -export default sampleSize; diff --git a/node_modules/lodash-es/seq.default.js b/node_modules/lodash-es/seq.default.js deleted file mode 100644 index c7c3207..0000000 --- a/node_modules/lodash-es/seq.default.js +++ /dev/null @@ -1,20 +0,0 @@ -import at from './wrapperAt.js'; -import chain from './chain.js'; -import commit from './commit.js'; -import lodash from './wrapperLodash.js'; -import next from './next.js'; -import plant from './plant.js'; -import reverse from './wrapperReverse.js'; -import tap from './tap.js'; -import thru from './thru.js'; -import toIterator from './toIterator.js'; -import toJSON from './toJSON.js'; -import value from './wrapperValue.js'; -import valueOf from './valueOf.js'; -import wrapperChain from './wrapperChain.js'; - -export default { - at, chain, commit, lodash, next, - plant, reverse, tap, thru, toIterator, - toJSON, value, valueOf, wrapperChain -}; diff --git a/node_modules/lodash-es/seq.js b/node_modules/lodash-es/seq.js deleted file mode 100644 index f679d30..0000000 --- a/node_modules/lodash-es/seq.js +++ /dev/null @@ -1,15 +0,0 @@ -export { default as at } from './wrapperAt.js'; -export { default as chain } from './chain.js'; -export { default as commit } from './commit.js'; -export { default as lodash } from './wrapperLodash.js'; -export { default as next } from './next.js'; -export { default as plant } from './plant.js'; -export { default as reverse } from './wrapperReverse.js'; -export { default as tap } from './tap.js'; -export { default as thru } from './thru.js'; -export { default as toIterator } from './toIterator.js'; -export { default as toJSON } from './toJSON.js'; -export { default as value } from './wrapperValue.js'; -export { default as valueOf } from './valueOf.js'; -export { default as wrapperChain } from './wrapperChain.js'; -export { default } from './seq.default.js'; diff --git a/node_modules/lodash-es/set.js b/node_modules/lodash-es/set.js deleted file mode 100644 index 15ed46e..0000000 --- a/node_modules/lodash-es/set.js +++ /dev/null @@ -1,35 +0,0 @@ -import baseSet from './_baseSet.js'; - -/** - * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, - * it's created. Arrays are created for missing index properties while objects - * are created for all other missing properties. Use `_.setWith` to customize - * `path` creation. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @returns {Object} Returns `object`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.set(object, 'a[0].b.c', 4); - * console.log(object.a[0].b.c); - * // => 4 - * - * _.set(object, ['x', '0', 'y', 'z'], 5); - * console.log(object.x[0].y.z); - * // => 5 - */ -function set(object, path, value) { - return object == null ? object : baseSet(object, path, value); -} - -export default set; diff --git a/node_modules/lodash-es/setWith.js b/node_modules/lodash-es/setWith.js deleted file mode 100644 index 963fcd8..0000000 --- a/node_modules/lodash-es/setWith.js +++ /dev/null @@ -1,32 +0,0 @@ -import baseSet from './_baseSet.js'; - -/** - * This method is like `_.set` except that it accepts `customizer` which is - * invoked to produce the objects of `path`. If `customizer` returns `undefined` - * path creation is handled by the method instead. The `customizer` is invoked - * with three arguments: (nsValue, key, nsObject). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * var object = {}; - * - * _.setWith(object, '[0][1]', 'a', Object); - * // => { '0': { '1': 'a' } } - */ -function setWith(object, path, value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return object == null ? object : baseSet(object, path, value, customizer); -} - -export default setWith; diff --git a/node_modules/lodash-es/shuffle.js b/node_modules/lodash-es/shuffle.js deleted file mode 100644 index 6907699..0000000 --- a/node_modules/lodash-es/shuffle.js +++ /dev/null @@ -1,25 +0,0 @@ -import arrayShuffle from './_arrayShuffle.js'; -import baseShuffle from './_baseShuffle.js'; -import isArray from './isArray.js'; - -/** - * Creates an array of shuffled values, using a version of the - * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - * @example - * - * _.shuffle([1, 2, 3, 4]); - * // => [4, 1, 3, 2] - */ -function shuffle(collection) { - var func = isArray(collection) ? arrayShuffle : baseShuffle; - return func(collection); -} - -export default shuffle; diff --git a/node_modules/lodash-es/size.js b/node_modules/lodash-es/size.js deleted file mode 100644 index b808aaa..0000000 --- a/node_modules/lodash-es/size.js +++ /dev/null @@ -1,46 +0,0 @@ -import baseKeys from './_baseKeys.js'; -import getTag from './_getTag.js'; -import isArrayLike from './isArrayLike.js'; -import isString from './isString.js'; -import stringSize from './_stringSize.js'; - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if (isArrayLike(collection)) { - return isString(collection) ? stringSize(collection) : collection.length; - } - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return baseKeys(collection).length; -} - -export default size; diff --git a/node_modules/lodash-es/slice.js b/node_modules/lodash-es/slice.js deleted file mode 100644 index 02d03d7..0000000 --- a/node_modules/lodash-es/slice.js +++ /dev/null @@ -1,37 +0,0 @@ -import baseSlice from './_baseSlice.js'; -import isIterateeCall from './_isIterateeCall.js'; -import toInteger from './toInteger.js'; - -/** - * Creates a slice of `array` from `start` up to, but not including, `end`. - * - * **Note:** This method is used instead of - * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are - * returned. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function slice(array, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { - start = 0; - end = length; - } - else { - start = start == null ? 0 : toInteger(start); - end = end === undefined ? length : toInteger(end); - } - return baseSlice(array, start, end); -} - -export default slice; diff --git a/node_modules/lodash-es/snakeCase.js b/node_modules/lodash-es/snakeCase.js deleted file mode 100644 index 83f1635..0000000 --- a/node_modules/lodash-es/snakeCase.js +++ /dev/null @@ -1,28 +0,0 @@ -import createCompounder from './_createCompounder.js'; - -/** - * Converts `string` to - * [snake case](https://en.wikipedia.org/wiki/Snake_case). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the snake cased string. - * @example - * - * _.snakeCase('Foo Bar'); - * // => 'foo_bar' - * - * _.snakeCase('fooBar'); - * // => 'foo_bar' - * - * _.snakeCase('--FOO-BAR--'); - * // => 'foo_bar' - */ -var snakeCase = createCompounder(function(result, word, index) { - return result + (index ? '_' : '') + word.toLowerCase(); -}); - -export default snakeCase; diff --git a/node_modules/lodash-es/some.js b/node_modules/lodash-es/some.js deleted file mode 100644 index 27f1996..0000000 --- a/node_modules/lodash-es/some.js +++ /dev/null @@ -1,51 +0,0 @@ -import arraySome from './_arraySome.js'; -import baseIteratee from './_baseIteratee.js'; -import baseSome from './_baseSome.js'; -import isArray from './isArray.js'; -import isIterateeCall from './_isIterateeCall.js'; - -/** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * Iteration is stopped once `predicate` returns truthy. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.some(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.some(users, 'active'); - * // => true - */ -function some(collection, predicate, guard) { - var func = isArray(collection) ? arraySome : baseSome; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, baseIteratee(predicate, 3)); -} - -export default some; diff --git a/node_modules/lodash-es/sortBy.js b/node_modules/lodash-es/sortBy.js deleted file mode 100644 index e37cd2c..0000000 --- a/node_modules/lodash-es/sortBy.js +++ /dev/null @@ -1,48 +0,0 @@ -import baseFlatten from './_baseFlatten.js'; -import baseOrderBy from './_baseOrderBy.js'; -import baseRest from './_baseRest.js'; -import isIterateeCall from './_isIterateeCall.js'; - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - */ -var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); -}); - -export default sortBy; diff --git a/node_modules/lodash-es/sortedIndex.js b/node_modules/lodash-es/sortedIndex.js deleted file mode 100644 index 5104d8d..0000000 --- a/node_modules/lodash-es/sortedIndex.js +++ /dev/null @@ -1,24 +0,0 @@ -import baseSortedIndex from './_baseSortedIndex.js'; - -/** - * Uses a binary search to determine the lowest index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedIndex([30, 50], 40); - * // => 1 - */ -function sortedIndex(array, value) { - return baseSortedIndex(array, value); -} - -export default sortedIndex; diff --git a/node_modules/lodash-es/sortedIndexBy.js b/node_modules/lodash-es/sortedIndexBy.js deleted file mode 100644 index b5ee6db..0000000 --- a/node_modules/lodash-es/sortedIndexBy.js +++ /dev/null @@ -1,33 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import baseSortedIndexBy from './_baseSortedIndexBy.js'; - -/** - * This method is like `_.sortedIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * var objects = [{ 'x': 4 }, { 'x': 5 }]; - * - * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); - * // => 0 - */ -function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2)); -} - -export default sortedIndexBy; diff --git a/node_modules/lodash-es/sortedIndexOf.js b/node_modules/lodash-es/sortedIndexOf.js deleted file mode 100644 index f9410d7..0000000 --- a/node_modules/lodash-es/sortedIndexOf.js +++ /dev/null @@ -1,31 +0,0 @@ -import baseSortedIndex from './_baseSortedIndex.js'; -import eq from './eq.js'; - -/** - * This method is like `_.indexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedIndexOf([4, 5, 5, 5, 6], 5); - * // => 1 - */ -function sortedIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value); - if (index < length && eq(array[index], value)) { - return index; - } - } - return -1; -} - -export default sortedIndexOf; diff --git a/node_modules/lodash-es/sortedLastIndex.js b/node_modules/lodash-es/sortedLastIndex.js deleted file mode 100644 index a9cdeee..0000000 --- a/node_modules/lodash-es/sortedLastIndex.js +++ /dev/null @@ -1,25 +0,0 @@ -import baseSortedIndex from './_baseSortedIndex.js'; - -/** - * This method is like `_.sortedIndex` except that it returns the highest - * index at which `value` should be inserted into `array` in order to - * maintain its sort order. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedLastIndex([4, 5, 5, 5, 6], 5); - * // => 4 - */ -function sortedLastIndex(array, value) { - return baseSortedIndex(array, value, true); -} - -export default sortedLastIndex; diff --git a/node_modules/lodash-es/sortedLastIndexBy.js b/node_modules/lodash-es/sortedLastIndexBy.js deleted file mode 100644 index bb84f81..0000000 --- a/node_modules/lodash-es/sortedLastIndexBy.js +++ /dev/null @@ -1,33 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import baseSortedIndexBy from './_baseSortedIndexBy.js'; - -/** - * This method is like `_.sortedLastIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * var objects = [{ 'x': 4 }, { 'x': 5 }]; - * - * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); - * // => 1 - * - * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); - * // => 1 - */ -function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2), true); -} - -export default sortedLastIndexBy; diff --git a/node_modules/lodash-es/sortedLastIndexOf.js b/node_modules/lodash-es/sortedLastIndexOf.js deleted file mode 100644 index 802ebe4..0000000 --- a/node_modules/lodash-es/sortedLastIndexOf.js +++ /dev/null @@ -1,31 +0,0 @@ -import baseSortedIndex from './_baseSortedIndex.js'; -import eq from './eq.js'; - -/** - * This method is like `_.lastIndexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); - * // => 3 - */ -function sortedLastIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value, true) - 1; - if (eq(array[index], value)) { - return index; - } - } - return -1; -} - -export default sortedLastIndexOf; diff --git a/node_modules/lodash-es/sortedUniq.js b/node_modules/lodash-es/sortedUniq.js deleted file mode 100644 index f0d1c56..0000000 --- a/node_modules/lodash-es/sortedUniq.js +++ /dev/null @@ -1,24 +0,0 @@ -import baseSortedUniq from './_baseSortedUniq.js'; - -/** - * This method is like `_.uniq` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.sortedUniq([1, 1, 2]); - * // => [1, 2] - */ -function sortedUniq(array) { - return (array && array.length) - ? baseSortedUniq(array) - : []; -} - -export default sortedUniq; diff --git a/node_modules/lodash-es/sortedUniqBy.js b/node_modules/lodash-es/sortedUniqBy.js deleted file mode 100644 index 48894fe..0000000 --- a/node_modules/lodash-es/sortedUniqBy.js +++ /dev/null @@ -1,26 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import baseSortedUniq from './_baseSortedUniq.js'; - -/** - * This method is like `_.uniqBy` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); - * // => [1.1, 2.3] - */ -function sortedUniqBy(array, iteratee) { - return (array && array.length) - ? baseSortedUniq(array, baseIteratee(iteratee, 2)) - : []; -} - -export default sortedUniqBy; diff --git a/node_modules/lodash-es/split.js b/node_modules/lodash-es/split.js deleted file mode 100644 index ad36812..0000000 --- a/node_modules/lodash-es/split.js +++ /dev/null @@ -1,52 +0,0 @@ -import baseToString from './_baseToString.js'; -import castSlice from './_castSlice.js'; -import hasUnicode from './_hasUnicode.js'; -import isIterateeCall from './_isIterateeCall.js'; -import isRegExp from './isRegExp.js'; -import stringToArray from './_stringToArray.js'; -import toString from './toString.js'; - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295; - -/** - * Splits `string` by `separator`. - * - * **Note:** This method is based on - * [`String#split`](https://mdn.io/String/split). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to split. - * @param {RegExp|string} separator The separator pattern to split by. - * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the string segments. - * @example - * - * _.split('a-b-c', '-', 2); - * // => ['a', 'b'] - */ -function split(string, separator, limit) { - if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { - separator = limit = undefined; - } - limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; - if (!limit) { - return []; - } - string = toString(string); - if (string && ( - typeof separator == 'string' || - (separator != null && !isRegExp(separator)) - )) { - separator = baseToString(separator); - if (!separator && hasUnicode(string)) { - return castSlice(stringToArray(string), 0, limit); - } - } - return string.split(separator, limit); -} - -export default split; diff --git a/node_modules/lodash-es/spread.js b/node_modules/lodash-es/spread.js deleted file mode 100644 index 3fb8b23..0000000 --- a/node_modules/lodash-es/spread.js +++ /dev/null @@ -1,63 +0,0 @@ -import apply from './_apply.js'; -import arrayPush from './_arrayPush.js'; -import baseRest from './_baseRest.js'; -import castSlice from './_castSlice.js'; -import toInteger from './toInteger.js'; - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that invokes `func` with the `this` binding of the - * create function and an array of arguments much like - * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). - * - * **Note:** This method is based on the - * [spread operator](https://mdn.io/spread_operator). - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Function - * @param {Function} func The function to spread arguments over. - * @param {number} [start=0] The start position of the spread. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.spread(function(who, what) { - * return who + ' says ' + what; - * }); - * - * say(['fred', 'hello']); - * // => 'fred says hello' - * - * var numbers = Promise.all([ - * Promise.resolve(40), - * Promise.resolve(36) - * ]); - * - * numbers.then(_.spread(function(x, y) { - * return x + y; - * })); - * // => a Promise of 76 - */ -function spread(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start == null ? 0 : nativeMax(toInteger(start), 0); - return baseRest(function(args) { - var array = args[start], - otherArgs = castSlice(args, 0, start); - - if (array) { - arrayPush(otherArgs, array); - } - return apply(func, this, otherArgs); - }); -} - -export default spread; diff --git a/node_modules/lodash-es/startCase.js b/node_modules/lodash-es/startCase.js deleted file mode 100644 index 17f9cde..0000000 --- a/node_modules/lodash-es/startCase.js +++ /dev/null @@ -1,29 +0,0 @@ -import createCompounder from './_createCompounder.js'; -import upperFirst from './upperFirst.js'; - -/** - * Converts `string` to - * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). - * - * @static - * @memberOf _ - * @since 3.1.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the start cased string. - * @example - * - * _.startCase('--foo-bar--'); - * // => 'Foo Bar' - * - * _.startCase('fooBar'); - * // => 'Foo Bar' - * - * _.startCase('__FOO_BAR__'); - * // => 'FOO BAR' - */ -var startCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + upperFirst(word); -}); - -export default startCase; diff --git a/node_modules/lodash-es/startsWith.js b/node_modules/lodash-es/startsWith.js deleted file mode 100644 index 19ca033..0000000 --- a/node_modules/lodash-es/startsWith.js +++ /dev/null @@ -1,39 +0,0 @@ -import baseClamp from './_baseClamp.js'; -import baseToString from './_baseToString.js'; -import toInteger from './toInteger.js'; -import toString from './toString.js'; - -/** - * Checks if `string` starts with the given target string. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=0] The position to search from. - * @returns {boolean} Returns `true` if `string` starts with `target`, - * else `false`. - * @example - * - * _.startsWith('abc', 'a'); - * // => true - * - * _.startsWith('abc', 'b'); - * // => false - * - * _.startsWith('abc', 'b', 1); - * // => true - */ -function startsWith(string, target, position) { - string = toString(string); - position = position == null - ? 0 - : baseClamp(toInteger(position), 0, string.length); - - target = baseToString(target); - return string.slice(position, position + target.length) == target; -} - -export default startsWith; diff --git a/node_modules/lodash-es/string.default.js b/node_modules/lodash-es/string.default.js deleted file mode 100644 index 7a23a64..0000000 --- a/node_modules/lodash-es/string.default.js +++ /dev/null @@ -1,41 +0,0 @@ -import camelCase from './camelCase.js'; -import capitalize from './capitalize.js'; -import deburr from './deburr.js'; -import endsWith from './endsWith.js'; -import escape from './escape.js'; -import escapeRegExp from './escapeRegExp.js'; -import kebabCase from './kebabCase.js'; -import lowerCase from './lowerCase.js'; -import lowerFirst from './lowerFirst.js'; -import pad from './pad.js'; -import padEnd from './padEnd.js'; -import padStart from './padStart.js'; -import parseInt from './parseInt.js'; -import repeat from './repeat.js'; -import replace from './replace.js'; -import snakeCase from './snakeCase.js'; -import split from './split.js'; -import startCase from './startCase.js'; -import startsWith from './startsWith.js'; -import template from './template.js'; -import templateSettings from './templateSettings.js'; -import toLower from './toLower.js'; -import toUpper from './toUpper.js'; -import trim from './trim.js'; -import trimEnd from './trimEnd.js'; -import trimStart from './trimStart.js'; -import truncate from './truncate.js'; -import unescape from './unescape.js'; -import upperCase from './upperCase.js'; -import upperFirst from './upperFirst.js'; -import words from './words.js'; - -export default { - camelCase, capitalize, deburr, endsWith, escape, - escapeRegExp, kebabCase, lowerCase, lowerFirst, pad, - padEnd, padStart, parseInt, repeat, replace, - snakeCase, split, startCase, startsWith, template, - templateSettings, toLower, toUpper, trim, trimEnd, - trimStart, truncate, unescape, upperCase, upperFirst, - words -}; diff --git a/node_modules/lodash-es/string.js b/node_modules/lodash-es/string.js deleted file mode 100644 index 2534e7c..0000000 --- a/node_modules/lodash-es/string.js +++ /dev/null @@ -1,32 +0,0 @@ -export { default as camelCase } from './camelCase.js'; -export { default as capitalize } from './capitalize.js'; -export { default as deburr } from './deburr.js'; -export { default as endsWith } from './endsWith.js'; -export { default as escape } from './escape.js'; -export { default as escapeRegExp } from './escapeRegExp.js'; -export { default as kebabCase } from './kebabCase.js'; -export { default as lowerCase } from './lowerCase.js'; -export { default as lowerFirst } from './lowerFirst.js'; -export { default as pad } from './pad.js'; -export { default as padEnd } from './padEnd.js'; -export { default as padStart } from './padStart.js'; -export { default as parseInt } from './parseInt.js'; -export { default as repeat } from './repeat.js'; -export { default as replace } from './replace.js'; -export { default as snakeCase } from './snakeCase.js'; -export { default as split } from './split.js'; -export { default as startCase } from './startCase.js'; -export { default as startsWith } from './startsWith.js'; -export { default as template } from './template.js'; -export { default as templateSettings } from './templateSettings.js'; -export { default as toLower } from './toLower.js'; -export { default as toUpper } from './toUpper.js'; -export { default as trim } from './trim.js'; -export { default as trimEnd } from './trimEnd.js'; -export { default as trimStart } from './trimStart.js'; -export { default as truncate } from './truncate.js'; -export { default as unescape } from './unescape.js'; -export { default as upperCase } from './upperCase.js'; -export { default as upperFirst } from './upperFirst.js'; -export { default as words } from './words.js'; -export { default } from './string.default.js'; diff --git a/node_modules/lodash-es/stubArray.js b/node_modules/lodash-es/stubArray.js deleted file mode 100644 index b2b5503..0000000 --- a/node_modules/lodash-es/stubArray.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -export default stubArray; diff --git a/node_modules/lodash-es/stubFalse.js b/node_modules/lodash-es/stubFalse.js deleted file mode 100644 index c569c25..0000000 --- a/node_modules/lodash-es/stubFalse.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} - -export default stubFalse; diff --git a/node_modules/lodash-es/stubObject.js b/node_modules/lodash-es/stubObject.js deleted file mode 100644 index f634824..0000000 --- a/node_modules/lodash-es/stubObject.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This method returns a new empty object. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Object} Returns the new empty object. - * @example - * - * var objects = _.times(2, _.stubObject); - * - * console.log(objects); - * // => [{}, {}] - * - * console.log(objects[0] === objects[1]); - * // => false - */ -function stubObject() { - return {}; -} - -export default stubObject; diff --git a/node_modules/lodash-es/stubString.js b/node_modules/lodash-es/stubString.js deleted file mode 100644 index 783b57c..0000000 --- a/node_modules/lodash-es/stubString.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This method returns an empty string. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {string} Returns the empty string. - * @example - * - * _.times(2, _.stubString); - * // => ['', ''] - */ -function stubString() { - return ''; -} - -export default stubString; diff --git a/node_modules/lodash-es/stubTrue.js b/node_modules/lodash-es/stubTrue.js deleted file mode 100644 index 405a29d..0000000 --- a/node_modules/lodash-es/stubTrue.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This method returns `true`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `true`. - * @example - * - * _.times(2, _.stubTrue); - * // => [true, true] - */ -function stubTrue() { - return true; -} - -export default stubTrue; diff --git a/node_modules/lodash-es/subtract.js b/node_modules/lodash-es/subtract.js deleted file mode 100644 index c2ca691..0000000 --- a/node_modules/lodash-es/subtract.js +++ /dev/null @@ -1,22 +0,0 @@ -import createMathOperation from './_createMathOperation.js'; - -/** - * Subtract two numbers. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {number} minuend The first number in a subtraction. - * @param {number} subtrahend The second number in a subtraction. - * @returns {number} Returns the difference. - * @example - * - * _.subtract(6, 4); - * // => 2 - */ -var subtract = createMathOperation(function(minuend, subtrahend) { - return minuend - subtrahend; -}, 0); - -export default subtract; diff --git a/node_modules/lodash-es/sum.js b/node_modules/lodash-es/sum.js deleted file mode 100644 index 708254b..0000000 --- a/node_modules/lodash-es/sum.js +++ /dev/null @@ -1,24 +0,0 @@ -import baseSum from './_baseSum.js'; -import identity from './identity.js'; - -/** - * Computes the sum of the values in `array`. - * - * @static - * @memberOf _ - * @since 3.4.0 - * @category Math - * @param {Array} array The array to iterate over. - * @returns {number} Returns the sum. - * @example - * - * _.sum([4, 2, 8, 6]); - * // => 20 - */ -function sum(array) { - return (array && array.length) - ? baseSum(array, identity) - : 0; -} - -export default sum; diff --git a/node_modules/lodash-es/sumBy.js b/node_modules/lodash-es/sumBy.js deleted file mode 100644 index 6828c16..0000000 --- a/node_modules/lodash-es/sumBy.js +++ /dev/null @@ -1,33 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import baseSum from './_baseSum.js'; - -/** - * This method is like `_.sum` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the value to be summed. - * The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the sum. - * @example - * - * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; - * - * _.sumBy(objects, function(o) { return o.n; }); - * // => 20 - * - * // The `_.property` iteratee shorthand. - * _.sumBy(objects, 'n'); - * // => 20 - */ -function sumBy(array, iteratee) { - return (array && array.length) - ? baseSum(array, baseIteratee(iteratee, 2)) - : 0; -} - -export default sumBy; diff --git a/node_modules/lodash-es/tail.js b/node_modules/lodash-es/tail.js deleted file mode 100644 index d8b9796..0000000 --- a/node_modules/lodash-es/tail.js +++ /dev/null @@ -1,22 +0,0 @@ -import baseSlice from './_baseSlice.js'; - -/** - * Gets all but the first element of `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.tail([1, 2, 3]); - * // => [2, 3] - */ -function tail(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 1, length) : []; -} - -export default tail; diff --git a/node_modules/lodash-es/take.js b/node_modules/lodash-es/take.js deleted file mode 100644 index f8fef31..0000000 --- a/node_modules/lodash-es/take.js +++ /dev/null @@ -1,37 +0,0 @@ -import baseSlice from './_baseSlice.js'; -import toInteger from './toInteger.js'; - -/** - * Creates a slice of `array` with `n` elements taken from the beginning. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.take([1, 2, 3]); - * // => [1] - * - * _.take([1, 2, 3], 2); - * // => [1, 2] - * - * _.take([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.take([1, 2, 3], 0); - * // => [] - */ -function take(array, n, guard) { - if (!(array && array.length)) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, 0, n < 0 ? 0 : n); -} - -export default take; diff --git a/node_modules/lodash-es/takeRight.js b/node_modules/lodash-es/takeRight.js deleted file mode 100644 index 36399de..0000000 --- a/node_modules/lodash-es/takeRight.js +++ /dev/null @@ -1,39 +0,0 @@ -import baseSlice from './_baseSlice.js'; -import toInteger from './toInteger.js'; - -/** - * Creates a slice of `array` with `n` elements taken from the end. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeRight([1, 2, 3]); - * // => [3] - * - * _.takeRight([1, 2, 3], 2); - * // => [2, 3] - * - * _.takeRight([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.takeRight([1, 2, 3], 0); - * // => [] - */ -function takeRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, n < 0 ? 0 : n, length); -} - -export default takeRight; diff --git a/node_modules/lodash-es/takeRightWhile.js b/node_modules/lodash-es/takeRightWhile.js deleted file mode 100644 index 6424543..0000000 --- a/node_modules/lodash-es/takeRightWhile.js +++ /dev/null @@ -1,45 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import baseWhile from './_baseWhile.js'; - -/** - * Creates a slice of `array` with elements taken from the end. Elements are - * taken until `predicate` returns falsey. The predicate is invoked with - * three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.takeRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.takeRightWhile(users, ['active', false]); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.property` iteratee shorthand. - * _.takeRightWhile(users, 'active'); - * // => [] - */ -function takeRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, baseIteratee(predicate, 3), false, true) - : []; -} - -export default takeRightWhile; diff --git a/node_modules/lodash-es/takeWhile.js b/node_modules/lodash-es/takeWhile.js deleted file mode 100644 index f220a6e..0000000 --- a/node_modules/lodash-es/takeWhile.js +++ /dev/null @@ -1,45 +0,0 @@ -import baseIteratee from './_baseIteratee.js'; -import baseWhile from './_baseWhile.js'; - -/** - * Creates a slice of `array` with elements taken from the beginning. Elements - * are taken until `predicate` returns falsey. The predicate is invoked with - * three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.takeWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matches` iteratee shorthand. - * _.takeWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.takeWhile(users, ['active', false]); - * // => objects for ['barney', 'fred'] - * - * // The `_.property` iteratee shorthand. - * _.takeWhile(users, 'active'); - * // => [] - */ -function takeWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, baseIteratee(predicate, 3)) - : []; -} - -export default takeWhile; diff --git a/node_modules/lodash-es/tap.js b/node_modules/lodash-es/tap.js deleted file mode 100644 index 464367c..0000000 --- a/node_modules/lodash-es/tap.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This method invokes `interceptor` and returns `value`. The interceptor - * is invoked with one argument; (value). The purpose of this method is to - * "tap into" a method chain sequence in order to modify intermediate results. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns `value`. - * @example - * - * _([1, 2, 3]) - * .tap(function(array) { - * // Mutate input array. - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] - */ -function tap(value, interceptor) { - interceptor(value); - return value; -} - -export default tap; diff --git a/node_modules/lodash-es/template.js b/node_modules/lodash-es/template.js deleted file mode 100644 index 1787347..0000000 --- a/node_modules/lodash-es/template.js +++ /dev/null @@ -1,238 +0,0 @@ -import assignInWith from './assignInWith.js'; -import attempt from './attempt.js'; -import baseValues from './_baseValues.js'; -import customDefaultsAssignIn from './_customDefaultsAssignIn.js'; -import escapeStringChar from './_escapeStringChar.js'; -import isError from './isError.js'; -import isIterateeCall from './_isIterateeCall.js'; -import keys from './keys.js'; -import reInterpolate from './_reInterpolate.js'; -import templateSettings from './templateSettings.js'; -import toString from './toString.js'; - -/** Used to match empty string literals in compiled template source. */ -var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - -/** - * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). - */ -var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - -/** Used to ensure capturing order of template delimiters. */ -var reNoMatch = /($^)/; - -/** Used to match unescaped characters in compiled string literals. */ -var reUnescapedString = /['\n\r\u2028\u2029\\]/g; - -/** - * Creates a compiled template function that can interpolate data properties - * in "interpolate" delimiters, HTML-escape interpolated data properties in - * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data - * properties may be accessed as free variables in the template. If a setting - * object is given, it takes precedence over `_.templateSettings` values. - * - * **Note:** In the development build `_.template` utilizes - * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) - * for easier debugging. - * - * For more information on precompiling templates see - * [lodash's custom builds documentation](https://lodash.com/custom-builds). - * - * For more information on Chrome extension sandboxes see - * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The template string. - * @param {Object} [options={}] The options object. - * @param {RegExp} [options.escape=_.templateSettings.escape] - * The HTML "escape" delimiter. - * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] - * The "evaluate" delimiter. - * @param {Object} [options.imports=_.templateSettings.imports] - * An object to import into the template as free variables. - * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] - * The "interpolate" delimiter. - * @param {string} [options.sourceURL='templateSources[n]'] - * The sourceURL of the compiled template. - * @param {string} [options.variable='obj'] - * The data object variable name. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the compiled template function. - * @example - * - * // Use the "interpolate" delimiter to create a compiled template. - * var compiled = _.template('hello <%= user %>!'); - * compiled({ 'user': 'fred' }); - * // => 'hello fred!' - * - * // Use the HTML "escape" delimiter to escape data property values. - * var compiled = _.template('<%- value %>'); - * compiled({ 'value': ' -``` - -or the minified version: - -```html - -``` - -or from a CDN, either cdnjs: - -```html - -``` - -or one of the below links from [jsDelivr](http://jsdelivr.com): - -```html - - - -``` - -(note that using `latest` is taking a significant risk that ramda API changes could break your code.) - -These script tags add the variable `R` on the browser's global scope. - -Or you can inject ramda into virtually any unsuspecting website using [the bookmarklet](https://github.com/ramda/ramda/blob/master/BOOKMARKLET.md). - -### Build - -* on Unix-based platforms, `npm run build` updates __dist/ramda.js__ and __dist/ramda.min.js__ -* on Windows, write the output of `scripts/build --complete` to a temporary file, then rename the temporary file __dist/ramda.js__. - -#### Partial Builds - -It is possible to build Ramda with a subset of the functionality to reduce its file size. Ramda's build system supports this with command line flags. For example if you're using `R.compose`, `R.reduce`, and `R.filter` you can create a partial build with: - - ./scripts/build -- src/compose.js src/reduce.js src/filter.js > dist/ramda.custom.js - -This requires having Node/io.js installed. - -Documentation -------------- - -Please review the [API documentation](http://ramdajs.com/docs/). - -The Name --------- - -Ok, so we like sheep. That's all. It's a short name, not already -taken. It could as easily have been `eweda`, but then we would be -forced to say _eweda lamb!_, and no one wants that. For non-English -speakers, lambs are baby sheep, ewes are female sheep, and rams are male -sheep. So perhaps ramda is a grown-up lambda... but probably not. - - - - -Running The Test Suite ----------------------- - -**Console:** - -To run the test suite from the console, you need to have `mocha` installed: - - npm install -g mocha - -Then from the root of the project, you can just call - - mocha - -Alternately, if you've installed the dependencies, via: - - npm install - -then you can run the tests (and get detailed output) by running: - - npm test - -**Browser:** - -You can use [testem](https://github.com/airportyh/testem) to -test across different browsers (or even headlessly), with livereloading of -tests. Install testem (`npm install -g testem`) and run `testem`. Open the -link provided in your browser and you will see the results in your terminal. - -If you have _PhantomJS_ installed, you can run `testem -l phantomjs` to run the -tests completely headlessly. - - -Translations ------------------ - -[Chinese(中文)](http://ramda.cn/) - - -Acknowledgements ------------------ - -Thanks to [J. C. Phillipps](http://www.jcphillipps.com) for the Ramda logo. -Ramda logo artwork © 2014 J. C. Phillipps. Licensed Creative Commons -[CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/). diff --git a/node_modules/ramda/dist/ramda.js b/node_modules/ramda/dist/ramda.js deleted file mode 100644 index d470abc..0000000 --- a/node_modules/ramda/dist/ramda.js +++ /dev/null @@ -1,9398 +0,0 @@ -// Ramda v0.24.1 -// https://github.com/ramda/ramda -// (c) 2013-2017 Scott Sauyet, Michael Hurley, and David Chambers -// Ramda may be freely distributed under the MIT license. - -;(function() { - - 'use strict'; - - /** - * A special placeholder value used to specify "gaps" within curried functions, - * allowing partial application of any combination of arguments, regardless of - * their positions. - * - * If `g` is a curried ternary function and `_` is `R.__`, the following are - * equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2, _)(1, 3)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @constant - * @memberOf R - * @since v0.6.0 - * @category Function - * @example - * - * var greet = R.replace('{name}', R.__, 'Hello, {name}!'); - * greet('Alice'); //=> 'Hello, Alice!' - */ - var __ = { '@@functional/placeholder': true }; - - var _aperture = 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; - }; - - /* eslint-disable no-unused-vars */ - var _arity = 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'); - } - }; - - var _arrayFromIterator = function _arrayFromIterator(iter) { - var list = []; - var next; - while (!(next = iter.next()).done) { - list.push(next.value); - } - return list; - }; - - var _cloneRegExp = function _cloneRegExp(pattern) { - return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : '')); - }; - - var _complement = function _complement(f) { - return function () { - return !f.apply(this, arguments); - }; - }; - - /** - * 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] - */ - var _concat = 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; - }; - - var _containsWith = function _containsWith(pred, x, list) { - var idx = 0; - var len = list.length; - while (idx < len) { - if (pred(x, list[idx])) { - return true; - } - idx += 1; - } - return false; - }; - - var _dropLastWhile = function dropLastWhile(pred, list) { - var idx = list.length - 1; - while (idx >= 0 && pred(list[idx])) { - idx -= 1; - } - return Array.prototype.slice.call(list, 0, idx + 1); - }; - - var _filter = 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; - }; - - var _forceReduced = function _forceReduced(x) { - return { - '@@transducer/value': x, - '@@transducer/reduced': true - }; - }; - - // String(x => x) evaluates to "x => x", so the pattern may not match. - var _functionName = 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]; - }; - - var _has = function _has(prop, obj) { - return Object.prototype.hasOwnProperty.call(obj, prop); - }; - - var _identity = function _identity(x) { - return x; - }; - - var _isArguments = function () { - var toString = Object.prototype.toString; - return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) { - return toString.call(x) === '[object Arguments]'; - } : function _isArguments(x) { - return _has('callee', x); - }; - }(); - - /** - * 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 - */ - var _isArray = Array.isArray || function _isArray(val) { - return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]'; - }; - - var _isFunction = function _isFunction(x) { - return Object.prototype.toString.call(x) === '[object Function]'; - }; - - /** - * Determine if the passed argument is an integer. - * - * @private - * @param {*} n - * @category Type - * @return {Boolean} - */ - var _isInteger = Number.isInteger || function _isInteger(n) { - return n << 0 === n; - }; - - var _isNumber = function _isNumber(x) { - return Object.prototype.toString.call(x) === '[object Number]'; - }; - - var _isObject = function _isObject(x) { - return Object.prototype.toString.call(x) === '[object Object]'; - }; - - var _isPlaceholder = function _isPlaceholder(a) { - return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true; - }; - - var _isRegExp = function _isRegExp(x) { - return Object.prototype.toString.call(x) === '[object RegExp]'; - }; - - var _isString = function _isString(x) { - return Object.prototype.toString.call(x) === '[object String]'; - }; - - var _isTransformer = function _isTransformer(obj) { - return typeof obj['@@transducer/step'] === 'function'; - }; - - var _map = 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; - }; - - // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign - var _objectAssign = 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; - }; - - var _of = function _of(x) { - return [x]; - }; - - var _pipe = function _pipe(f, g) { - return function () { - return g.call(this, f.apply(this, arguments)); - }; - }; - - var _pipeP = function _pipeP(f, g) { - return function () { - var ctx = this; - return f.apply(ctx, arguments).then(function (x) { - return g.call(ctx, x); - }); - }; - }; - - // \b matches word boundary; [\b] matches backspace - var _quote = 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, '\\"') + '"'; - }; - - var _reduced = function _reduced(x) { - return x && x['@@transducer/reduced'] ? x : { - '@@transducer/value': x, - '@@transducer/reduced': true - }; - }; - - /** - * Polyfill from . - */ - var _toISOString = function () { - var pad = function pad(n) { - return (n < 10 ? '0' : '') + n; - }; - return 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'; - }; - }(); - - var _xfBase = { - init: function () { - return this.xf['@@transducer/init'](); - }, - result: function (result) { - return this.xf['@@transducer/result'](result); - } - }; - - var _xwrap = 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 function _xwrap(fn) { - return new XWrap(fn); - }; - }(); - - var _assign = typeof Object.assign === 'function' ? Object.assign : _objectAssign; - - /** - * 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. - */ - var _checkForMethod = 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)); - }; - }; - - /** - * Optimized internal one-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - var _curry1 = function _curry1(fn) { - return function f1(a) { - if (arguments.length === 0 || _isPlaceholder(a)) { - return f1; - } else { - return fn.apply(this, arguments); - } - }; - }; - - /** - * Optimized internal two-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - var _curry2 = 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); - } - }; - }; - - /** - * Optimized internal three-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - var _curry3 = 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); - } - }; - }; - - /** - * 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. - */ - var _curryN = 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)); - }; - }; - - /** - * 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 - */ - var _dispatchable = 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); - }; - }; - - /** - * 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 = _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; - }); - - /** - * `_makeFlat` is a helper function that returns a one-level or fully recursive - * function based on the flag passed in. - * - * @private - */ - var _makeFlat = 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; - }; - }; - - var _xall = 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 _curry2(function _xall(f, xf) { - return new XAll(f, xf); - }); - }(); - - var _xany = 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 _curry2(function _xany(f, xf) { - return new XAny(f, xf); - }); - }(); - - var _xaperture = 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 _curry2(function _xaperture(n, xf) { - return new XAperture(n, xf); - }); - }(); - - var _xdrop = 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 _curry2(function _xdrop(n, xf) { - return new XDrop(n, xf); - }); - }(); - - var _xdropLast = 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 _curry2(function _xdropLast(n, xf) { - return new XDropLast(n, xf); - }); - }(); - - var _xdropRepeatsWith = 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 _curry2(function _xdropRepeatsWith(pred, xf) { - return new XDropRepeatsWith(pred, xf); - }); - }(); - - var _xdropWhile = 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 _curry2(function _xdropWhile(f, xf) { - return new XDropWhile(f, xf); - }); - }(); - - var _xfilter = 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 _curry2(function _xfilter(f, xf) { - return new XFilter(f, xf); - }); - }(); - - var _xfind = 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 _curry2(function _xfind(f, xf) { - return new XFind(f, xf); - }); - }(); - - var _xfindIndex = 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 _curry2(function _xfindIndex(f, xf) { - return new XFindIndex(f, xf); - }); - }(); - - var _xfindLast = 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 _curry2(function _xfindLast(f, xf) { - return new XFindLast(f, xf); - }); - }(); - - var _xfindLastIndex = 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 _curry2(function _xfindLastIndex(f, xf) { - return new XFindLastIndex(f, xf); - }); - }(); - - var _xmap = 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 _curry2(function _xmap(f, xf) { - return new XMap(f, xf); - }); - }(); - - var _xreduceBy = 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 _curryN(4, [], function _xreduceBy(valueFn, valueAcc, keyFn, xf) { - return new XReduceBy(valueFn, valueAcc, keyFn, xf); - }); - }(); - - var _xtake = 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 _curry2(function _xtake(n, xf) { - return new XTake(n, xf); - }); - }(); - - var _xtakeWhile = 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 _curry2(function _xtakeWhile(f, xf) { - return new XTakeWhile(f, xf); - }); - }(); - - /** - * Adds two values. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a - * @param {Number} b - * @return {Number} - * @see R.subtract - * @example - * - * R.add(2, 3); //=> 5 - * R.add(7)(10); //=> 17 - */ - var add = _curry2(function add(a, b) { - return Number(a) + Number(b); - }); - - /** - * Applies a function to the value at the given index of an array, returning a - * new copy of the array with the element at the given index replaced with the - * result of the function application. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig (a -> a) -> Number -> [a] -> [a] - * @param {Function} fn The function to apply. - * @param {Number} idx The index. - * @param {Array|Arguments} list An array-like object whose value - * at the supplied index will be replaced. - * @return {Array} A copy of the supplied array-like object with - * the element at index `idx` replaced with the value - * returned by applying `fn` to the existing element. - * @see R.update - * @example - * - * R.adjust(R.add(10), 1, [1, 2, 3]); //=> [1, 12, 3] - * R.adjust(R.add(10))(1)([1, 2, 3]); //=> [1, 12, 3] - * @symb R.adjust(f, -1, [a, b]) = [a, f(b)] - * @symb R.adjust(f, 0, [a, b]) = [f(a), b] - */ - var adjust = _curry3(function adjust(fn, idx, list) { - if (idx >= list.length || idx < -list.length) { - return list; - } - var start = idx < 0 ? list.length : 0; - var _idx = start + idx; - var _list = _concat(list); - _list[_idx] = fn(list[_idx]); - return _list; - }); - - /** - * Returns `true` if all elements of the list match the predicate, `false` if - * there are any that don't. - * - * Dispatches to the `all` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by every element, `false` - * otherwise. - * @see R.any, R.none, R.transduce - * @example - * - * var equals3 = R.equals(3); - * R.all(equals3)([3, 3, 3, 3]); //=> true - * R.all(equals3)([3, 3, 1, 3]); //=> false - */ - var all = _curry2(_dispatchable(['all'], _xall, function all(fn, list) { - var idx = 0; - while (idx < list.length) { - if (!fn(list[idx])) { - return false; - } - idx += 1; - } - return true; - })); - - /** - * Returns a function that always returns the given value. Note that for - * non-primitives the value returned is a reference to the original value. - * - * This function is known as `const`, `constant`, or `K` (for K combinator) in - * other languages and libraries. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig a -> (* -> a) - * @param {*} val The value to wrap in a function - * @return {Function} A Function :: * -> val. - * @example - * - * var t = R.always('Tee'); - * t(); //=> 'Tee' - */ - var always = _curry1(function always(val) { - return function () { - return val; - }; - }); - - /** - * Returns `true` if both arguments are `true`; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> b -> a | b - * @param {Any} a - * @param {Any} b - * @return {Any} the first argument if it is falsy, otherwise the second argument. - * @see R.both - * @example - * - * R.and(true, true); //=> true - * R.and(true, false); //=> false - * R.and(false, true); //=> false - * R.and(false, false); //=> false - */ - var and = _curry2(function and(a, b) { - return a && b; - }); - - /** - * Returns `true` if at least one of elements of the list match the predicate, - * `false` otherwise. - * - * Dispatches to the `any` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` - * otherwise. - * @see R.all, R.none, R.transduce - * @example - * - * var lessThan0 = R.flip(R.lt)(0); - * var lessThan2 = R.flip(R.lt)(2); - * R.any(lessThan0)([1, 2]); //=> false - * R.any(lessThan2)([1, 2]); //=> true - */ - var any = _curry2(_dispatchable(['any'], _xany, function any(fn, list) { - var idx = 0; - while (idx < list.length) { - if (fn(list[idx])) { - return true; - } - idx += 1; - } - return false; - })); - - /** - * Returns a new list, composed of n-tuples of consecutive elements. If `n` is - * greater than the length of the list, an empty list is returned. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig Number -> [a] -> [[a]] - * @param {Number} n The size of the tuples to create - * @param {Array} list The list to split into `n`-length tuples - * @return {Array} The resulting list of `n`-length tuples - * @see R.transduce - * @example - * - * R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]] - * R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]] - * R.aperture(7, [1, 2, 3, 4, 5]); //=> [] - */ - var aperture = _curry2(_dispatchable([], _xaperture, _aperture)); - - /** - * Returns a new list containing the contents of the given list, followed by - * the given element. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} el The element to add to the end of the new list. - * @param {Array} list The list of elements to add a new item to. - * list. - * @return {Array} A new list containing the elements of the old list followed by `el`. - * @see R.prepend - * @example - * - * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests'] - * R.append('tests', []); //=> ['tests'] - * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']] - */ - var append = _curry2(function append(el, list) { - return _concat(list, [el]); - }); - - /** - * Applies function `fn` to the argument list `args`. This is useful for - * creating a fixed-arity function from a variadic function. `fn` should be a - * bound function if context is significant. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> a) -> [*] -> a - * @param {Function} fn The function which will be called with `args` - * @param {Array} args The arguments to call `fn` with - * @return {*} result The result, equivalent to `fn(...args)` - * @see R.call, R.unapply - * @example - * - * var nums = [1, 2, 3, -99, 42, 6, 7]; - * R.apply(Math.max, nums); //=> 42 - * @symb R.apply(f, [a, b, c]) = f(a, b, c) - */ - var apply = _curry2(function apply(fn, args) { - return fn.apply(this, args); - }); - - /** - * Makes an ascending comparator function out of a function that returns a value - * that can be compared with `<` and `>`. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Function - * @sig Ord b => (a -> b) -> a -> a -> Number - * @param {Function} fn A function of arity one that returns a value that can be compared - * @param {*} a The first item to be compared. - * @param {*} b The second item to be compared. - * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0` - * @see R.descend - * @example - * - * var byAge = R.ascend(R.prop('age')); - * var people = [ - * // ... - * ]; - * var peopleByYoungestFirst = R.sort(byAge, people); - */ - var ascend = _curry3(function ascend(fn, a, b) { - var aa = fn(a); - var bb = fn(b); - return aa < bb ? -1 : aa > bb ? 1 : 0; - }); - - /** - * Makes a shallow clone of an object, setting or overriding the specified - * property with the given value. Note that this copies and flattens prototype - * properties onto the new object as well. All non-primitive properties are - * copied by reference. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @sig String -> a -> {k: v} -> {k: v} - * @param {String} prop The property name to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except for the changed property. - * @see R.dissoc - * @example - * - * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} - */ - var assoc = _curry3(function assoc(prop, val, obj) { - var result = {}; - for (var p in obj) { - result[p] = obj[p]; - } - result[prop] = val; - return result; - }); - - /** - * Creates a function that is bound to a context. - * Note: `R.bind` does not provide the additional argument-binding capabilities of - * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Function - * @category Object - * @sig (* -> *) -> {*} -> (* -> *) - * @param {Function} fn The function to bind to context - * @param {Object} thisObj The context to bind `fn` to - * @return {Function} A function that will execute in the context of `thisObj`. - * @see R.partial - * @example - * - * var log = R.bind(console.log, console); - * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3} - * // logs {a: 2} - * @symb R.bind(f, o)(a, b) = f.call(o, a, b) - */ - var bind = _curry2(function bind(fn, thisObj) { - return _arity(fn.length, function () { - return fn.apply(thisObj, arguments); - }); - }); - - /** - * Restricts a number to be within a range. - * - * Also works for other ordered types such as Strings and Dates. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Relation - * @sig Ord a => a -> a -> a -> a - * @param {Number} minimum The lower limit of the clamp (inclusive) - * @param {Number} maximum The upper limit of the clamp (inclusive) - * @param {Number} value Value to be clamped - * @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise - * @example - * - * R.clamp(1, 10, -5) // => 1 - * R.clamp(1, 10, 15) // => 10 - * R.clamp(1, 10, 4) // => 4 - */ - var clamp = _curry3(function clamp(min, max, value) { - if (min > max) { - throw new Error('min must not be greater than max in clamp(min, max, value)'); - } - return value < min ? min : value > max ? max : value; - }); - - /** - * Makes a comparator function out of a function that reports whether the first - * element is less than the second. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a, b -> Boolean) -> (a, b -> Number) - * @param {Function} pred A predicate function of arity two which will return `true` if the first argument - * is less than the second, `false` otherwise - * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` - * @example - * - * var byAge = R.comparator((a, b) => a.age < b.age); - * var people = [ - * // ... - * ]; - * var peopleByIncreasingAge = R.sort(byAge, people); - */ - var comparator = _curry1(function comparator(pred) { - return function (a, b) { - return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; - }; - }); - - /** - * Returns a curried equivalent of the provided function, with the specified - * arity. The curried function has two unusual capabilities. First, its - * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the - * following are equivalent: - * - * - `g(1)(2)(3)` - * - `g(1)(2, 3)` - * - `g(1, 2)(3)` - * - `g(1, 2, 3)` - * - * Secondly, the special placeholder value [`R.__`](#__) may be used to specify - * "gaps", allowing partial application of any combination of arguments, - * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), - * the following are equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @func - * @memberOf R - * @since v0.5.0 - * @category Function - * @sig Number -> (* -> a) -> (* -> a) - * @param {Number} length The arity for the returned function. - * @param {Function} fn The function to curry. - * @return {Function} A new, curried function. - * @see R.curry - * @example - * - * var sumArgs = (...args) => R.sum(args); - * - * var curriedAddFourNumbers = R.curryN(4, sumArgs); - * var f = curriedAddFourNumbers(1, 2); - * var g = f(3); - * g(4); //=> 10 - */ - var curryN = _curry2(function curryN(length, fn) { - if (length === 1) { - return _curry1(fn); - } - return _arity(length, _curryN(length, [], fn)); - }); - - /** - * Decrements its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n - 1 - * @see R.inc - * @example - * - * R.dec(42); //=> 41 - */ - var dec = add(-1); - - /** - * Returns the second argument if it is not `null`, `undefined` or `NaN`; - * otherwise the first argument is returned. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Logic - * @sig a -> b -> a | b - * @param {a} default The default value. - * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`. - * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value - * @example - * - * var defaultTo42 = R.defaultTo(42); - * - * defaultTo42(null); //=> 42 - * defaultTo42(undefined); //=> 42 - * defaultTo42('Ramda'); //=> 'Ramda' - * // parseInt('string') results in NaN - * defaultTo42(parseInt('string')); //=> 42 - */ - var defaultTo = _curry2(function defaultTo(d, v) { - return v == null || v !== v ? d : v; - }); - - /** - * Makes a descending comparator function out of a function that returns a value - * that can be compared with `<` and `>`. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Function - * @sig Ord b => (a -> b) -> a -> a -> Number - * @param {Function} fn A function of arity one that returns a value that can be compared - * @param {*} a The first item to be compared. - * @param {*} b The second item to be compared. - * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0` - * @see R.ascend - * @example - * - * var byAge = R.descend(R.prop('age')); - * var people = [ - * // ... - * ]; - * var peopleByOldestFirst = R.sort(byAge, people); - */ - var descend = _curry3(function descend(fn, a, b) { - var aa = fn(a); - var bb = fn(b); - return aa > bb ? -1 : aa < bb ? 1 : 0; - }); - - /** - * Finds the set (i.e. no duplicates) of all elements in the first list not - * contained in the second list. Duplication is determined according to the - * value returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` that are not in `list2`. - * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith - * @example - * - * var cmp = (x, y) => x.a === y.a; - * var l1 = [{a: 1}, {a: 2}, {a: 3}]; - * var l2 = [{a: 3}, {a: 4}]; - * R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}] - */ - var differenceWith = _curry3(function differenceWith(pred, first, second) { - var out = []; - var idx = 0; - var firstLen = first.length; - while (idx < firstLen) { - if (!_containsWith(pred, first[idx], second) && !_containsWith(pred, first[idx], out)) { - out.push(first[idx]); - } - idx += 1; - } - return out; - }); - - /** - * Returns a new object that does not contain a `prop` property. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Object - * @sig String -> {k: v} -> {k: v} - * @param {String} prop The name of the property to dissociate - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original but without the specified property - * @see R.assoc - * @example - * - * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3} - */ - var dissoc = _curry2(function dissoc(prop, obj) { - var result = {}; - for (var p in obj) { - result[p] = obj[p]; - } - delete result[prop]; - return result; - }); - - /** - * Divides two numbers. Equivalent to `a / b`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a / b`. - * @see R.multiply - * @example - * - * R.divide(71, 100); //=> 0.71 - * - * var half = R.divide(R.__, 2); - * half(42); //=> 21 - * - * var reciprocal = R.divide(1); - * reciprocal(4); //=> 0.25 - */ - var divide = _curry2(function divide(a, b) { - return a / b; - }); - - /** - * Returns a new list excluding the leading elements of a given list which - * satisfy the supplied predicate function. It passes each value to the supplied - * predicate function, skipping elements while the predicate function returns - * `true`. The predicate function is applied to one argument: *(value)*. - * - * Dispatches to the `dropWhile` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @param {Function} fn The function called per iteration. - * @param {Array} list The collection to iterate over. - * @return {Array} A new array. - * @see R.takeWhile, R.transduce, R.addIndex - * @example - * - * var lteTwo = x => x <= 2; - * - * R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1] - */ - var dropWhile = _curry2(_dispatchable(['dropWhile'], _xdropWhile, function dropWhile(pred, list) { - var idx = 0; - var len = list.length; - while (idx < len && pred(list[idx])) { - idx += 1; - } - return Array.prototype.slice.call(list, idx); - })); - - /** - * Returns the empty value of its argument's type. Ramda defines the empty - * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other - * types are supported if they define `.empty` and/or - * `.prototype.empty`. - * - * Dispatches to the `empty` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> a - * @param {*} x - * @return {*} - * @example - * - * R.empty(Just(42)); //=> Nothing() - * R.empty([1, 2, 3]); //=> [] - * R.empty('unicorns'); //=> '' - * R.empty({x: 1, y: 2}); //=> {} - */ - // else - var empty = _curry1(function empty(x) { - return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () { - return arguments; - }() : // else - void 0; - }); - - /** - * Creates a new object by recursively evolving a shallow copy of `object`, - * according to the `transformation` functions. All non-primitive properties - * are copied by reference. - * - * A `transformation` function will not be invoked if its corresponding key - * does not exist in the evolved object. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {k: (v -> v)} -> {k: v} -> {k: v} - * @param {Object} transformations The object specifying transformation functions to apply - * to the object. - * @param {Object} object The object to be transformed. - * @return {Object} The transformed object. - * @example - * - * var tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123}; - * var transformations = { - * firstName: R.trim, - * lastName: R.trim, // Will not get invoked. - * data: {elapsed: R.add(1), remaining: R.add(-1)} - * }; - * R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123} - */ - var evolve = _curry2(function evolve(transformations, object) { - var result = {}; - var transformation, key, type; - for (key in object) { - transformation = transformations[key]; - type = typeof transformation; - result[key] = type === 'function' ? transformation(object[key]) : transformation && type === 'object' ? evolve(transformation, object[key]) : object[key]; - } - return result; - }); - - /** - * Returns the first element of the list which matches the predicate, or - * `undefined` if no element matches. - * - * Dispatches to the `find` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> a | undefined - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Object} The element found, or `undefined`. - * @see R.transduce - * @example - * - * var xs = [{a: 1}, {a: 2}, {a: 3}]; - * R.find(R.propEq('a', 2))(xs); //=> {a: 2} - * R.find(R.propEq('a', 4))(xs); //=> undefined - */ - var find = _curry2(_dispatchable(['find'], _xfind, function find(fn, list) { - var idx = 0; - var len = list.length; - while (idx < len) { - if (fn(list[idx])) { - return list[idx]; - } - idx += 1; - } - })); - - /** - * Returns the index of the first element of the list which matches the - * predicate, or `-1` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> Number - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Number} The index of the element found, or `-1`. - * @see R.transduce - * @example - * - * var xs = [{a: 1}, {a: 2}, {a: 3}]; - * R.findIndex(R.propEq('a', 2))(xs); //=> 1 - * R.findIndex(R.propEq('a', 4))(xs); //=> -1 - */ - var findIndex = _curry2(_dispatchable([], _xfindIndex, function findIndex(fn, list) { - var idx = 0; - var len = list.length; - while (idx < len) { - if (fn(list[idx])) { - return idx; - } - idx += 1; - } - return -1; - })); - - /** - * Returns the last element of the list which matches the predicate, or - * `undefined` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> a | undefined - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Object} The element found, or `undefined`. - * @see R.transduce - * @example - * - * var xs = [{a: 1, b: 0}, {a:1, b: 1}]; - * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1} - * R.findLast(R.propEq('a', 4))(xs); //=> undefined - */ - var findLast = _curry2(_dispatchable([], _xfindLast, function findLast(fn, list) { - var idx = list.length - 1; - while (idx >= 0) { - if (fn(list[idx])) { - return list[idx]; - } - idx -= 1; - } - })); - - /** - * Returns the index of the last element of the list which matches the - * predicate, or `-1` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> Number - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Number} The index of the element found, or `-1`. - * @see R.transduce - * @example - * - * var xs = [{a: 1, b: 0}, {a:1, b: 1}]; - * R.findLastIndex(R.propEq('a', 1))(xs); //=> 1 - * R.findLastIndex(R.propEq('a', 4))(xs); //=> -1 - */ - var findLastIndex = _curry2(_dispatchable([], _xfindLastIndex, function findLastIndex(fn, list) { - var idx = list.length - 1; - while (idx >= 0) { - if (fn(list[idx])) { - return idx; - } - idx -= 1; - } - return -1; - })); - - /** - * Returns a new list by pulling every item out of it (and all its sub-arrays) - * and putting them in a new array, depth-first. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] - * @param {Array} list The array to consider. - * @return {Array} The flattened list. - * @see R.unnest - * @example - * - * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]); - * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] - */ - var flatten = _curry1(_makeFlat(true)); - - /** - * Iterate over an input `list`, calling a provided function `fn` for each - * element in the list. - * - * `fn` receives one argument: *(value)*. - * - * Note: `R.forEach` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.forEach` method. For more - * details on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description - * - * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns - * the original array. In some libraries this function is named `each`. - * - * Dispatches to the `forEach` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> *) -> [a] -> [a] - * @param {Function} fn The function to invoke. Receives one argument, `value`. - * @param {Array} list The list to iterate over. - * @return {Array} The original list. - * @see R.addIndex - * @example - * - * var printXPlusFive = x => console.log(x + 5); - * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3] - * // logs 6 - * // logs 7 - * // logs 8 - * @symb R.forEach(f, [a, b, c]) = [a, b, c] - */ - var forEach = _curry2(_checkForMethod('forEach', function forEach(fn, list) { - var len = list.length; - var idx = 0; - while (idx < len) { - fn(list[idx]); - idx += 1; - } - return list; - })); - - /** - * Creates a new object from a list key-value pairs. If a key appears in - * multiple pairs, the rightmost pair is included in the object. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [[k,v]] -> {k: v} - * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object. - * @return {Object} The object made by pairing up `keys` and `values`. - * @see R.toPairs, R.pair - * @example - * - * R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3} - */ - var fromPairs = _curry1(function fromPairs(pairs) { - var result = {}; - var idx = 0; - while (idx < pairs.length) { - result[pairs[idx][0]] = pairs[idx][1]; - idx += 1; - } - return result; - }); - - /** - * Takes a list and returns a list of lists where each sublist's elements are - * all satisfied pairwise comparison according to the provided function. - * Only adjacent elements are passed to the comparison function. - * - * @func - * @memberOf R - * @since v0.21.0 - * @category List - * @sig ((a, a) → Boolean) → [a] → [[a]] - * @param {Function} fn Function for determining whether two given (adjacent) - * elements should be in the same group - * @param {Array} list The array to group. Also accepts a string, which will be - * treated as a list of characters. - * @return {List} A list that contains sublists of elements, - * whose concatenations are equal to the original list. - * @example - * - * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] - * - * R.groupWith(R.eqBy(isVowel), 'aestiou') - * //=> ['ae', 'st', 'iou'] - */ - var groupWith = _curry2(function (fn, list) { - var res = []; - var idx = 0; - var len = list.length; - while (idx < len) { - var nextidx = idx + 1; - while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { - nextidx += 1; - } - res.push(list.slice(idx, nextidx)); - idx = nextidx; - } - return res; - }); - - /** - * Returns `true` if the first argument is greater than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.lt - * @example - * - * R.gt(2, 1); //=> true - * R.gt(2, 2); //=> false - * R.gt(2, 3); //=> false - * R.gt('a', 'z'); //=> false - * R.gt('z', 'a'); //=> true - */ - var gt = _curry2(function gt(a, b) { - return a > b; - }); - - /** - * Returns `true` if the first argument is greater than or equal to the second; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.lte - * @example - * - * R.gte(2, 1); //=> true - * R.gte(2, 2); //=> true - * R.gte(2, 3); //=> false - * R.gte('a', 'z'); //=> false - * R.gte('z', 'a'); //=> true - */ - var gte = _curry2(function gte(a, b) { - return a >= b; - }); - - /** - * Returns whether or not an object has an own property with the specified name - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. - * @example - * - * var hasName = R.has('name'); - * hasName({name: 'alice'}); //=> true - * hasName({name: 'bob'}); //=> true - * hasName({}); //=> false - * - * var point = {x: 0, y: 0}; - * var pointHas = R.has(R.__, point); - * pointHas('x'); //=> true - * pointHas('y'); //=> true - * pointHas('z'); //=> false - */ - var has = _curry2(_has); - - /** - * Returns whether or not an object or its prototype chain has a property with - * the specified name - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. - * @example - * - * function Rectangle(width, height) { - * this.width = width; - * this.height = height; - * } - * Rectangle.prototype.area = function() { - * return this.width * this.height; - * }; - * - * var square = new Rectangle(2, 2); - * R.hasIn('width', square); //=> true - * R.hasIn('area', square); //=> true - */ - var hasIn = _curry2(function hasIn(prop, obj) { - return prop in obj; - }); - - /** - * Returns true if its arguments are identical, false otherwise. Values are - * identical if they reference the same memory. `NaN` is identical to `NaN`; - * `0` and `-0` are not identical. - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Relation - * @sig a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @example - * - * var o = {}; - * R.identical(o, o); //=> true - * R.identical(1, 1); //=> true - * R.identical(1, '1'); //=> false - * R.identical([], []); //=> false - * R.identical(0, -0); //=> false - * R.identical(NaN, NaN); //=> true - */ - // SameValue algorithm - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - // Step 6.a: NaN == NaN - var identical = _curry2(function identical(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; - } - }); - - /** - * A function that does nothing but return the parameter supplied to it. Good - * as a default or placeholder function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig a -> a - * @param {*} x The value to return. - * @return {*} The input value, `x`. - * @example - * - * R.identity(1); //=> 1 - * - * var obj = {}; - * R.identity(obj) === obj; //=> true - * @symb R.identity(a) = a - */ - var identity = _curry1(_identity); - - /** - * Creates a function that will process either the `onTrue` or the `onFalse` - * function depending upon the result of the `condition` predicate. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *) - * @param {Function} condition A predicate function - * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. - * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. - * @return {Function} A new unary function that will process either the `onTrue` or the `onFalse` - * function depending upon the result of the `condition` predicate. - * @see R.unless, R.when - * @example - * - * var incCount = R.ifElse( - * R.has('count'), - * R.over(R.lensProp('count'), R.inc), - * R.assoc('count', 1) - * ); - * incCount({}); //=> { count: 1 } - * incCount({ count: 1 }); //=> { count: 2 } - */ - var ifElse = _curry3(function ifElse(condition, onTrue, onFalse) { - return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() { - return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments); - }); - }); - - /** - * Increments its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n + 1 - * @see R.dec - * @example - * - * R.inc(42); //=> 43 - */ - var inc = add(1); - - /** - * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list - * `xs'` comprising each of the elements of `xs` which is equal to one or more - * elements of `ys` according to `pred`. - * - * `pred` must be a binary function expecting an element from each list. - * - * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should - * not be significant, but since `xs'` is ordered the implementation guarantees - * that its values are in the same order as they appear in `xs`. Duplicates are - * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Relation - * @sig (a -> b -> Boolean) -> [a] -> [b] -> [a] - * @param {Function} pred - * @param {Array} xs - * @param {Array} ys - * @return {Array} - * @see R.intersection - * @example - * - * R.innerJoin( - * (record, id) => record.id === id, - * [{id: 824, name: 'Richie Furay'}, - * {id: 956, name: 'Dewey Martin'}, - * {id: 313, name: 'Bruce Palmer'}, - * {id: 456, name: 'Stephen Stills'}, - * {id: 177, name: 'Neil Young'}], - * [177, 456, 999] - * ); - * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] - */ - var innerJoin = _curry3(function innerJoin(pred, xs, ys) { - return _filter(function (x) { - return _containsWith(pred, x, ys); - }, xs); - }); - - /** - * Inserts the supplied element into the list, at the specified `index`. _Note that - - * this is not destructive_: it returns a copy of the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.2.2 - * @category List - * @sig Number -> a -> [a] -> [a] - * @param {Number} index The position to insert the element - * @param {*} elt The element to insert into the Array - * @param {Array} list The list to insert into - * @return {Array} A new Array with `elt` inserted at `index`. - * @example - * - * R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4] - */ - var insert = _curry3(function insert(idx, elt, list) { - idx = idx < list.length && idx >= 0 ? idx : list.length; - var result = Array.prototype.slice.call(list, 0); - result.splice(idx, 0, elt); - return result; - }); - - /** - * Inserts the sub-list into the list, at the specified `index`. _Note that this is not - * destructive_: it returns a copy of the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig Number -> [a] -> [a] -> [a] - * @param {Number} index The position to insert the sub-list - * @param {Array} elts The sub-list to insert into the Array - * @param {Array} list The list to insert the sub-list into - * @return {Array} A new Array with `elts` inserted starting at `index`. - * @example - * - * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4] - */ - var insertAll = _curry3(function insertAll(idx, elts, list) { - idx = idx < list.length && idx >= 0 ? idx : list.length; - return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx)); - }); - - /** - * Creates a new list with the separator interposed between elements. - * - * Dispatches to the `intersperse` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} separator The element to add to the list. - * @param {Array} list The list to be interposed. - * @return {Array} The new list. - * @example - * - * R.intersperse('n', ['ba', 'a', 'a']); //=> ['ba', 'n', 'a', 'n', 'a'] - */ - var intersperse = _curry2(_checkForMethod('intersperse', function intersperse(separator, list) { - var out = []; - var idx = 0; - var length = list.length; - while (idx < length) { - if (idx === length - 1) { - out.push(list[idx]); - } else { - out.push(list[idx], separator); - } - idx += 1; - } - return out; - })); - - /** - * See if an object (`val`) is an instance of the supplied constructor. This - * function will check up the inheritance chain, if any. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Type - * @sig (* -> {*}) -> a -> Boolean - * @param {Object} ctor A constructor - * @param {*} val The value to test - * @return {Boolean} - * @example - * - * R.is(Object, {}); //=> true - * R.is(Number, 1); //=> true - * R.is(Object, 1); //=> false - * R.is(String, 's'); //=> true - * R.is(String, new String('')); //=> true - * R.is(Object, new String('')); //=> true - * R.is(Object, 's'); //=> false - * R.is(Number, {}); //=> false - */ - var is = _curry2(function is(Ctor, val) { - return val != null && val.constructor === Ctor || val instanceof Ctor; - }); - - /** - * Checks if the input value is `null` or `undefined`. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Type - * @sig * -> Boolean - * @param {*} x The value to test. - * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`. - * @example - * - * R.isNil(null); //=> true - * R.isNil(undefined); //=> true - * R.isNil(0); //=> false - * R.isNil([]); //=> false - */ - var isNil = _curry1(function isNil(x) { - return x == null; - }); - - /** - * Returns a list containing the names of all the enumerable own properties of - * the supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own properties. - * @see R.keysIn, R.values - * @example - * - * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] - */ - // cover IE < 9 keys issues - // Safari bug - var keys = function () { - // cover IE < 9 keys issues - var hasEnumBug = !{ toString: null }.propertyIsEnumerable('toString'); - var nonEnumerableProps = [ - 'constructor', - 'valueOf', - 'isPrototypeOf', - 'toString', - 'propertyIsEnumerable', - 'hasOwnProperty', - 'toLocaleString' - ]; - // Safari bug - var hasArgsEnumBug = function () { - 'use strict'; - return arguments.propertyIsEnumerable('length'); - }(); - var contains = function contains(list, item) { - var idx = 0; - while (idx < list.length) { - if (list[idx] === item) { - return true; - } - idx += 1; - } - return false; - }; - return typeof Object.keys === 'function' && !hasArgsEnumBug ? _curry1(function keys(obj) { - return Object(obj) !== obj ? [] : Object.keys(obj); - }) : _curry1(function keys(obj) { - if (Object(obj) !== obj) { - return []; - } - var prop, nIdx; - var ks = []; - var checkArgsLength = hasArgsEnumBug && _isArguments(obj); - for (prop in obj) { - if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) { - ks[ks.length] = prop; - } - } - if (hasEnumBug) { - nIdx = nonEnumerableProps.length - 1; - while (nIdx >= 0) { - prop = nonEnumerableProps[nIdx]; - if (_has(prop, obj) && !contains(ks, prop)) { - ks[ks.length] = prop; - } - nIdx -= 1; - } - } - return ks; - }); - }(); - - /** - * Returns a list containing the names of all the properties of the supplied - * object, including prototype properties. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own and prototype properties. - * @see R.keys, R.valuesIn - * @example - * - * var F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * var f = new F(); - * R.keysIn(f); //=> ['x', 'y'] - */ - var keysIn = _curry1(function keysIn(obj) { - var prop; - var ks = []; - for (prop in obj) { - ks[ks.length] = prop; - } - return ks; - }); - - /** - * Returns the number of elements in the array by returning `list.length`. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [a] -> Number - * @param {Array} list The array to inspect. - * @return {Number} The length of the array. - * @example - * - * R.length([]); //=> 0 - * R.length([1, 2, 3]); //=> 3 - */ - var length = _curry1(function length(list) { - return list != null && _isNumber(list.length) ? list.length : NaN; - }); - - /** - * Returns `true` if the first argument is less than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.gt - * @example - * - * R.lt(2, 1); //=> false - * R.lt(2, 2); //=> false - * R.lt(2, 3); //=> true - * R.lt('a', 'z'); //=> true - * R.lt('z', 'a'); //=> false - */ - var lt = _curry2(function lt(a, b) { - return a < b; - }); - - /** - * Returns `true` if the first argument is less than or equal to the second; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.gte - * @example - * - * R.lte(2, 1); //=> false - * R.lte(2, 2); //=> true - * R.lte(2, 3); //=> true - * R.lte('a', 'z'); //=> true - * R.lte('z', 'a'); //=> false - */ - var lte = _curry2(function lte(a, b) { - return a <= b; - }); - - /** - * The `mapAccum` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from left to right, and returning a final value of this - * accumulator together with the new list. - * - * The iterator function receives two arguments, *acc* and *value*, and should - * return a tuple *[acc, value]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y]) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.addIndex, R.mapAccumRight - * @example - * - * var digits = ['1', '2', '3', '4']; - * var appender = (a, b) => [a + b, a + b]; - * - * R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] - * @symb R.mapAccum(f, a, [b, c, d]) = [ - * f(f(f(a, b)[0], c)[0], d)[0], - * [ - * f(a, b)[1], - * f(f(a, b)[0], c)[1], - * f(f(f(a, b)[0], c)[0], d)[1] - * ] - * ] - */ - var mapAccum = _curry3(function mapAccum(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = []; - var tuple = [acc]; - while (idx < len) { - tuple = fn(tuple[0], list[idx]); - result[idx] = tuple[1]; - idx += 1; - } - return [ - tuple[0], - result - ]; - }); - - /** - * The `mapAccumRight` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from right to left, and returning a final value of this - * accumulator together with the new list. - * - * Similar to [`mapAccum`](#mapAccum), except moves through the input list from - * the right to the left. - * - * The iterator function receives two arguments, *value* and *acc*, and should - * return a tuple *[value, acc]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (x-> acc -> (y, acc)) -> acc -> [x] -> ([y], acc) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.addIndex, R.mapAccum - * @example - * - * var digits = ['1', '2', '3', '4']; - * var append = (a, b) => [a + b, a + b]; - * - * R.mapAccumRight(append, 5, digits); //=> [['12345', '2345', '345', '45'], '12345'] - * @symb R.mapAccumRight(f, a, [b, c, d]) = [ - * [ - * f(b, f(c, f(d, a)[0])[0])[1], - * f(c, f(d, a)[0])[1], - * f(d, a)[1], - * ] - * f(b, f(c, f(d, a)[0])[0])[0], - * ] - */ - var mapAccumRight = _curry3(function mapAccumRight(fn, acc, list) { - var idx = list.length - 1; - var result = []; - var tuple = [acc]; - while (idx >= 0) { - tuple = fn(list[idx], tuple[0]); - result[idx] = tuple[1]; - idx -= 1; - } - return [ - result, - tuple[0] - ]; - }); - - /** - * Tests a regular expression against a String. Note that this function will - * return an empty array when there are no matches. This differs from - * [`String.prototype.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) - * which returns `null` when there are no matches. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category String - * @sig RegExp -> String -> [String | Undefined] - * @param {RegExp} rx A regular expression. - * @param {String} str The string to match against - * @return {Array} The list of matches or empty array. - * @see R.test - * @example - * - * R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na'] - * R.match(/a/, 'b'); //=> [] - * R.match(/a/, null); //=> TypeError: null does not have a method named "match" - */ - var match = _curry2(function match(rx, str) { - return str.match(rx) || []; - }); - - /** - * `mathMod` behaves like the modulo operator should mathematically, unlike the - * `%` operator (and by extension, [`R.modulo`](#modulo)). So while - * `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer - * arguments, and returns NaN when the modulus is zero or negative. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} m The dividend. - * @param {Number} p the modulus. - * @return {Number} The result of `b mod a`. - * @see R.modulo - * @example - * - * R.mathMod(-17, 5); //=> 3 - * R.mathMod(17, 5); //=> 2 - * R.mathMod(17, -5); //=> NaN - * R.mathMod(17, 0); //=> NaN - * R.mathMod(17.2, 5); //=> NaN - * R.mathMod(17, 5.3); //=> NaN - * - * var clock = R.mathMod(R.__, 12); - * clock(15); //=> 3 - * clock(24); //=> 0 - * - * var seventeenMod = R.mathMod(17); - * seventeenMod(3); //=> 2 - * seventeenMod(4); //=> 1 - * seventeenMod(10); //=> 7 - */ - var mathMod = _curry2(function mathMod(m, p) { - if (!_isInteger(m)) { - return NaN; - } - if (!_isInteger(p) || p < 1) { - return NaN; - } - return (m % p + p) % p; - }); - - /** - * Returns the larger of its two arguments. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> a - * @param {*} a - * @param {*} b - * @return {*} - * @see R.maxBy, R.min - * @example - * - * R.max(789, 123); //=> 789 - * R.max('a', 'b'); //=> 'b' - */ - var max = _curry2(function max(a, b) { - return b > a ? b : a; - }); - - /** - * Takes a function and two values, and returns whichever value produces the - * larger result when passed to the provided function. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Relation - * @sig Ord b => (a -> b) -> a -> a -> a - * @param {Function} f - * @param {*} a - * @param {*} b - * @return {*} - * @see R.max, R.minBy - * @example - * - * // square :: Number -> Number - * var square = n => n * n; - * - * R.maxBy(square, -3, 2); //=> -3 - * - * R.reduce(R.maxBy(square), 0, [3, -5, 4, 1, -2]); //=> -5 - * R.reduce(R.maxBy(square), 0, []); //=> 0 - */ - var maxBy = _curry3(function maxBy(f, a, b) { - return f(b) > f(a) ? b : a; - }); - - /** - * A customisable version of [`R.memoize`](#memoize). `memoizeWith` takes an - * additional function that will be applied to a given argument set and used to - * create the cache key under which the results of the function to be memoized - * will be stored. Care must be taken when implementing key generation to avoid - * clashes that may overwrite previous entries erroneously. - * - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Function - * @sig (*... -> String) -> (*... -> a) -> (*... -> a) - * @param {Function} fn The function to generate the cache key. - * @param {Function} fn The function to memoize. - * @return {Function} Memoized version of `fn`. - * @see R.memoize - * @example - * - * let count = 0; - * const factorial = R.memoizeWith(R.identity, n => { - * count += 1; - * return R.product(R.range(1, n + 1)); - * }); - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * count; //=> 1 - */ - var memoizeWith = _curry2(function memoizeWith(mFn, fn) { - var cache = {}; - return _arity(fn.length, function () { - var key = mFn.apply(this, arguments); - if (!_has(key, cache)) { - cache[key] = fn.apply(this, arguments); - } - return cache[key]; - }); - }); - - /** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepRight, R.mergeWith, R.mergeWithKey - * @example - * - * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * var resetToDefault = R.merge(R.__, {x: 0}); - * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} - * @symb R.merge({ x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: 5, z: 3 } - */ - var merge = _curry2(function merge(l, r) { - return _assign({}, l, r); - }); - - /** - * Merges a list of objects together into one object. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig [{k: v}] -> {k: v} - * @param {Array} list An array of objects - * @return {Object} A merged object. - * @see R.reduce - * @example - * - * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3} - * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2} - * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 } - */ - var mergeAll = _curry1(function mergeAll(list) { - return _assign.apply(null, [{}].concat(list)); - }); - - /** - * Creates a new object with the own properties of the two provided objects. If - * a key exists in both objects, the provided function is applied to the key - * and the values associated with the key in each object, with the result being - * used as the value associated with the key in the returned object. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @sig (String -> a -> a -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepWithKey, R.merge, R.mergeWith - * @example - * - * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r - * R.mergeWithKey(concatValues, - * { a: true, thing: 'foo', values: [10, 20] }, - * { b: true, thing: 'bar', values: [15, 35] }); - * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] } - * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 } - */ - var mergeWithKey = _curry3(function mergeWithKey(fn, l, r) { - var result = {}; - var k; - for (k in l) { - if (_has(k, l)) { - result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k]; - } - } - for (k in r) { - if (_has(k, r) && !_has(k, result)) { - result[k] = r[k]; - } - } - return result; - }); - - /** - * Returns the smaller of its two arguments. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> a - * @param {*} a - * @param {*} b - * @return {*} - * @see R.minBy, R.max - * @example - * - * R.min(789, 123); //=> 123 - * R.min('a', 'b'); //=> 'a' - */ - var min = _curry2(function min(a, b) { - return b < a ? b : a; - }); - - /** - * Takes a function and two values, and returns whichever value produces the - * smaller result when passed to the provided function. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Relation - * @sig Ord b => (a -> b) -> a -> a -> a - * @param {Function} f - * @param {*} a - * @param {*} b - * @return {*} - * @see R.min, R.maxBy - * @example - * - * // square :: Number -> Number - * var square = n => n * n; - * - * R.minBy(square, -3, 2); //=> 2 - * - * R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1 - * R.reduce(R.minBy(square), Infinity, []); //=> Infinity - */ - var minBy = _curry3(function minBy(f, a, b) { - return f(b) < f(a) ? b : a; - }); - - /** - * Divides the first parameter by the second and returns the remainder. Note - * that this function preserves the JavaScript-style behavior for modulo. For - * mathematical modulo see [`mathMod`](#mathMod). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The value to the divide. - * @param {Number} b The pseudo-modulus - * @return {Number} The result of `b % a`. - * @see R.mathMod - * @example - * - * R.modulo(17, 3); //=> 2 - * // JS behavior: - * R.modulo(-17, 3); //=> -2 - * R.modulo(17, -3); //=> 2 - * - * var isOdd = R.modulo(R.__, 2); - * isOdd(42); //=> 0 - * isOdd(21); //=> 1 - */ - var modulo = _curry2(function modulo(a, b) { - return a % b; - }); - - /** - * Multiplies two numbers. Equivalent to `a * b` but curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a * b`. - * @see R.divide - * @example - * - * var double = R.multiply(2); - * var triple = R.multiply(3); - * double(3); //=> 6 - * triple(4); //=> 12 - * R.multiply(2, 5); //=> 10 - */ - var multiply = _curry2(function multiply(a, b) { - return a * b; - }); - - /** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly `n` parameters. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig Number -> (* -> a) -> (* -> a) - * @param {Number} n The desired arity of the new function. - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity `n`. - * @see R.binary, R.unary - * @example - * - * var takesTwoArgs = (a, b) => [a, b]; - * - * takesTwoArgs.length; //=> 2 - * takesTwoArgs(1, 2); //=> [1, 2] - * - * var takesOneArg = R.nAry(1, takesTwoArgs); - * takesOneArg.length; //=> 1 - * // Only `n` arguments are passed to the wrapped function - * takesOneArg(1, 2); //=> [1, undefined] - * @symb R.nAry(0, f)(a, b) = f() - * @symb R.nAry(1, f)(a, b) = f(a) - * @symb R.nAry(2, f)(a, b) = f(a, b) - */ - var nAry = _curry2(function nAry(n, fn) { - switch (n) { - case 0: - return function () { - return fn.call(this); - }; - case 1: - return function (a0) { - return fn.call(this, a0); - }; - case 2: - return function (a0, a1) { - return fn.call(this, a0, a1); - }; - case 3: - return function (a0, a1, a2) { - return fn.call(this, a0, a1, a2); - }; - case 4: - return function (a0, a1, a2, a3) { - return fn.call(this, a0, a1, a2, a3); - }; - case 5: - return function (a0, a1, a2, a3, a4) { - return fn.call(this, a0, a1, a2, a3, a4); - }; - case 6: - return function (a0, a1, a2, a3, a4, a5) { - return fn.call(this, a0, a1, a2, a3, a4, a5); - }; - case 7: - return function (a0, a1, a2, a3, a4, a5, a6) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6); - }; - case 8: - return function (a0, a1, a2, a3, a4, a5, a6, a7) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7); - }; - case 9: - return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8); - }; - case 10: - return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - }; - default: - throw new Error('First argument to nAry must be a non-negative integer no greater than ten'); - } - }); - - /** - * Negates its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} - * @example - * - * R.negate(42); //=> -42 - */ - var negate = _curry1(function negate(n) { - return -n; - }); - - /** - * Returns `true` if no elements of the list match the predicate, `false` - * otherwise. - * - * Dispatches to the `any` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. - * @see R.all, R.any - * @example - * - * var isEven = n => n % 2 === 0; - * - * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true - * R.none(isEven, [1, 3, 5, 7, 8, 11]); //=> false - */ - var none = _curry2(_complement(_dispatchable(['any'], _xany, any))); - - /** - * A function that returns the `!` of its argument. It will return `true` when - * passed false-y value, and `false` when passed a truth-y one. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig * -> Boolean - * @param {*} a any value - * @return {Boolean} the logical inverse of passed argument. - * @see R.complement - * @example - * - * R.not(true); //=> false - * R.not(false); //=> true - * R.not(0); //=> true - * R.not(1); //=> false - */ - var not = _curry1(function not(a) { - return !a; - }); - - /** - * Returns the nth element of the given list or string. If n is negative the - * element at index length + n is returned. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> a | Undefined - * @sig Number -> String -> String - * @param {Number} offset - * @param {*} list - * @return {*} - * @example - * - * var list = ['foo', 'bar', 'baz', 'quux']; - * R.nth(1, list); //=> 'bar' - * R.nth(-1, list); //=> 'quux' - * R.nth(-99, list); //=> undefined - * - * R.nth(2, 'abc'); //=> 'c' - * R.nth(3, 'abc'); //=> '' - * @symb R.nth(-1, [a, b, c]) = c - * @symb R.nth(0, [a, b, c]) = a - * @symb R.nth(1, [a, b, c]) = b - */ - var nth = _curry2(function nth(offset, list) { - var idx = offset < 0 ? list.length + offset : offset; - return _isString(list) ? list.charAt(idx) : list[idx]; - }); - - /** - * Returns a function which returns its nth argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig Number -> *... -> * - * @param {Number} n - * @return {Function} - * @example - * - * R.nthArg(1)('a', 'b', 'c'); //=> 'b' - * R.nthArg(-1)('a', 'b', 'c'); //=> 'c' - * @symb R.nthArg(-1)(a, b, c) = c - * @symb R.nthArg(0)(a, b, c) = a - * @symb R.nthArg(1)(a, b, c) = b - */ - var nthArg = _curry1(function nthArg(n) { - var arity = n < 0 ? 1 : n + 1; - return curryN(arity, function () { - return nth(n, arguments); - }); - }); - - /** - * `o` is a curried composition function that returns a unary function. - * Like [`compose`](#compose), `o` performs right-to-left function composition. - * Unlike [`compose`](#compose), the rightmost function passed to `o` will be - * invoked with only one argument. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Function - * @sig (b -> c) -> (a -> b) -> a -> c - * @param {Function} f - * @param {Function} g - * @return {Function} - * @see R.compose, R.pipe - * @example - * - * var classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + lastName - * var yellGreeting = R.o(R.toUpper, classyGreeting); - * yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND" - * - * R.o(R.multiply(10), R.add(10))(-4) //=> 60 - * - * @symb R.o(f, g, x) = f(g(x)) - */ - var o = _curry3(function o(f, g, x) { - return f(g(x)); - }); - - /** - * Creates an object containing a single key:value pair. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @sig String -> a -> {String:a} - * @param {String} key - * @param {*} val - * @return {Object} - * @see R.pair - * @example - * - * var matchPhrases = R.compose( - * R.objOf('must'), - * R.map(R.objOf('match_phrase')) - * ); - * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} - */ - var objOf = _curry2(function objOf(key, val) { - var obj = {}; - obj[key] = val; - return obj; - }); - - /** - * Returns a singleton array containing the value provided. - * - * Note this `of` is different from the ES6 `of`; See - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> [a] - * @param {*} x any value - * @return {Array} An array wrapping `x`. - * @example - * - * R.of(null); //=> [null] - * R.of([42]); //=> [[42]] - */ - var of = _curry1(_of); - - /** - * Accepts a function `fn` and returns a function that guards invocation of - * `fn` such that `fn` can only ever be called once, no matter how many times - * the returned function is invoked. The first value calculated is returned in - * subsequent invocations. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a... -> b) -> (a... -> b) - * @param {Function} fn The function to wrap in a call-only-once wrapper. - * @return {Function} The wrapped function. - * @example - * - * var addOneOnce = R.once(x => x + 1); - * addOneOnce(10); //=> 11 - * addOneOnce(addOneOnce(50)); //=> 11 - */ - var once = _curry1(function once(fn) { - var called = false; - var result; - return _arity(fn.length, function () { - if (called) { - return result; - } - called = true; - result = fn.apply(this, arguments); - return result; - }); - }); - - /** - * Returns `true` if one or both of its arguments are `true`. Returns `false` - * if both arguments are `false`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> b -> a | b - * @param {Any} a - * @param {Any} b - * @return {Any} the first argument if truthy, otherwise the second argument. - * @see R.either - * @example - * - * R.or(true, true); //=> true - * R.or(true, false); //=> true - * R.or(false, true); //=> true - * R.or(false, false); //=> false - */ - var or = _curry2(function or(a, b) { - return a || b; - }); - - /** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the result of applying the given function to - * the focused value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> (a -> a) -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * var headLens = R.lensIndex(0); - * - * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] - */ - // `Identity` is a functor that holds a single value, where `map` simply - // transforms the held value with the provided function. - // The value returned by the getter function is first transformed with `f`, - // then set as the value of an `Identity`. This is then mapped over with the - // setter function of the lens. - var over = function () { - // `Identity` is a functor that holds a single value, where `map` simply - // transforms the held value with the provided function. - var Identity = function (x) { - return { - value: x, - map: function (f) { - return Identity(f(x)); - } - }; - }; - return _curry3(function over(lens, f, x) { - // The value returned by the getter function is first transformed with `f`, - // then set as the value of an `Identity`. This is then mapped over with the - // setter function of the lens. - return lens(function (y) { - return Identity(f(y)); - })(x).value; - }); - }(); - - /** - * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category List - * @sig a -> b -> (a,b) - * @param {*} fst - * @param {*} snd - * @return {Array} - * @see R.objOf, R.of - * @example - * - * R.pair('foo', 'bar'); //=> ['foo', 'bar'] - */ - var pair = _curry2(function pair(fst, snd) { - return [ - fst, - snd - ]; - }); - - /** - * Retrieve the value at a given path. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {a} -> a | Undefined - * @param {Array} path The path to use. - * @param {Object} obj The object to retrieve the nested property from. - * @return {*} The data at `path`. - * @see R.prop - * @example - * - * R.path(['a', 'b'], {a: {b: 2}}); //=> 2 - * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined - */ - var path = _curry2(function path(paths, obj) { - var val = obj; - var idx = 0; - while (idx < paths.length) { - if (val == null) { - return; - } - val = val[paths[idx]]; - idx += 1; - } - return val; - }); - - /** - * If the given, non-null object has a value at the given path, returns the - * value at that path. Otherwise returns the provided default value. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @typedefn Idx = String | Int - * @sig a -> [Idx] -> {a} -> a - * @param {*} d The default value. - * @param {Array} p The path to use. - * @param {Object} obj The object to retrieve the nested property from. - * @return {*} The data at `path` of the supplied object or the default value. - * @example - * - * R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2 - * R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A" - */ - var pathOr = _curry3(function pathOr(d, p, obj) { - return defaultTo(d, path(p, obj)); - }); - - /** - * Returns `true` if the specified object property at given path satisfies the - * given predicate; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Logic - * @typedefn Idx = String | Int - * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean - * @param {Function} pred - * @param {Array} propPath - * @param {*} obj - * @return {Boolean} - * @see R.propSatisfies, R.path - * @example - * - * R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true - */ - var pathSatisfies = _curry3(function pathSatisfies(pred, propPath, obj) { - return propPath.length > 0 && pred(path(propPath, obj)); - }); - - /** - * Returns a partial copy of an object containing only the keys specified. If - * the key does not exist, the property is ignored. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> {k: v} - * @param {Array} names an array of String property names to copy onto a new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties from `names` on it. - * @see R.omit, R.props - * @example - * - * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} - * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1} - */ - var pick = _curry2(function pick(names, obj) { - var result = {}; - var idx = 0; - while (idx < names.length) { - if (names[idx] in obj) { - result[names[idx]] = obj[names[idx]]; - } - idx += 1; - } - return result; - }); - - /** - * Similar to `pick` except that this one includes a `key: undefined` pair for - * properties that don't exist. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> {k: v} - * @param {Array} names an array of String property names to copy onto a new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties from `names` on it. - * @see R.pick - * @example - * - * R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} - * R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined} - */ - var pickAll = _curry2(function pickAll(names, obj) { - var result = {}; - var idx = 0; - var len = names.length; - while (idx < len) { - var name = names[idx]; - result[name] = obj[name]; - idx += 1; - } - return result; - }); - - /** - * Returns a partial copy of an object containing only the keys that satisfy - * the supplied predicate. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @sig (v, k -> Boolean) -> {k: v} -> {k: v} - * @param {Function} pred A predicate to determine whether or not a key - * should be included on the output object. - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties that satisfy `pred` - * on it. - * @see R.pick, R.filter - * @example - * - * var isUpperCase = (val, key) => key.toUpperCase() === key; - * R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4} - */ - var pickBy = _curry2(function pickBy(test, obj) { - var result = {}; - for (var prop in obj) { - if (test(obj[prop], prop, obj)) { - result[prop] = obj[prop]; - } - } - return result; - }); - - /** - * Returns a new list with the given element at the front, followed by the - * contents of the list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} el The item to add to the head of the output list. - * @param {Array} list The array to add to the tail of the output list. - * @return {Array} A new array. - * @see R.append - * @example - * - * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum'] - */ - var prepend = _curry2(function prepend(el, list) { - return _concat([el], list); - }); - - /** - * Returns a function that when supplied an object returns the indicated - * property of that object, if it exists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig s -> {s: a} -> a | Undefined - * @param {String} p The property name - * @param {Object} obj The object to query - * @return {*} The value at `obj.p`. - * @see R.path - * @example - * - * R.prop('x', {x: 100}); //=> 100 - * R.prop('x', {}); //=> undefined - */ - var prop = _curry2(function prop(p, obj) { - return obj[p]; - }); - - /** - * Returns `true` if the specified object property is of the given type; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Type - * @sig Type -> String -> Object -> Boolean - * @param {Function} type - * @param {String} name - * @param {*} obj - * @return {Boolean} - * @see R.is, R.propSatisfies - * @example - * - * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true - * R.propIs(Number, 'x', {x: 'foo'}); //=> false - * R.propIs(Number, 'x', {}); //=> false - */ - var propIs = _curry3(function propIs(type, name, obj) { - return is(type, obj[name]); - }); - - /** - * If the given, non-null object has an own property with the specified name, - * returns the value of that property. Otherwise returns the provided default - * value. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Object - * @sig a -> String -> Object -> a - * @param {*} val The default value. - * @param {String} p The name of the property to return. - * @param {Object} obj The object to query. - * @return {*} The value of given property of the supplied object or the default value. - * @example - * - * var alice = { - * name: 'ALICE', - * age: 101 - * }; - * var favorite = R.prop('favoriteLibrary'); - * var favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); - * - * favorite(alice); //=> undefined - * favoriteWithDefault(alice); //=> 'Ramda' - */ - var propOr = _curry3(function propOr(val, p, obj) { - return obj != null && _has(p, obj) ? obj[p] : val; - }); - - /** - * Returns `true` if the specified object property satisfies the given - * predicate; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Logic - * @sig (a -> Boolean) -> String -> {String: a} -> Boolean - * @param {Function} pred - * @param {String} name - * @param {*} obj - * @return {Boolean} - * @see R.propEq, R.propIs - * @example - * - * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true - */ - var propSatisfies = _curry3(function propSatisfies(pred, name, obj) { - return pred(obj[name]); - }); - - /** - * Acts as multiple `prop`: array of keys in, array of values out. Preserves - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> [v] - * @param {Array} ps The property names to fetch - * @param {Object} obj The object to query - * @return {Array} The corresponding values or partially applied function. - * @example - * - * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] - * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] - * - * var fullName = R.compose(R.join(' '), R.props(['first', 'last'])); - * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' - */ - var props = _curry2(function props(ps, obj) { - var len = ps.length; - var out = []; - var idx = 0; - while (idx < len) { - out[idx] = obj[ps[idx]]; - idx += 1; - } - return out; - }); - - /** - * Returns a list of numbers from `from` (inclusive) to `to` (exclusive). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> Number -> [Number] - * @param {Number} from The first number in the list. - * @param {Number} to One more than the last number in the list. - * @return {Array} The list of numbers in tthe set `[a, b)`. - * @example - * - * R.range(1, 5); //=> [1, 2, 3, 4] - * R.range(50, 53); //=> [50, 51, 52] - */ - var range = _curry2(function range(from, to) { - if (!(_isNumber(from) && _isNumber(to))) { - throw new TypeError('Both arguments to range must be numbers'); - } - var result = []; - var n = from; - while (n < to) { - result.push(n); - n += 1; - } - return result; - }); - - /** - * Returns a single item by iterating through the list, successively calling - * the iterator function and passing it an accumulator value and the current - * value from the array, and then passing the result to the next call. - * - * Similar to [`reduce`](#reduce), except moves through the input list from the - * right to the left. - * - * The iterator function receives two values: *(value, acc)*, while the arguments' - * order of `reduce`'s iterator function is *(acc, value)*. - * - * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.reduceRight` method. For more details - * on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a, b -> b) -> b -> [a] -> b - * @param {Function} fn The iterator function. Receives two values, the current element from the array - * and the accumulator. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.addIndex - * @example - * - * R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 - * - -2 - * / \ / \ - * 1 - 1 3 - * / \ / \ - * 2 - ==> 2 -1 - * / \ / \ - * 3 - 3 4 - * / \ / \ - * 4 0 4 0 - * - * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) - */ - var reduceRight = _curry3(function reduceRight(fn, acc, list) { - var idx = list.length - 1; - while (idx >= 0) { - acc = fn(list[idx], acc); - idx -= 1; - } - return acc; - }); - - /** - * Returns a value wrapped to indicate that it is the final value of the reduce - * and transduce functions. The returned value should be considered a black - * box: the internal structure is not guaranteed to be stable. - * - * Note: this optimization is unavailable to functions not explicitly listed - * above. For instance, it is not currently supported by - * [`reduceRight`](#reduceRight). - * - * @func - * @memberOf R - * @since v0.15.0 - * @category List - * @sig a -> * - * @param {*} x The final value of the reduce. - * @return {*} The wrapped value. - * @see R.reduce, R.transduce - * @example - * - * R.reduce( - * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item), - * [], - * [1, 2, 3, 4, 5]) // [1, 2, 3] - */ - var reduced = _curry1(_reduced); - - /** - * Removes the sub-list of `list` starting at index `start` and containing - * `count` elements. _Note that this is not destructive_: it returns a copy of - * the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.2.2 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @param {Number} start The position to start removing elements - * @param {Number} count The number of elements to remove - * @param {Array} list The list to remove from - * @return {Array} A new Array with `count` elements from `start` removed. - * @example - * - * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8] - */ - var remove = _curry3(function remove(start, count, list) { - var result = Array.prototype.slice.call(list, 0); - result.splice(start, count); - return result; - }); - - /** - * Replace a substring or regex match in a string with a replacement. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category String - * @sig RegExp|String -> String -> String -> String - * @param {RegExp|String} pattern A regular expression or a substring to match. - * @param {String} replacement The string to replace the matches with. - * @param {String} str The String to do the search and replacement in. - * @return {String} The result. - * @example - * - * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo' - * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo' - * - * // Use the "g" (global) flag to replace all occurrences: - * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar' - */ - var replace = _curry3(function replace(regex, replacement, str) { - return str.replace(regex, replacement); - }); - - /** - * Returns a new list or string with the elements or characters in reverse - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {Array|String} list - * @return {Array|String} - * @example - * - * R.reverse([1, 2, 3]); //=> [3, 2, 1] - * R.reverse([1, 2]); //=> [2, 1] - * R.reverse([1]); //=> [1] - * R.reverse([]); //=> [] - * - * R.reverse('abc'); //=> 'cba' - * R.reverse('ab'); //=> 'ba' - * R.reverse('a'); //=> 'a' - * R.reverse(''); //=> '' - */ - var reverse = _curry1(function reverse(list) { - return _isString(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse(); - }); - - /** - * Scan is similar to [`reduce`](#reduce), but returns a list of successively - * reduced values from the left - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (a,b -> a) -> a -> [b] -> [a] - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {Array} A list of all intermediately reduced values. - * @see R.reduce - * @example - * - * var numbers = [1, 2, 3, 4]; - * var factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24] - * @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)] - */ - var scan = _curry3(function scan(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = [acc]; - while (idx < len) { - acc = fn(acc, list[idx]); - result[idx + 1] = acc; - idx += 1; - } - return result; - }); - - /** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the given value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> a -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * var xLens = R.lensProp('x'); - * - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2} - */ - var set = _curry3(function set(lens, v, x) { - return over(lens, always(v), x); - }); - - /** - * Returns the elements of the given list or string (or object with a `slice` - * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). - * - * Dispatches to the `slice` method of the third argument, if present. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @sig Number -> Number -> String -> String - * @param {Number} fromIndex The start index (inclusive). - * @param {Number} toIndex The end index (exclusive). - * @param {*} list - * @return {*} - * @example - * - * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] - * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] - * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] - * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] - * R.slice(0, 3, 'ramda'); //=> 'ram' - */ - var slice = _curry3(_checkForMethod('slice', function slice(fromIndex, toIndex, list) { - return Array.prototype.slice.call(list, fromIndex, toIndex); - })); - - /** - * Returns a copy of the list, sorted according to the comparator function, - * which should accept two values at a time and return a negative number if the - * first value is smaller, a positive number if it's larger, and zero if they - * are equal. Please note that this is a **copy** of the list. It does not - * modify the original. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a,a -> Number) -> [a] -> [a] - * @param {Function} comparator A sorting function :: a -> b -> Int - * @param {Array} list The list to sort - * @return {Array} a new array with its elements sorted by the comparator function. - * @example - * - * var diff = function(a, b) { return a - b; }; - * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7] - */ - var sort = _curry2(function sort(comparator, list) { - return Array.prototype.slice.call(list, 0).sort(comparator); - }); - - /** - * Sorts the list according to the supplied function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord b => (a -> b) -> [a] -> [a] - * @param {Function} fn - * @param {Array} list The list to sort. - * @return {Array} A new list sorted by the keys generated by `fn`. - * @example - * - * var sortByFirstItem = R.sortBy(R.prop(0)); - * var sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name'))); - * var pairs = [[-1, 1], [-2, 2], [-3, 3]]; - * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]] - * var alice = { - * name: 'ALICE', - * age: 101 - * }; - * var bob = { - * name: 'Bob', - * age: -10 - * }; - * var clara = { - * name: 'clara', - * age: 314.159 - * }; - * var people = [clara, bob, alice]; - * sortByNameCaseInsensitive(people); //=> [alice, bob, clara] - */ - var sortBy = _curry2(function sortBy(fn, list) { - return Array.prototype.slice.call(list, 0).sort(function (a, b) { - var aa = fn(a); - var bb = fn(b); - return aa < bb ? -1 : aa > bb ? 1 : 0; - }); - }); - - /** - * Sorts a list according to a list of comparators. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Relation - * @sig [a -> a -> Number] -> [a] -> [a] - * @param {Array} functions A list of comparator functions. - * @param {Array} list The list to sort. - * @return {Array} A new list sorted according to the comarator functions. - * @example - * - * var alice = { - * name: 'alice', - * age: 40 - * }; - * var bob = { - * name: 'bob', - * age: 30 - * }; - * var clara = { - * name: 'clara', - * age: 40 - * }; - * var people = [clara, bob, alice]; - * var ageNameSort = R.sortWith([ - * R.descend(R.prop('age')), - * R.ascend(R.prop('name')) - * ]); - * ageNameSort(people); //=> [alice, clara, bob] - */ - var sortWith = _curry2(function sortWith(fns, list) { - return Array.prototype.slice.call(list, 0).sort(function (a, b) { - var result = 0; - var i = 0; - while (result === 0 && i < fns.length) { - result = fns[i](a, b); - i += 1; - } - return result; - }); - }); - - /** - * Splits a given list or string at a given index. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig Number -> [a] -> [[a], [a]] - * @sig Number -> String -> [String, String] - * @param {Number} index The index where the array/string is split. - * @param {Array|String} array The array/string to be split. - * @return {Array} - * @example - * - * R.splitAt(1, [1, 2, 3]); //=> [[1], [2, 3]] - * R.splitAt(5, 'hello world'); //=> ['hello', ' world'] - * R.splitAt(-1, 'foobar'); //=> ['fooba', 'r'] - */ - var splitAt = _curry2(function splitAt(index, array) { - return [ - slice(0, index, array), - slice(index, length(array), array) - ]; - }); - - /** - * Splits a collection into slices of the specified length. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [[a]] - * @sig Number -> String -> [String] - * @param {Number} n - * @param {Array} list - * @return {Array} - * @example - * - * R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]] - * R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz'] - */ - var splitEvery = _curry2(function splitEvery(n, list) { - if (n <= 0) { - throw new Error('First argument to splitEvery must be a positive integer'); - } - var result = []; - var idx = 0; - while (idx < list.length) { - result.push(slice(idx, idx += n, list)); - } - return result; - }); - - /** - * Takes a list and a predicate and returns a pair of lists with the following properties: - * - * - the result of concatenating the two output lists is equivalent to the input list; - * - none of the elements of the first output list satisfies the predicate; and - * - if the second output list is non-empty, its first element satisfies the predicate. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [[a], [a]] - * @param {Function} pred The predicate that determines where the array is split. - * @param {Array} list The array to be split. - * @return {Array} - * @example - * - * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] - */ - var splitWhen = _curry2(function splitWhen(pred, list) { - var idx = 0; - var len = list.length; - var prefix = []; - while (idx < len && !pred(list[idx])) { - prefix.push(list[idx]); - idx += 1; - } - return [ - prefix, - Array.prototype.slice.call(list, idx) - ]; - }); - - /** - * Subtracts its second argument from its first argument. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a - b`. - * @see R.add - * @example - * - * R.subtract(10, 8); //=> 2 - * - * var minus5 = R.subtract(R.__, 5); - * minus5(17); //=> 12 - * - * var complementaryAngle = R.subtract(90); - * complementaryAngle(30); //=> 60 - * complementaryAngle(72); //=> 18 - */ - var subtract = _curry2(function subtract(a, b) { - return Number(a) - Number(b); - }); - - /** - * Returns all but the first element of the given list or string (or object - * with a `tail` method). - * - * Dispatches to the `slice` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.head, R.init, R.last - * @example - * - * R.tail([1, 2, 3]); //=> [2, 3] - * R.tail([1, 2]); //=> [2] - * R.tail([1]); //=> [] - * R.tail([]); //=> [] - * - * R.tail('abc'); //=> 'bc' - * R.tail('ab'); //=> 'b' - * R.tail('a'); //=> '' - * R.tail(''); //=> '' - */ - var tail = _curry1(_checkForMethod('tail', slice(1, Infinity))); - - /** - * Returns the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `take` method). - * - * Dispatches to the `take` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} - * @see R.drop - * @example - * - * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(3, 'ramda'); //=> 'ram' - * - * var personnel = [ - * 'Dave Brubeck', - * 'Paul Desmond', - * 'Eugene Wright', - * 'Joe Morello', - * 'Gerry Mulligan', - * 'Bob Bates', - * 'Joe Dodge', - * 'Ron Crotty' - * ]; - * - * var takeFive = R.take(5); - * takeFive(personnel); - * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] - * @symb R.take(-1, [a, b]) = [a, b] - * @symb R.take(0, [a, b]) = [] - * @symb R.take(1, [a, b]) = [a] - * @symb R.take(2, [a, b]) = [a, b] - */ - var take = _curry2(_dispatchable(['take'], _xtake, function take(n, xs) { - return slice(0, n < 0 ? Infinity : n, xs); - })); - - /** - * Returns a new list containing the last `n` elements of a given list, passing - * each value to the supplied predicate function, and terminating when the - * predicate function returns `false`. Excludes the element that caused the - * predicate function to fail. The predicate function is passed one argument: - * *(value)*. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @param {Function} fn The function called per iteration. - * @param {Array} list The collection to iterate over. - * @return {Array} A new array. - * @see R.dropLastWhile, R.addIndex - * @example - * - * var isNotOne = x => x !== 1; - * - * R.takeLastWhile(isNotOne, [1, 2, 3, 4]); //=> [2, 3, 4] - */ - var takeLastWhile = _curry2(function takeLastWhile(fn, list) { - var idx = list.length - 1; - while (idx >= 0 && fn(list[idx])) { - idx -= 1; - } - return Array.prototype.slice.call(list, idx + 1); - }); - - /** - * Returns a new list containing the first `n` elements of a given list, - * passing each value to the supplied predicate function, and terminating when - * the predicate function returns `false`. Excludes the element that caused the - * predicate function to fail. The predicate function is passed one argument: - * *(value)*. - * - * Dispatches to the `takeWhile` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @param {Function} fn The function called per iteration. - * @param {Array} list The collection to iterate over. - * @return {Array} A new array. - * @see R.dropWhile, R.transduce, R.addIndex - * @example - * - * var isNotFour = x => x !== 4; - * - * R.takeWhile(isNotFour, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3] - */ - var takeWhile = _curry2(_dispatchable(['takeWhile'], _xtakeWhile, function takeWhile(fn, list) { - var idx = 0; - var len = list.length; - while (idx < len && fn(list[idx])) { - idx += 1; - } - return Array.prototype.slice.call(list, 0, idx); - })); - - /** - * Runs the given function with the supplied object, then returns the object. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a -> *) -> a -> a - * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. - * @param {*} x - * @return {*} `x`. - * @example - * - * var sayX = x => console.log('x is ' + x); - * R.tap(sayX, 100); //=> 100 - * // logs 'x is 100' - * @symb R.tap(f, a) = a - */ - var tap = _curry2(function tap(fn, x) { - fn(x); - return x; - }); - - /** - * Calls an input function `n` times, returning an array containing the results - * of those function calls. - * - * `fn` is passed one argument: The current value of `n`, which begins at `0` - * and is gradually incremented to `n - 1`. - * - * @func - * @memberOf R - * @since v0.2.3 - * @category List - * @sig (Number -> a) -> Number -> [a] - * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. - * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. - * @return {Array} An array containing the return values of all calls to `fn`. - * @see R.repeat - * @example - * - * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] - * @symb R.times(f, 0) = [] - * @symb R.times(f, 1) = [f(0)] - * @symb R.times(f, 2) = [f(0), f(1)] - */ - var times = _curry2(function times(fn, n) { - var len = Number(n); - var idx = 0; - var list; - if (len < 0 || isNaN(len)) { - throw new RangeError('n must be a non-negative number'); - } - list = new Array(len); - while (idx < len) { - list[idx] = fn(idx); - idx += 1; - } - return list; - }); - - /** - * Converts an object into an array of key, value arrays. Only the object's - * own properties are used. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Object - * @sig {String: *} -> [[String,*]] - * @param {Object} obj The object to extract from - * @return {Array} An array of key, value arrays from the object's own properties. - * @see R.fromPairs - * @example - * - * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]] - */ - var toPairs = _curry1(function toPairs(obj) { - var pairs = []; - for (var prop in obj) { - if (_has(prop, obj)) { - pairs[pairs.length] = [ - prop, - obj[prop] - ]; - } - } - return pairs; - }); - - /** - * Converts an object into an array of key, value arrays. The object's own - * properties and prototype properties are used. Note that the order of the - * output array is not guaranteed to be consistent across different JS - * platforms. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Object - * @sig {String: *} -> [[String,*]] - * @param {Object} obj The object to extract from - * @return {Array} An array of key, value arrays from the object's own - * and prototype properties. - * @example - * - * var F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * var f = new F(); - * R.toPairsIn(f); //=> [['x','X'], ['y','Y']] - */ - var toPairsIn = _curry1(function toPairsIn(obj) { - var pairs = []; - for (var prop in obj) { - pairs[pairs.length] = [ - prop, - obj[prop] - ]; - } - return pairs; - }); - - /** - * Transposes the rows and columns of a 2D list. - * When passed a list of `n` lists of length `x`, - * returns a list of `x` lists of length `n`. - * - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [[a]] -> [[a]] - * @param {Array} list A 2D list - * @return {Array} A 2D list - * @example - * - * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']] - * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']] - * - * // If some of the rows are shorter than the following rows, their elements are skipped: - * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] - * @symb R.transpose([[a], [b], [c]]) = [a, b, c] - * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]] - * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]] - */ - var transpose = _curry1(function transpose(outerlist) { - var i = 0; - var result = []; - while (i < outerlist.length) { - var innerlist = outerlist[i]; - var j = 0; - while (j < innerlist.length) { - if (typeof result[j] === 'undefined') { - result[j] = []; - } - result[j].push(innerlist[j]); - j += 1; - } - i += 1; - } - return result; - }); - - /** - * Removes (strips) whitespace from both ends of the string. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category String - * @sig String -> String - * @param {String} str The string to trim. - * @return {String} Trimmed version of `str`. - * @example - * - * R.trim(' xyz '); //=> 'xyz' - * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z'] - */ - var trim = function () { - var ws = '\t\n\x0B\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + '\u2029\uFEFF'; - var zeroWidth = '\u200B'; - var hasProtoTrim = typeof String.prototype.trim === 'function'; - if (!hasProtoTrim || (ws.trim() || !zeroWidth.trim())) { - return _curry1(function trim(str) { - var beginRx = new RegExp('^[' + ws + '][' + ws + ']*'); - var endRx = new RegExp('[' + ws + '][' + ws + ']*$'); - return str.replace(beginRx, '').replace(endRx, ''); - }); - } else { - return _curry1(function trim(str) { - return str.trim(); - }); - } - }(); - - /** - * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned - * function evaluates the `tryer`; if it does not throw, it simply returns the - * result. If the `tryer` *does* throw, the returned function evaluates the - * `catcher` function and returns its result. Note that for effective - * composition with this function, both the `tryer` and `catcher` functions - * must return the same type of results. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Function - * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) - * @param {Function} tryer The function that may throw. - * @param {Function} catcher The function that will be evaluated if `tryer` throws. - * @return {Function} A new function that will catch exceptions and send then to the catcher. - * @example - * - * R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true - * R.tryCatch(R.prop('x'), R.F)(null); //=> false - */ - var tryCatch = _curry2(function _tryCatch(tryer, catcher) { - return _arity(tryer.length, function () { - try { - return tryer.apply(this, arguments); - } catch (e) { - return catcher.apply(this, _concat([e], arguments)); - } - }); - }); - - /** - * Gives a single-word string description of the (native) type of a value, - * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not - * attempt to distinguish user Object types any further, reporting them all as - * 'Object'. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Type - * @sig (* -> {*}) -> String - * @param {*} val The value to test - * @return {String} - * @example - * - * R.type({}); //=> "Object" - * R.type(1); //=> "Number" - * R.type(false); //=> "Boolean" - * R.type('s'); //=> "String" - * R.type(null); //=> "Null" - * R.type([]); //=> "Array" - * R.type(/[A-z]/); //=> "RegExp" - * R.type(() => {}); //=> "Function" - */ - var type = _curry1(function type(val) { - return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1); - }); - - /** - * Takes a function `fn`, which takes a single array argument, and returns a - * function which: - * - * - takes any number of positional arguments; - * - passes these arguments to `fn` as an array; and - * - returns the result. - * - * In other words, `R.unapply` derives a variadic function from a function which - * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Function - * @sig ([*...] -> a) -> (*... -> a) - * @param {Function} fn - * @return {Function} - * @see R.apply - * @example - * - * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' - * @symb R.unapply(f)(a, b) = f([a, b]) - */ - var unapply = _curry1(function unapply(fn) { - return function () { - return fn(Array.prototype.slice.call(arguments, 0)); - }; - }); - - /** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 1 parameter. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> b) -> (a -> b) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 1. - * @see R.binary, R.nAry - * @example - * - * var takesTwoArgs = function(a, b) { - * return [a, b]; - * }; - * takesTwoArgs.length; //=> 2 - * takesTwoArgs(1, 2); //=> [1, 2] - * - * var takesOneArg = R.unary(takesTwoArgs); - * takesOneArg.length; //=> 1 - * // Only 1 argument is passed to the wrapped function - * takesOneArg(1, 2); //=> [1, undefined] - * @symb R.unary(f)(a, b, c) = f(a) - */ - var unary = _curry1(function unary(fn) { - return nAry(1, fn); - }); - - /** - * Returns a function of arity `n` from a (manually) curried function. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Function - * @sig Number -> (a -> b) -> (a -> c) - * @param {Number} length The arity for the returned function. - * @param {Function} fn The function to uncurry. - * @return {Function} A new function. - * @see R.curry - * @example - * - * var addFour = a => b => c => d => a + b + c + d; - * - * var uncurriedAddFour = R.uncurryN(4, addFour); - * uncurriedAddFour(1, 2, 3, 4); //=> 10 - */ - var uncurryN = _curry2(function uncurryN(depth, fn) { - return curryN(depth, function () { - var currentDepth = 1; - var value = fn; - var idx = 0; - var endIdx; - while (currentDepth <= depth && typeof value === 'function') { - endIdx = currentDepth === depth ? arguments.length : idx + value.length; - value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx)); - currentDepth += 1; - idx = endIdx; - } - return value; - }); - }); - - /** - * Builds a list from a seed value. Accepts an iterator function, which returns - * either false to stop iteration or an array of length 2 containing the value - * to add to the resulting list and the seed to be used in the next call to the - * iterator function. - * - * The iterator function receives one argument: *(seed)*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (a -> [b]) -> * -> [b] - * @param {Function} fn The iterator function. receives one argument, `seed`, and returns - * either false to quit iteration or an array of length two to proceed. The element - * at index 0 of this array will be added to the resulting array, and the element - * at index 1 will be passed to the next call to `fn`. - * @param {*} seed The seed value. - * @return {Array} The final list. - * @example - * - * var f = n => n > 50 ? false : [-n, n + 10]; - * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] - * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] - */ - var unfold = _curry2(function unfold(fn, seed) { - var pair = fn(seed); - var result = []; - while (pair && pair.length) { - result[result.length] = pair[0]; - pair = fn(pair[1]); - } - return result; - }); - - /** - * Returns a new list containing only one copy of each element in the original - * list, based upon the value returned by applying the supplied predicate to - * two list elements. Prefers the first item if two items compare equal based - * on the predicate. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category List - * @sig (a, a -> Boolean) -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * var strEq = R.eqBy(String); - * R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2] - * R.uniqWith(strEq)([{}, {}]); //=> [{}] - * R.uniqWith(strEq)([1, '1', 1]); //=> [1] - * R.uniqWith(strEq)(['1', 1, 1]); //=> ['1'] - */ - var uniqWith = _curry2(function uniqWith(pred, list) { - var idx = 0; - var len = list.length; - var result = []; - var item; - while (idx < len) { - item = list[idx]; - if (!_containsWith(pred, item, result)) { - result[result.length] = item; - } - idx += 1; - } - return result; - }); - - /** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is not satisfied, the function will return the result of - * calling the `whenFalseFn` function with the same argument. If the predicate - * is satisfied, the argument is returned as is. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenFalseFn A function to invoke when the `pred` evaluates - * to a falsy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenFalseFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenFalseFn`. - * @see R.ifElse, R.when - * @example - * - * let safeInc = R.unless(R.isNil, R.inc); - * safeInc(null); //=> null - * safeInc(1); //=> 2 - */ - var unless = _curry3(function unless(pred, whenFalseFn, x) { - return pred(x) ? x : whenFalseFn(x); - }); - - /** - * Takes a predicate, a transformation function, and an initial value, - * and returns a value of the same type as the initial value. - * It does so by applying the transformation until the predicate is satisfied, - * at which point it returns the satisfactory value. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} fn The iterator function - * @param {*} init Initial value - * @return {*} Final value that satisfies predicate - * @example - * - * R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128 - */ - var until = _curry3(function until(pred, fn, init) { - var val = init; - while (!pred(val)) { - val = fn(val); - } - return val; - }); - - /** - * Returns a new copy of the array with the element at the provided index - * replaced with the given value. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig Number -> a -> [a] -> [a] - * @param {Number} idx The index to update. - * @param {*} x The value to exist at the given index of the returned array. - * @param {Array|Arguments} list The source array-like object to be updated. - * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`. - * @see R.adjust - * @example - * - * R.update(1, 11, [0, 1, 2]); //=> [0, 11, 2] - * R.update(1)(11)([0, 1, 2]); //=> [0, 11, 2] - * @symb R.update(-1, a, [b, c]) = [b, a] - * @symb R.update(0, a, [b, c]) = [a, c] - * @symb R.update(1, a, [b, c]) = [b, a] - */ - var update = _curry3(function update(idx, x, list) { - return adjust(always(x), idx, list); - }); - - /** - * Accepts a function `fn` and a list of transformer functions and returns a - * new curried function. When the new function is invoked, it calls the - * function `fn` with parameters consisting of the result of calling each - * supplied handler on successive arguments to the new function. - * - * If more arguments are passed to the returned function than transformer - * functions, those arguments are passed directly to `fn` as additional - * parameters. If you expect additional arguments that don't need to be - * transformed, although you can ignore them, it's best to pass an identity - * function so that the new function reports the correct arity. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (x1 -> x2 -> ... -> z) -> [(a -> x1), (b -> x2), ...] -> (a -> b -> ... -> z) - * @param {Function} fn The function to wrap. - * @param {Array} transformers A list of transformer functions - * @return {Function} The wrapped function. - * @see R.converge - * @example - * - * R.useWith(Math.pow, [R.identity, R.identity])(3, 4); //=> 81 - * R.useWith(Math.pow, [R.identity, R.identity])(3)(4); //=> 81 - * R.useWith(Math.pow, [R.dec, R.inc])(3, 4); //=> 32 - * R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32 - * @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b)) - */ - var useWith = _curry2(function useWith(fn, transformers) { - return curryN(transformers.length, function () { - var args = []; - var idx = 0; - while (idx < transformers.length) { - args.push(transformers[idx].call(this, arguments[idx])); - idx += 1; - } - return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length))); - }); - }); - - /** - * Returns a list of all the enumerable own properties of the supplied object. - * Note that the order of the output array is not guaranteed across different - * JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [v] - * @param {Object} obj The object to extract values from - * @return {Array} An array of the values of the object's own properties. - * @see R.valuesIn, R.keys - * @example - * - * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3] - */ - var values = _curry1(function values(obj) { - var props = keys(obj); - var len = props.length; - var vals = []; - var idx = 0; - while (idx < len) { - vals[idx] = obj[props[idx]]; - idx += 1; - } - return vals; - }); - - /** - * Returns a list of all the properties, including prototype properties, of the - * supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @sig {k: v} -> [v] - * @param {Object} obj The object to extract values from - * @return {Array} An array of the values of the object's own and prototype properties. - * @see R.values, R.keysIn - * @example - * - * var F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * var f = new F(); - * R.valuesIn(f); //=> ['X', 'Y'] - */ - var valuesIn = _curry1(function valuesIn(obj) { - var prop; - var vs = []; - for (prop in obj) { - vs[vs.length] = obj[prop]; - } - return vs; - }); - - /** - * Returns a "view" of the given data structure, determined by the given lens. - * The lens's focus determines which portion of the data structure is visible. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> s -> a - * @param {Lens} lens - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * var xLens = R.lensProp('x'); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.view(xLens, {x: 4, y: 2}); //=> 4 - */ - // `Const` is a functor that effectively ignores the function given to `map`. - // Using `Const` effectively ignores the setter function of the `lens`, - // leaving the value returned by the getter function unmodified. - var view = function () { - // `Const` is a functor that effectively ignores the function given to `map`. - var Const = function (x) { - return { - value: x, - 'fantasy-land/map': function () { - return this; - } - }; - }; - return _curry2(function view(lens, x) { - // Using `Const` effectively ignores the setter function of the `lens`, - // leaving the value returned by the getter function unmodified. - return lens(Const)(x).value; - }); - }(); - - /** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is satisfied, the function will return the result of calling - * the `whenTrueFn` function with the same argument. If the predicate is not - * satisfied, the argument is returned as is. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenTrueFn A function to invoke when the `condition` - * evaluates to a truthy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenTrueFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`. - * @see R.ifElse, R.unless - * @example - * - * // truncate :: String -> String - * var truncate = R.when( - * R.propSatisfies(R.gt(R.__, 10), 'length'), - * R.pipe(R.take(10), R.append('…'), R.join('')) - * ); - * truncate('12345'); //=> '12345' - * truncate('0123456789ABC'); //=> '0123456789…' - */ - var when = _curry3(function when(pred, whenTrueFn, x) { - return pred(x) ? whenTrueFn(x) : x; - }); - - /** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec. Each of the spec's own properties must be a predicate function. - * Each predicate is applied to the value of the corresponding property of the - * test object. `where` returns true if all the predicates return true, false - * otherwise. - * - * `where` is well suited to declaratively expressing constraints for other - * functions such as [`filter`](#filter) and [`find`](#find). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Object - * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @example - * - * // pred :: Object -> Boolean - * var pred = R.where({ - * a: R.equals('foo'), - * b: R.complement(R.equals('bar')), - * x: R.gt(R.__, 10), - * y: R.lt(R.__, 20) - * }); - * - * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true - * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false - */ - var where = _curry2(function where(spec, testObj) { - for (var prop in spec) { - if (_has(prop, spec) && !spec[prop](testObj[prop])) { - return false; - } - } - return true; - }); - - /** - * Creates a new list out of the two supplied by creating each possible pair - * from the lists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] -> [[a,b]] - * @param {Array} as The first list. - * @param {Array} bs The second list. - * @return {Array} The list made by combining each possible pair from - * `as` and `bs` into pairs (`[a, b]`). - * @example - * - * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] - * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]] - */ - // = xprodWith(prepend); (takes about 3 times as long...) - var xprod = _curry2(function xprod(a, b) { - // = xprodWith(prepend); (takes about 3 times as long...) - var idx = 0; - var ilen = a.length; - var j; - var jlen = b.length; - var result = []; - while (idx < ilen) { - j = 0; - while (j < jlen) { - result[result.length] = [ - a[idx], - b[j] - ]; - j += 1; - } - idx += 1; - } - return result; - }); - - /** - * Creates a new list out of the two supplied by pairing up equally-positioned - * items from both lists. The returned list is truncated to the length of the - * shorter of the two input lists. - * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] -> [[a,b]] - * @param {Array} list1 The first array to consider. - * @param {Array} list2 The second array to consider. - * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`. - * @example - * - * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] - * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] - */ - var zip = _curry2(function zip(a, b) { - var rv = []; - var idx = 0; - var len = Math.min(a.length, b.length); - while (idx < len) { - rv[idx] = [ - a[idx], - b[idx] - ]; - idx += 1; - } - return rv; - }); - - /** - * Creates a new object out of a list of keys and a list of values. - * Key/value pairing is truncated to the length of the shorter of the two lists. - * Note: `zipObj` is equivalent to `pipe(zipWith(pair), fromPairs)`. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [String] -> [*] -> {String: *} - * @param {Array} keys The array that will be properties on the output object. - * @param {Array} values The list of values on the output object. - * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`. - * @example - * - * R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3} - */ - var zipObj = _curry2(function zipObj(keys, values) { - var idx = 0; - var len = Math.min(keys.length, values.length); - var out = {}; - while (idx < len) { - out[keys[idx]] = values[idx]; - idx += 1; - } - return out; - }); - - /** - * Creates a new list out of the two supplied by applying the function to each - * equally-positioned pair in the lists. The returned list is truncated to the - * length of the shorter of the two input lists. - * - * @function - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a,b -> c) -> [a] -> [b] -> [c] - * @param {Function} fn The function used to combine the two elements into one value. - * @param {Array} list1 The first array to consider. - * @param {Array} list2 The second array to consider. - * @return {Array} The list made by combining same-indexed elements of `list1` and `list2` - * using `fn`. - * @example - * - * var f = (x, y) => { - * // ... - * }; - * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']); - * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')] - * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)] - */ - var zipWith = _curry3(function zipWith(fn, a, b) { - var rv = []; - var idx = 0; - var len = Math.min(a.length, b.length); - while (idx < len) { - rv[idx] = fn(a[idx], b[idx]); - idx += 1; - } - return rv; - }); - - /** - * A function that always returns `false`. Any passed in parameters are ignored. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig * -> Boolean - * @param {*} - * @return {Boolean} - * @see R.always, R.T - * @example - * - * R.F(); //=> false - */ - var F = always(false); - - /** - * A function that always returns `true`. Any passed in parameters are ignored. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig * -> Boolean - * @param {*} - * @return {Boolean} - * @see R.always, R.F - * @example - * - * R.T(); //=> true - */ - var T = always(true); - - /** - * 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. - */ - var _clone = 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; - } - }; - - var _createPartialApplicator = 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)); - }); - }); - }; - - var _dropLast = function dropLast(n, xs) { - return take(n < xs.length ? xs.length - n : 0, xs); - }; - - // Values of other types are only equal if identical. - var _equals = function _equals(a, b, stackA, stackB) { - if (identical(a, b)) { - return true; - } - if (type(a) !== 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 (type(a)) { - 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 && identical(a.valueOf(), b.valueOf()))) { - return false; - } - break; - case 'Date': - if (!identical(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; - case 'Map': - case 'Set': - if (!_equals(_arrayFromIterator(a.entries()), _arrayFromIterator(b.entries()), stackA, stackB)) { - return false; - } - break; - case 'Int8Array': - case 'Uint8Array': - case 'Uint8ClampedArray': - case 'Int16Array': - case 'Uint16Array': - case 'Int32Array': - case 'Uint32Array': - case 'Float32Array': - case 'Float64Array': - break; - 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 idx = stackA.length - 1; - while (idx >= 0) { - if (stackA[idx] === a) { - return stackB[idx] === b; - } - idx -= 1; - } - stackA.push(a); - stackB.push(b); - idx = keysA.length - 1; - while (idx >= 0) { - var key = keysA[idx]; - if (!(_has(key, b) && _equals(b[key], a[key], stackA, stackB))) { - return false; - } - idx -= 1; - } - stackA.pop(); - stackB.pop(); - return true; - }; - - var _reduce = function () { - 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'; - return 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'); - }; - }(); - - var _stepCat = function () { - 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 _assign(result, _isArrayLike(input) ? objOf(input[0], input[1]) : input); - }, - '@@transducer/result': _identity - }; - return 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); - }; - }(); - - var _xdropLastWhile = 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 _curry2(function _xdropLastWhile(fn, xf) { - return new XDropLastWhile(fn, xf); - }); - }(); - - /** - * Creates a new list iteration function from an existing one by adding two new - * parameters to its callback function: the current index, and the entire list. - * - * This would turn, for instance, [`R.map`](#map) function into one that - * more closely resembles `Array.prototype.map`. Note that this will only work - * for functions in which the iteration callback function is the first - * parameter, and where the list is the last parameter. (This latter might be - * unimportant if the list parameter is not used.) - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Function - * @category List - * @sig ((a ... -> b) ... -> [a] -> *) -> (a ..., Int, [a] -> b) ... -> [a] -> *) - * @param {Function} fn A list iteration function that does not pass index or list to its callback - * @return {Function} An altered list iteration function that passes (item, index, list) to its callback - * @example - * - * var mapIndexed = R.addIndex(R.map); - * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']); - * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r'] - */ - var addIndex = _curry1(function addIndex(fn) { - return curryN(fn.length, function () { - var idx = 0; - var origFn = arguments[0]; - var list = arguments[arguments.length - 1]; - var args = Array.prototype.slice.call(arguments, 0); - args[0] = function () { - var result = origFn.apply(this, _concat(arguments, [ - idx, - list - ])); - idx += 1; - return result; - }; - return fn.apply(this, args); - }); - }); - - /** - * Makes a shallow clone of an object, setting or overriding the nodes required - * to create the given path, and placing the specific value at the tail end of - * that path. Note that this copies and flattens prototype properties onto the - * new object as well. All non-primitive properties are copied by reference. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> {a} - * @param {Array} path the path to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except along the specified path. - * @see R.dissocPath - * @example - * - * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} - * - * // Any missing or non-object keys in path will be overridden - * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} - */ - var assocPath = _curry3(function assocPath(path, val, obj) { - if (path.length === 0) { - return val; - } - var idx = path[0]; - if (path.length > 1) { - var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {}; - val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); - } - if (_isInteger(idx) && _isArray(obj)) { - var arr = [].concat(obj); - arr[idx] = val; - return arr; - } else { - return assoc(idx, val, obj); - } - }); - - /** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 2 parameters. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> c) -> (a, b -> c) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 2. - * @see R.nAry, R.unary - * @example - * - * var takesThreeArgs = function(a, b, c) { - * return [a, b, c]; - * }; - * takesThreeArgs.length; //=> 3 - * takesThreeArgs(1, 2, 3); //=> [1, 2, 3] - * - * var takesTwoArgs = R.binary(takesThreeArgs); - * takesTwoArgs.length; //=> 2 - * // Only 2 arguments are passed to the wrapped function - * takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] - * @symb R.binary(f)(a, b, c) = f(a, b) - */ - var binary = _curry1(function binary(fn) { - return nAry(2, fn); - }); - - /** - * Creates a deep copy of the value which may contain (nested) `Array`s and - * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are - * assigned by reference rather than copied - * - * Dispatches to a `clone` method if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {*} -> {*} - * @param {*} value The object or array to clone - * @return {*} A deeply cloned copy of `val` - * @example - * - * var objects = [{}, {}, {}]; - * var objectsClone = R.clone(objects); - * objects === objectsClone; //=> false - * objects[0] === objectsClone[0]; //=> false - */ - var clone = _curry1(function clone(value) { - return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true); - }); - - /** - * Returns a curried equivalent of the provided function. The curried function - * has two unusual capabilities. First, its arguments needn't be provided one - * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the - * following are equivalent: - * - * - `g(1)(2)(3)` - * - `g(1)(2, 3)` - * - `g(1, 2)(3)` - * - `g(1, 2, 3)` - * - * Secondly, the special placeholder value [`R.__`](#__) may be used to specify - * "gaps", allowing partial application of any combination of arguments, - * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), - * the following are equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (* -> a) -> (* -> a) - * @param {Function} fn The function to curry. - * @return {Function} A new, curried function. - * @see R.curryN - * @example - * - * var addFourNumbers = (a, b, c, d) => a + b + c + d; - * - * var curriedAddFourNumbers = R.curry(addFourNumbers); - * var f = curriedAddFourNumbers(1, 2); - * var g = f(3); - * g(4); //=> 10 - */ - var curry = _curry1(function curry(fn) { - return curryN(fn.length, fn); - }); - - /** - * Makes a shallow clone of an object, omitting the property at the given path. - * Note that this copies and flattens prototype properties onto the new object - * as well. All non-primitive properties are copied by reference. - * - * @func - * @memberOf R - * @since v0.11.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {k: v} -> {k: v} - * @param {Array} path The path to the value to omit - * @param {Object} obj The object to clone - * @return {Object} A new object without the property at path - * @see R.assocPath - * @example - * - * R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}} - */ - var dissocPath = _curry2(function dissocPath(path, obj) { - switch (path.length) { - case 0: - return obj; - case 1: - return _isInteger(path[0]) ? remove(path[0], 1, obj) : dissoc(path[0], obj); - default: - var head = path[0]; - var tail = Array.prototype.slice.call(path, 1); - if (obj[head] == null) { - return obj; - } else if (_isInteger(path[0])) { - return update(head, dissocPath(tail, obj[head]), obj); - } else { - return assoc(head, dissocPath(tail, obj[head]), obj); - } - } - }); - - /** - * Returns all but the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `drop` method). - * - * Dispatches to the `drop` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} A copy of list without the first `n` elements - * @see R.take, R.transduce, R.dropLast, R.dropWhile - * @example - * - * R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.drop(3, ['foo', 'bar', 'baz']); //=> [] - * R.drop(4, ['foo', 'bar', 'baz']); //=> [] - * R.drop(3, 'ramda'); //=> 'da' - */ - var drop = _curry2(_dispatchable(['drop'], _xdrop, function drop(n, xs) { - return slice(Math.max(0, n), Infinity, xs); - })); - - /** - * Returns a list containing all but the last `n` elements of the given `list`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements of `list` to skip. - * @param {Array} list The list of elements to consider. - * @return {Array} A copy of the list with only the first `list.length - n` elements - * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile - * @example - * - * R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.dropLast(3, ['foo', 'bar', 'baz']); //=> [] - * R.dropLast(4, ['foo', 'bar', 'baz']); //=> [] - * R.dropLast(3, 'ramda'); //=> 'ra' - */ - var dropLast = _curry2(_dispatchable([], _xdropLast, _dropLast)); - - /** - * Returns a new list excluding all the tailing elements of a given list which - * satisfy the supplied predicate function. It passes each value from the right - * to the supplied predicate function, skipping elements until the predicate - * function returns a `falsy` value. The predicate function is applied to one argument: - * *(value)*. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @param {Function} predicate The function to be called on each element - * @param {Array} list The collection to iterate over. - * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`. - * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile - * @example - * - * var lteThree = x => x <= 3; - * - * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4] - */ - var dropLastWhile = _curry2(_dispatchable([], _xdropLastWhile, _dropLastWhile)); - - /** - * Returns `true` if its arguments are equivalent, `false` otherwise. Handles - * cyclical data structures. - * - * Dispatches symmetrically to the `equals` methods of both arguments, if - * present. - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Relation - * @sig a -> b -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @example - * - * R.equals(1, 1); //=> true - * R.equals(1, '1'); //=> false - * R.equals([1, 2, 3], [1, 2, 3]); //=> true - * - * var a = {}; a.v = a; - * var b = {}; b.v = b; - * R.equals(a, b); //=> true - */ - var equals = _curry2(function equals(a, b) { - return _equals(a, b, [], []); - }); - - /** - * Takes a predicate and a `Filterable`, and returns a new filterable of the - * same type containing the members of the given filterable which satisfy the - * given predicate. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * Dispatches to the `filter` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} Filterable - * @see R.reject, R.transduce, R.addIndex - * @example - * - * var isEven = n => n % 2 === 0; - * - * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] - * - * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ - // else - var filter = _curry2(_dispatchable(['filter'], _xfilter, function (pred, filterable) { - return _isObject(filterable) ? _reduce(function (acc, key) { - if (pred(filterable[key])) { - acc[key] = filterable[key]; - } - return acc; - }, {}, keys(filterable)) : // else - _filter(pred, filterable); - })); - - /** - * Returns a new function much like the supplied one, except that the first two - * arguments' order is reversed. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a -> b -> c -> ... -> z) -> (b -> a -> c -> ... -> z) - * @param {Function} fn The function to invoke with its first two parameters reversed. - * @return {*} The result of invoking `fn` with its first two parameters' order reversed. - * @example - * - * var mergeThree = (a, b, c) => [].concat(a, b, c); - * - * mergeThree(1, 2, 3); //=> [1, 2, 3] - * - * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] - * @symb R.flip(f)(a, b, c) = f(b, a, c) - */ - var flip = _curry1(function flip(fn) { - return curry(function (a, b) { - var args = Array.prototype.slice.call(arguments, 0); - args[0] = b; - args[1] = a; - return fn.apply(this, args); - }); - }); - - /** - * Iterate over an input `object`, calling a provided function `fn` for each - * key and value in the object. - * - * `fn` receives three argument: *(value, key, obj)*. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Object - * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a - * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`. - * @param {Object} obj The object to iterate over. - * @return {Object} The original object. - * @example - * - * var printKeyConcatValue = (value, key) => console.log(key + ':' + value); - * R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2} - * // logs x:1 - * // logs y:2 - * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b} - */ - var forEachObjIndexed = _curry2(function forEachObjIndexed(fn, obj) { - var keyList = keys(obj); - var idx = 0; - while (idx < keyList.length) { - var key = keyList[idx]; - fn(obj[key], key, obj); - idx += 1; - } - return obj; - }); - - /** - * Returns the first element of the given list or string. In some libraries - * this function is named `first`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> a | Undefined - * @sig String -> String - * @param {Array|String} list - * @return {*} - * @see R.tail, R.init, R.last - * @example - * - * R.head(['fi', 'fo', 'fum']); //=> 'fi' - * R.head([]); //=> undefined - * - * R.head('abc'); //=> 'a' - * R.head(''); //=> '' - */ - var head = nth(0); - - /** - * Returns all but the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.last, R.head, R.tail - * @example - * - * R.init([1, 2, 3]); //=> [1, 2] - * R.init([1, 2]); //=> [1] - * R.init([1]); //=> [] - * R.init([]); //=> [] - * - * R.init('abc'); //=> 'ab' - * R.init('ab'); //=> 'a' - * R.init('a'); //=> '' - * R.init(''); //=> '' - */ - var init = slice(0, -1); - - /** - * Combines two lists into a set (i.e. no duplicates) composed of those - * elements common to both lists. Duplication is determined according to the - * value returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate function that determines whether - * the two supplied elements are equal. - * @param {Array} list1 One list of items to compare - * @param {Array} list2 A second list of items to compare - * @return {Array} A new list containing those elements common to both lists. - * @see R.innerJoin - * @deprecated since v0.24.0 - * @example - * - * var buffaloSpringfield = [ - * {id: 824, name: 'Richie Furay'}, - * {id: 956, name: 'Dewey Martin'}, - * {id: 313, name: 'Bruce Palmer'}, - * {id: 456, name: 'Stephen Stills'}, - * {id: 177, name: 'Neil Young'} - * ]; - * var csny = [ - * {id: 204, name: 'David Crosby'}, - * {id: 456, name: 'Stephen Stills'}, - * {id: 539, name: 'Graham Nash'}, - * {id: 177, name: 'Neil Young'} - * ]; - * - * R.intersectionWith(R.eqBy(R.prop('id')), buffaloSpringfield, csny); - * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] - */ - var intersectionWith = _curry3(function intersectionWith(pred, list1, list2) { - var lookupList, filteredList; - if (list1.length > list2.length) { - lookupList = list1; - filteredList = list2; - } else { - lookupList = list2; - filteredList = list1; - } - var results = []; - var idx = 0; - while (idx < filteredList.length) { - if (_containsWith(pred, filteredList[idx], lookupList)) { - results[results.length] = filteredList[idx]; - } - idx += 1; - } - return uniqWith(pred, results); - }); - - /** - * Transforms the items of the list with the transducer and appends the - * transformed items to the accumulator using an appropriate iterator function - * based on the accumulator type. - * - * The accumulator can be an array, string, object or a transformer. Iterated - * items will be appended to arrays and concatenated to strings. Objects will - * be merged directly or 2-item arrays will be merged as key, value pairs. - * - * The accumulator can also be a transformer object that provides a 2-arity - * reducing iterator function, step, 0-arity initial value function, init, and - * 1-arity result extraction function result. The step function is used as the - * iterator function in reduce. The result function is used to convert the - * final accumulator into the return type and in most cases is R.identity. The - * init function is used to provide the initial accumulator. - * - * The iteration is performed with [`R.reduce`](#reduce) after initializing the - * transducer. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig a -> (b -> b) -> [c] -> a - * @param {*} acc The initial accumulator value. - * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @example - * - * var numbers = [1, 2, 3, 4]; - * var transducer = R.compose(R.map(R.add(1)), R.take(2)); - * - * R.into([], transducer, numbers); //=> [2, 3] - * - * var intoArray = R.into([]); - * intoArray(transducer, numbers); //=> [2, 3] - */ - var into = _curry3(function into(acc, xf, list) { - return _isTransformer(acc) ? _reduce(xf(acc), acc['@@transducer/init'](), list) : _reduce(xf(_stepCat(acc)), _clone(acc, [], [], false), list); - }); - - /** - * Same as [`R.invertObj`](#invertObj), however this accounts for objects with - * duplicate values by putting the values into an array. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {s: x} -> {x: [ s, ... ]} - * @param {Object} obj The object or array to invert - * @return {Object} out A new object with keys in an array. - * @see R.invertObj - * @example - * - * var raceResultsByFirstName = { - * first: 'alice', - * second: 'jake', - * third: 'alice', - * }; - * R.invert(raceResultsByFirstName); - * //=> { 'alice': ['first', 'third'], 'jake':['second'] } - */ - var invert = _curry1(function invert(obj) { - var props = keys(obj); - var len = props.length; - var idx = 0; - var out = {}; - while (idx < len) { - var key = props[idx]; - var val = obj[key]; - var list = _has(val, out) ? out[val] : out[val] = []; - list[list.length] = key; - idx += 1; - } - return out; - }); - - /** - * Returns a new object with the keys of the given object as values, and the - * values of the given object, which are coerced to strings, as keys. Note - * that the last key found is preferred when handling the same value. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {s: x} -> {x: s} - * @param {Object} obj The object or array to invert - * @return {Object} out A new object - * @see R.invert - * @example - * - * var raceResults = { - * first: 'alice', - * second: 'jake' - * }; - * R.invertObj(raceResults); - * //=> { 'alice': 'first', 'jake':'second' } - * - * // Alternatively: - * var raceResults = ['alice', 'jake']; - * R.invertObj(raceResults); - * //=> { 'alice': '0', 'jake':'1' } - */ - var invertObj = _curry1(function invertObj(obj) { - var props = keys(obj); - var len = props.length; - var idx = 0; - var out = {}; - while (idx < len) { - var key = props[idx]; - out[obj[key]] = key; - idx += 1; - } - return out; - }); - - /** - * Returns `true` if the given value is its type's empty value; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> Boolean - * @param {*} x - * @return {Boolean} - * @see R.empty - * @example - * - * R.isEmpty([1, 2, 3]); //=> false - * R.isEmpty([]); //=> true - * R.isEmpty(''); //=> true - * R.isEmpty(null); //=> false - * R.isEmpty({}); //=> true - * R.isEmpty({length: 0}); //=> false - */ - var isEmpty = _curry1(function isEmpty(x) { - return x != null && equals(x, empty(x)); - }); - - /** - * Returns the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig [a] -> a | Undefined - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.init, R.head, R.tail - * @example - * - * R.last(['fi', 'fo', 'fum']); //=> 'fum' - * R.last([]); //=> undefined - * - * R.last('abc'); //=> 'c' - * R.last(''); //=> '' - */ - var last = nth(-1); - - /** - * Returns the position of the last occurrence of an item in an array, or -1 if - * the item is not included in the array. [`R.equals`](#equals) is used to - * determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Number - * @param {*} target The item to find. - * @param {Array} xs The array to search in. - * @return {Number} the index of the target, or -1 if the target is not found. - * @see R.indexOf - * @example - * - * R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6 - * R.lastIndexOf(10, [1,2,3,4]); //=> -1 - */ - var lastIndexOf = _curry2(function lastIndexOf(target, xs) { - if (typeof xs.lastIndexOf === 'function' && !_isArray(xs)) { - return xs.lastIndexOf(target); - } else { - var idx = xs.length - 1; - while (idx >= 0) { - if (equals(xs[idx], target)) { - return idx; - } - idx -= 1; - } - return -1; - } - }); - - /** - * Takes a function and - * a [functor](https://github.com/fantasyland/fantasy-land#functor), - * applies the function to each of the functor's values, and returns - * a functor of the same shape. - * - * Ramda provides suitable `map` implementations for `Array` and `Object`, - * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`. - * - * Dispatches to the `map` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * Also treats functions as functors and will compose them together. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Functor f => (a -> b) -> f a -> f b - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {Array} list The list to be iterated over. - * @return {Array} The new list. - * @see R.transduce, R.addIndex - * @example - * - * var double = x => x * 2; - * - * R.map(double, [1, 2, 3]); //=> [2, 4, 6] - * - * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6} - * @symb R.map(f, [a, b]) = [f(a), f(b)] - * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) } - * @symb R.map(f, functor_o) = functor_o.map(f) - */ - var map = _curry2(_dispatchable([ - 'fantasy-land/map', - 'map' - ], _xmap, function map(fn, functor) { - switch (Object.prototype.toString.call(functor)) { - case '[object Function]': - return curryN(functor.length, function () { - return fn.call(this, functor.apply(this, arguments)); - }); - case '[object Object]': - return _reduce(function (acc, key) { - acc[key] = fn(functor[key]); - return acc; - }, {}, keys(functor)); - default: - return _map(fn, functor); - } - })); - - /** - * An Object-specific version of [`map`](#map). The function is applied to three - * arguments: *(value, key, obj)*. If only the value is significant, use - * [`map`](#map) instead. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig ((*, String, Object) -> *) -> Object -> Object - * @param {Function} fn - * @param {Object} obj - * @return {Object} - * @see R.map - * @example - * - * var values = { x: 1, y: 2, z: 3 }; - * var prependKeyAndDouble = (num, key, obj) => key + (num * 2); - * - * R.mapObjIndexed(prependKeyAndDouble, values); //=> { x: 'x2', y: 'y4', z: 'z6' } - */ - var mapObjIndexed = _curry2(function mapObjIndexed(fn, obj) { - return _reduce(function (acc, key) { - acc[key] = fn(obj[key], key, obj); - return acc; - }, {}, keys(obj)); - }); - - /** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to the key and associated values - * using the resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig (String -> a -> a -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWithKey, R.mergeDeep, R.mergeDeepWith - * @example - * - * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r - * R.mergeDeepWithKey(concatValues, - * { a: true, c: { thing: 'foo', values: [10, 20] }}, - * { b: true, c: { thing: 'bar', values: [15, 35] }}); - * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }} - */ - var mergeDeepWithKey = _curry3(function mergeDeepWithKey(fn, lObj, rObj) { - return mergeWithKey(function (k, lVal, rVal) { - if (_isObject(lVal) && _isObject(rVal)) { - return mergeDeepWithKey(fn, lVal, rVal); - } else { - return fn(k, lVal, rVal); - } - }, lObj, rObj); - }); - - /** - * Creates a new object with the own properties of the two provided objects. If - * a key exists in both objects, the provided function is applied to the values - * associated with the key in each object, with the result being used as the - * value associated with the key in the returned object. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @sig (a -> a -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepWith, R.merge, R.mergeWithKey - * @example - * - * R.mergeWith(R.concat, - * { a: true, values: [10, 20] }, - * { b: true, values: [15, 35] }); - * //=> { a: true, b: true, values: [10, 20, 15, 35] } - */ - var mergeWith = _curry3(function mergeWith(fn, l, r) { - return mergeWithKey(function (_, _l, _r) { - return fn(_l, _r); - }, l, r); - }); - - /** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided initially followed by the arguments provided to `g`. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partialRight - * @example - * - * var multiply2 = (a, b) => a * b; - * var double = R.partial(multiply2, [2]); - * double(2); //=> 4 - * - * var greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; - * - * var sayHello = R.partial(greet, ['Hello']); - * var sayHelloToMs = R.partial(sayHello, ['Ms.']); - * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) - */ - var partial = _createPartialApplicator(_concat); - - /** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided to `g` followed by the arguments provided initially. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partial - * @example - * - * var greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; - * - * var greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); - * - * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) - */ - var partialRight = _createPartialApplicator(flip(_concat)); - - /** - * Determines whether a nested path on an object has a specific value, in - * [`R.equals`](#equals) terms. Most likely used to filter a list. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Relation - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> Boolean - * @param {Array} path The path of the nested property to use - * @param {*} val The value to compare the nested property with - * @param {Object} obj The object to check the nested property in - * @return {Boolean} `true` if the value equals the nested object property, - * `false` otherwise. - * @example - * - * var user1 = { address: { zipCode: 90210 } }; - * var user2 = { address: { zipCode: 55555 } }; - * var user3 = { name: 'Bob' }; - * var users = [ user1, user2, user3 ]; - * var isFamous = R.pathEq(['address', 'zipCode'], 90210); - * R.filter(isFamous, users); //=> [ user1 ] - */ - var pathEq = _curry3(function pathEq(_path, val, obj) { - return equals(path(_path, obj), val); - }); - - /** - * Returns a new list by plucking the same named property off all objects in - * the list supplied. - * - * `pluck` will work on - * any [functor](https://github.com/fantasyland/fantasy-land#functor) in - * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Functor f => k -> f {k: v} -> f v - * @param {Number|String} key The key name to pluck off of each object. - * @param {Array} f The array or functor to consider. - * @return {Array} The list of values for the given key. - * @see R.props - * @example - * - * R.pluck('a')([{a: 1}, {a: 2}]); //=> [1, 2] - * R.pluck(0)([[1, 2], [3, 4]]); //=> [1, 3] - * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5} - * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] - * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] - */ - var pluck = _curry2(function pluck(p, list) { - return map(prop(p), list); - }); - - /** - * Reasonable analog to SQL `select` statement. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @category Relation - * @sig [k] -> [{k: v}] -> [{k: v}] - * @param {Array} props The property names to project - * @param {Array} objs The objects to query - * @return {Array} An array of objects with just the `props` properties. - * @example - * - * var abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2}; - * var fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7}; - * var kids = [abby, fred]; - * R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] - */ - // passing `identity` gives correct arity - var project = useWith(_map, [ - pickAll, - identity - ]); - - /** - * Returns `true` if the specified object property is equal, in - * [`R.equals`](#equals) terms, to the given value; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig String -> a -> Object -> Boolean - * @param {String} name - * @param {*} val - * @param {*} obj - * @return {Boolean} - * @see R.equals, R.propSatisfies - * @example - * - * var abby = {name: 'Abby', age: 7, hair: 'blond'}; - * var fred = {name: 'Fred', age: 12, hair: 'brown'}; - * var rusty = {name: 'Rusty', age: 10, hair: 'brown'}; - * var alois = {name: 'Alois', age: 15, disposition: 'surly'}; - * var kids = [abby, fred, rusty, alois]; - * var hasBrownHair = R.propEq('hair', 'brown'); - * R.filter(hasBrownHair, kids); //=> [fred, rusty] - */ - var propEq = _curry3(function propEq(name, val, obj) { - return equals(val, obj[name]); - }); - - /** - * Returns a single item by iterating through the list, successively calling - * the iterator function and passing it an accumulator value and the current - * value from the array, and then passing the result to the next call. - * - * The iterator function receives two values: *(acc, value)*. It may use - * [`R.reduced`](#reduced) to shortcut the iteration. - * - * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function - * is *(value, acc)*. - * - * Note: `R.reduce` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.reduce` method. For more details - * on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description - * - * Dispatches to the `reduce` method of the third argument, if present. When - * doing so, it is up to the user to handle the [`R.reduced`](#reduced) - * shortcuting, as this is not implemented by `reduce`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> a) -> a -> [b] -> a - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduced, R.addIndex, R.reduceRight - * @example - * - * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 - * - -10 - * / \ / \ - * - 4 -6 4 - * / \ / \ - * - 3 ==> -3 3 - * / \ / \ - * - 2 -1 2 - * / \ / \ - * 0 1 0 1 - * - * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) - */ - var reduce = _curry3(_reduce); - - /** - * Groups the elements of the list according to the result of calling - * the String-returning function `keyFn` on each element and reduces the elements - * of each group to a single value via the reducer function `valueFn`. - * - * This function is basically a more general [`groupBy`](#groupBy) function. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category List - * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a} - * @param {Function} valueFn The function that reduces the elements of each group to a single - * value. Receives two values, accumulator for a particular group and the current element. - * @param {*} acc The (initial) accumulator value for each group. - * @param {Function} keyFn The function that maps the list's element into a key. - * @param {Array} list The array to group. - * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of - * `valueFn` for elements which produced that key when passed to `keyFn`. - * @see R.groupBy, R.reduce - * @example - * - * var reduceToNamesBy = R.reduceBy((acc, student) => acc.concat(student.name), []); - * var namesByGrade = reduceToNamesBy(function(student) { - * var score = student.score; - * return score < 65 ? 'F' : - * score < 70 ? 'D' : - * score < 80 ? 'C' : - * score < 90 ? 'B' : 'A'; - * }); - * var students = [{name: 'Lucy', score: 92}, - * {name: 'Drew', score: 85}, - * // ... - * {name: 'Bart', score: 62}]; - * namesByGrade(students); - * // { - * // 'A': ['Lucy'], - * // 'B': ['Drew'] - * // // ..., - * // 'F': ['Bart'] - * // } - */ - var reduceBy = _curryN(4, [], _dispatchable([], _xreduceBy, function reduceBy(valueFn, valueAcc, keyFn, list) { - return _reduce(function (acc, elt) { - var key = keyFn(elt); - acc[key] = valueFn(_has(key, acc) ? acc[key] : valueAcc, elt); - return acc; - }, {}, list); - })); - - /** - * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating - * through the list, successively calling the iterator function. `reduceWhile` - * also takes a predicate that is evaluated before each step. If the predicate - * returns `false`, it "short-circuits" the iteration and returns the current - * value of the accumulator. - * - * @func - * @memberOf R - * @since v0.22.0 - * @category List - * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a - * @param {Function} pred The predicate. It is passed the accumulator and the - * current element. - * @param {Function} fn The iterator function. Receives two values, the - * accumulator and the current element. - * @param {*} a The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.reduced - * @example - * - * var isOdd = (acc, x) => x % 2 === 1; - * var xs = [1, 3, 5, 60, 777, 800]; - * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9 - * - * var ys = [2, 4, 6] - * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111 - */ - var reduceWhile = _curryN(4, [], function _reduceWhile(pred, fn, a, list) { - return _reduce(function (acc, x) { - return pred(acc, x) ? fn(acc, x) : _reduced(acc); - }, a, list); - }); - - /** - * The complement of [`filter`](#filter). - * - * Acts as a transducer if a transformer is given in list position. Filterable - * objects include plain objects or any object that has a filter method such - * as `Array`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} - * @see R.filter, R.transduce, R.addIndex - * @example - * - * var isOdd = (n) => n % 2 === 1; - * - * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] - * - * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ - var reject = _curry2(function reject(pred, filterable) { - return filter(_complement(pred), filterable); - }); - - /** - * Returns a fixed list of size `n` containing a specified identical value. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig a -> n -> [a] - * @param {*} value The value to repeat. - * @param {Number} n The desired size of the output list. - * @return {Array} A new array containing `n` `value`s. - * @see R.times - * @example - * - * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi'] - * - * var obj = {}; - * var repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}] - * repeatedObjs[0] === repeatedObjs[1]; //=> true - * @symb R.repeat(a, 0) = [] - * @symb R.repeat(a, 1) = [a] - * @symb R.repeat(a, 2) = [a, a] - */ - var repeat = _curry2(function repeat(value, n) { - return times(always(value), n); - }); - - /** - * Checks if a list starts with the provided values - * - * @func - * @memberOf R - * @since v0.24.0 - * @category List - * @sig [a] -> Boolean - * @sig String -> Boolean - * @param {*} prefix - * @param {*} list - * @return {Boolean} - * @example - * - * R.startsWith('a', 'abc') //=> true - * R.startsWith('b', 'abc') //=> false - * R.startsWith(['a'], ['a', 'b', 'c']) //=> true - * R.startsWith(['b'], ['a', 'b', 'c']) //=> false - */ - var startsWith = _curry2(function (prefix, list) { - return equals(take(prefix.length, list), prefix); - }); - - /** - * Adds together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The sum of all the numbers in the list. - * @see R.reduce - * @example - * - * R.sum([2,4,6,8,100,1]); //=> 121 - */ - var sum = reduce(add, 0); - - /** - * Returns a new list containing the last `n` elements of the given list. - * If `n > list.length`, returns a list of `list.length` elements. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements to return. - * @param {Array} xs The collection to consider. - * @return {Array} - * @see R.dropLast - * @example - * - * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(3, 'ramda'); //=> 'mda' - */ - var takeLast = _curry2(function takeLast(n, xs) { - return drop(n >= 0 ? xs.length - n : 0, xs); - }); - - /** - * Initializes a transducer using supplied iterator function. Returns a single - * item by iterating through the list, successively calling the transformed - * iterator function and passing it an accumulator value and the current value - * from the array, and then passing the result to the next call. - * - * The iterator function receives two values: *(acc, value)*. It will be - * wrapped as a transformer to initialize the transducer. A transformer can be - * passed directly in place of an iterator function. In both cases, iteration - * may be stopped early with the [`R.reduced`](#reduced) function. - * - * A transducer is a function that accepts a transformer and returns a - * transformer and can be composed directly. - * - * A transformer is an an object that provides a 2-arity reducing iterator - * function, step, 0-arity initial value function, init, and 1-arity result - * extraction function, result. The step function is used as the iterator - * function in reduce. The result function is used to convert the final - * accumulator into the return type and in most cases is - * [`R.identity`](#identity). The init function can be used to provide an - * initial accumulator, but is ignored by transduce. - * - * The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig (c -> c) -> ((a, b) -> a) -> a -> [b] -> a - * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array. Wrapped as transformer, if necessary, and used to - * initialize the transducer - * @param {*} acc The initial accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.reduced, R.into - * @example - * - * var numbers = [1, 2, 3, 4]; - * var transducer = R.compose(R.map(R.add(1)), R.take(2)); - * R.transduce(transducer, R.flip(R.append), [], numbers); //=> [2, 3] - * - * var isOdd = (x) => x % 2 === 1; - * var firstOddTransducer = R.compose(R.filter(isOdd), R.take(1)); - * R.transduce(firstOddTransducer, R.flip(R.append), [], R.range(0, 100)); //=> [1] - */ - var transduce = curryN(4, function transduce(xf, fn, acc, list) { - return _reduce(xf(typeof fn === 'function' ? _xwrap(fn) : fn), acc, list); - }); - - /** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. Duplication is determined according to the value returned by - * applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig (a -> a -> Boolean) -> [*] -> [*] -> [*] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @see R.union - * @example - * - * var l1 = [{a: 1}, {a: 2}]; - * var l2 = [{a: 1}, {a: 4}]; - * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] - */ - var unionWith = _curry3(function unionWith(pred, list1, list2) { - return uniqWith(pred, _concat(list1, list2)); - }); - - /** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec, false otherwise. An object satisfies the spec if, for each of the - * spec's own properties, accessing that property of the object gives the same - * value (in [`R.equals`](#equals) terms) as accessing that property of the - * spec. - * - * `whereEq` is a specialization of [`where`](#where). - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @sig {String: *} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @see R.where - * @example - * - * // pred :: Object -> Boolean - * var pred = R.whereEq({a: 1, b: 2}); - * - * pred({a: 1}); //=> false - * pred({a: 1, b: 2}); //=> true - * pred({a: 1, b: 2, c: 3}); //=> true - * pred({a: 1, b: 1}); //=> false - */ - var whereEq = _curry2(function whereEq(spec, testObj) { - return where(map(equals, spec), testObj); - }); - - var _flatCat = function () { - 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; - } - }; - }; - return 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); - } - }; - }; - }(); - - // Array.prototype.indexOf doesn't exist below IE9 - // manually crawl the list to distinguish between +0 and -0 - // NaN - // non-zero numbers can utilise Set - // all these types can utilise Set - // null can utilise Set - // anything else not covered above, defer to R.equals - var _indexOf = 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; - }; - - var _xchain = _curry2(function _xchain(f, xf) { - return map(f, _flatCat(xf)); - }); - - /** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if every one of the provided predicates is satisfied - * by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.anyPass - * @example - * - * var isQueen = R.propEq('rank', 'Q'); - * var isSpade = R.propEq('suit', '♠︎'); - * var isQueenOfSpades = R.allPass([isQueen, isSpade]); - * - * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false - * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true - */ - var allPass = _curry1(function allPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function () { - var idx = 0; - var len = preds.length; - while (idx < len) { - if (!preds[idx].apply(this, arguments)) { - return false; - } - idx += 1; - } - return true; - }); - }); - - /** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if at least one of the provided predicates is - * satisfied by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.allPass - * @example - * - * var isClub = R.propEq('suit', '♣'); - * var isSpade = R.propEq('suit', '♠'); - * var isBlackCard = R.anyPass([isClub, isSpade]); - * - * isBlackCard({rank: '10', suit: '♣'}); //=> true - * isBlackCard({rank: 'Q', suit: '♠'}); //=> true - * isBlackCard({rank: 'Q', suit: '♦'}); //=> false - */ - var anyPass = _curry1(function anyPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function () { - var idx = 0; - var len = preds.length; - while (idx < len) { - if (preds[idx].apply(this, arguments)) { - return true; - } - idx += 1; - } - return false; - }); - }); - - /** - * ap applies a list of functions to a list of values. - * - * Dispatches to the `ap` method of the second argument, if present. Also - * treats curried functions as applicatives. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig [a -> b] -> [a] -> [b] - * @sig Apply f => f (a -> b) -> f a -> f b - * @param {*} applyF - * @param {*} applyX - * @return {*} - * @example - * - * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6] - * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"] - * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)] - */ - // else - var ap = _curry2(function ap(applyF, applyX) { - return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) { - return applyF(x)(applyX(x)); - } : // else - _reduce(function (acc, f) { - return _concat(acc, map(f, applyX)); - }, [], applyF); - }); - - /** - * Given a spec object recursively mapping properties to functions, creates a - * function producing an object of the same structure, by mapping each property - * to the result of calling its associated function with the supplied arguments. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Function - * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) - * @param {Object} spec an object recursively mapping properties to functions for - * producing the values for these properties. - * @return {Function} A function that returns an object of the same structure - * as `spec', with each property set to the value returned by calling its - * associated function with the supplied arguments. - * @see R.converge, R.juxt - * @example - * - * var getMetrics = R.applySpec({ - * sum: R.add, - * nested: { mul: R.multiply } - * }); - * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } - * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } - */ - var applySpec = _curry1(function applySpec(spec) { - spec = map(function (v) { - return typeof v == 'function' ? v : applySpec(v); - }, spec); - return curryN(reduce(max, 0, pluck('length', values(spec))), function () { - var args = arguments; - return map(function (f) { - return apply(f, args); - }, spec); - }); - }); - - /** - * Returns the result of calling its first argument with the remaining - * arguments. This is occasionally useful as a converging function for - * [`R.converge`](#converge): the first branch can produce a function while the - * remaining branches produce values to be passed to that function as its - * arguments. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig (*... -> a),*... -> a - * @param {Function} fn The function to apply to the remaining arguments. - * @param {...*} args Any number of positional arguments. - * @return {*} - * @see R.apply - * @example - * - * R.call(R.add, 1, 2); //=> 3 - * - * var indentN = R.pipe(R.times(R.always(' ')), - * R.join(''), - * R.replace(/^(?!$)/gm)); - * - * var format = R.converge(R.call, [ - * R.pipe(R.prop('indent'), indentN), - * R.prop('value') - * ]); - * - * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' - * @symb R.call(f, a, b) = f(a, b) - */ - var call = curry(function call(fn) { - return fn.apply(this, Array.prototype.slice.call(arguments, 1)); - }); - - /** - * `chain` maps a function over a list and concatenates the results. `chain` - * is also known as `flatMap` in some libraries - * - * Dispatches to the `chain` method of the second argument, if present, - * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain). - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig Chain m => (a -> m b) -> m a -> m b - * @param {Function} fn The function to map with - * @param {Array} list The list to map over - * @return {Array} The result of flat-mapping `list` with `fn` - * @example - * - * var duplicate = n => [n, n]; - * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] - * - * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1] - */ - var chain = _curry2(_dispatchable([ - 'fantasy-land/chain', - 'chain' - ], _xchain, function chain(fn, monad) { - if (typeof monad === 'function') { - return function (x) { - return fn(monad(x))(x); - }; - } - return _makeFlat(false)(map(fn, monad)); - })); - - /** - * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic. - * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments - * to `fn` are applied to each of the predicates in turn until one returns a - * "truthy" value, at which point `fn` returns the result of applying its - * arguments to the corresponding transformer. If none of the predicates - * matches, `fn` returns undefined. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Logic - * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *) - * @param {Array} pairs A list of [predicate, transformer] - * @return {Function} - * @example - * - * var fn = R.cond([ - * [R.equals(0), R.always('water freezes at 0°C')], - * [R.equals(100), R.always('water boils at 100°C')], - * [R.T, temp => 'nothing special happens at ' + temp + '°C'] - * ]); - * fn(0); //=> 'water freezes at 0°C' - * fn(50); //=> 'nothing special happens at 50°C' - * fn(100); //=> 'water boils at 100°C' - */ - var cond = _curry1(function cond(pairs) { - var arity = reduce(max, 0, map(function (pair) { - return pair[0].length; - }, pairs)); - return _arity(arity, function () { - var idx = 0; - while (idx < pairs.length) { - if (pairs[idx][0].apply(this, arguments)) { - return pairs[idx][1].apply(this, arguments); - } - idx += 1; - } - }); - }); - - /** - * Wraps a constructor function inside a curried function that can be called - * with the same arguments and returns the same type. The arity of the function - * returned is specified to allow using variadic constructor functions. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Function - * @sig Number -> (* -> {*}) -> (* -> {*}) - * @param {Number} n The arity of the constructor function. - * @param {Function} Fn The constructor function to wrap. - * @return {Function} A wrapped, curried constructor function. - * @example - * - * // Variadic Constructor function - * function Salad() { - * this.ingredients = arguments; - * }; - * Salad.prototype.recipe = function() { - * var instructions = R.map((ingredient) => ( - * 'Add a whollop of ' + ingredient, this.ingredients) - * ) - * return R.join('\n', instructions) - * } - * - * var ThreeLayerSalad = R.constructN(3, Salad) - * - * // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments. - * var salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup') - * console.log(salad.recipe()); - * // Add a whollop of Mayonnaise - * // Add a whollop of Potato Chips - * // Add a whollop of Potato Ketchup - */ - var constructN = _curry2(function constructN(n, Fn) { - if (n > 10) { - throw new Error('Constructor with greater than ten arguments'); - } - if (n === 0) { - return function () { - return new Fn(); - }; - } - return curry(nAry(n, function ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { - switch (arguments.length) { - case 1: - return new Fn($0); - case 2: - return new Fn($0, $1); - case 3: - return new Fn($0, $1, $2); - case 4: - return new Fn($0, $1, $2, $3); - case 5: - return new Fn($0, $1, $2, $3, $4); - case 6: - return new Fn($0, $1, $2, $3, $4, $5); - case 7: - return new Fn($0, $1, $2, $3, $4, $5, $6); - case 8: - return new Fn($0, $1, $2, $3, $4, $5, $6, $7); - case 9: - return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8); - case 10: - return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9); - } - })); - }); - - /** - * Accepts a converging function and a list of branching functions and returns - * a new function. When invoked, this new function is applied to some - * arguments, each branching function is applied to those same arguments. The - * results of each branching function are passed as arguments to the converging - * function to produce the return value. - * - * @func - * @memberOf R - * @since v0.4.2 - * @category Function - * @sig (x1 -> x2 -> ... -> z) -> [(a -> b -> ... -> x1), (a -> b -> ... -> x2), ...] -> (a -> b -> ... -> z) - * @param {Function} after A function. `after` will be invoked with the return values of - * `fn1` and `fn2` as its arguments. - * @param {Array} functions A list of functions. - * @return {Function} A new function. - * @see R.useWith - * @example - * - * var average = R.converge(R.divide, [R.sum, R.length]) - * average([1, 2, 3, 4, 5, 6, 7]) //=> 4 - * - * var strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower]) - * strangeConcat("Yodel") //=> "YODELyodel" - * - * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b)) - */ - var converge = _curry2(function converge(after, fns) { - return curryN(reduce(max, 0, pluck('length', fns)), function () { - var args = arguments; - var context = this; - return after.apply(context, _map(function (fn) { - return fn.apply(context, args); - }, fns)); - }); - }); - - /** - * Counts the elements of a list according to how many match each value of a - * key generated by the supplied function. Returns an object mapping the keys - * produced by `fn` to the number of occurrences in the list. Note that all - * keys are coerced to strings because of how JavaScript objects work. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig (a -> String) -> [a] -> {*} - * @param {Function} fn The function used to map values to keys. - * @param {Array} list The list to count elements from. - * @return {Object} An object mapping keys to number of occurrences in the list. - * @example - * - * var numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2]; - * R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1} - * - * var letters = ['a', 'b', 'A', 'a', 'B', 'c']; - * R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1} - */ - var countBy = reduceBy(function (acc, elem) { - return acc + 1; - }, 0); - - /** - * Returns a new list without any consecutively repeating elements. Equality is - * determined by applying the supplied predicate to each pair of consecutive elements. The - * first element in a series of equal elements will be preserved. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig (a, a -> Boolean) -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * var l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3]; - * R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3] - */ - var dropRepeatsWith = _curry2(_dispatchable([], _xdropRepeatsWith, function dropRepeatsWith(pred, list) { - var result = []; - var idx = 1; - var len = list.length; - if (len !== 0) { - result[0] = list[0]; - while (idx < len) { - if (!pred(last(result), list[idx])) { - result[result.length] = list[idx]; - } - idx += 1; - } - } - return result; - })); - - /** - * Checks if a list ends with the provided values - * - * @func - * @memberOf R - * @since v0.24.0 - * @category List - * @sig [a] -> Boolean - * @sig String -> Boolean - * @param {*} suffix - * @param {*} list - * @return {Boolean} - * @example - * - * R.endsWith('c', 'abc') //=> true - * R.endsWith('b', 'abc') //=> false - * R.endsWith(['c'], ['a', 'b', 'c']) //=> true - * R.endsWith(['b'], ['a', 'b', 'c']) //=> false - */ - var endsWith = _curry2(function (suffix, list) { - return equals(takeLast(suffix.length, list), suffix); - }); - - /** - * Takes a function and two values in its domain and returns `true` if the - * values map to the same value in the codomain; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Relation - * @sig (a -> b) -> a -> a -> Boolean - * @param {Function} f - * @param {*} x - * @param {*} y - * @return {Boolean} - * @example - * - * R.eqBy(Math.abs, 5, -5); //=> true - */ - var eqBy = _curry3(function eqBy(f, x, y) { - return equals(f(x), f(y)); - }); - - /** - * Reports whether two objects have the same value, in [`R.equals`](#equals) - * terms, for the specified property. Useful as a curried predicate. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig k -> {k: v} -> {k: v} -> Boolean - * @param {String} prop The name of the property to compare - * @param {Object} obj1 - * @param {Object} obj2 - * @return {Boolean} - * - * @example - * - * var o1 = { a: 1, b: 2, c: 3, d: 4 }; - * var o2 = { a: 10, b: 20, c: 3, d: 40 }; - * R.eqProps('a', o1, o2); //=> false - * R.eqProps('c', o1, o2); //=> true - */ - var eqProps = _curry3(function eqProps(prop, obj1, obj2) { - return equals(obj1[prop], obj2[prop]); - }); - - /** - * Splits a list into sub-lists stored in an object, based on the result of - * calling a String-returning function on each element, and grouping the - * results according to values returned. - * - * Dispatches to the `groupBy` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> String) -> [a] -> {String: [a]} - * @param {Function} fn Function :: a -> String - * @param {Array} list The array to group - * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements - * that produced that key when passed to `fn`. - * @see R.transduce - * @example - * - * var byGrade = R.groupBy(function(student) { - * var score = student.score; - * return score < 65 ? 'F' : - * score < 70 ? 'D' : - * score < 80 ? 'C' : - * score < 90 ? 'B' : 'A'; - * }); - * var students = [{name: 'Abby', score: 84}, - * {name: 'Eddy', score: 58}, - * // ... - * {name: 'Jack', score: 69}]; - * byGrade(students); - * // { - * // 'A': [{name: 'Dianne', score: 99}], - * // 'B': [{name: 'Abby', score: 84}] - * // // ..., - * // 'F': [{name: 'Eddy', score: 58}] - * // } - */ - var groupBy = _curry2(_checkForMethod('groupBy', reduceBy(function (acc, item) { - if (acc == null) { - acc = []; - } - acc.push(item); - return acc; - }, null))); - - /** - * Given a function that generates a key, turns a list of objects into an - * object indexing the objects by the given key. Note that if multiple - * objects generate the same value for the indexing key only the last value - * will be included in the generated object. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (a -> String) -> [{k: v}] -> {k: {k: v}} - * @param {Function} fn Function :: a -> String - * @param {Array} array The array of objects to index - * @return {Object} An object indexing each array element by the given property. - * @example - * - * var list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}]; - * R.indexBy(R.prop('id'), list); - * //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}} - */ - var indexBy = reduceBy(function (acc, elem) { - return elem; - }, null); - - /** - * Returns the position of the first occurrence of an item in an array, or -1 - * if the item is not included in the array. [`R.equals`](#equals) is used to - * determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Number - * @param {*} target The item to find. - * @param {Array} xs The array to search in. - * @return {Number} the index of the target, or -1 if the target is not found. - * @see R.lastIndexOf - * @example - * - * R.indexOf(3, [1,2,3,4]); //=> 2 - * R.indexOf(10, [1,2,3,4]); //=> -1 - */ - var indexOf = _curry2(function indexOf(target, xs) { - return typeof xs.indexOf === 'function' && !_isArray(xs) ? xs.indexOf(target) : _indexOf(xs, target, 0); - }); - - /** - * juxt applies a list of functions to a list of values. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Function - * @sig [(a, b, ..., m) -> n] -> ((a, b, ..., m) -> [n]) - * @param {Array} fns An array of functions - * @return {Function} A function that returns a list of values after applying each of the original `fns` to its parameters. - * @see R.applySpec - * @example - * - * var getRange = R.juxt([Math.min, Math.max]); - * getRange(3, 4, 9, -3); //=> [-3, 9] - * @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)] - */ - var juxt = _curry1(function juxt(fns) { - return converge(function () { - return Array.prototype.slice.call(arguments, 0); - }, fns); - }); - - /** - * Returns a lens for the given getter and setter functions. The getter "gets" - * the value of the focus; the setter "sets" the value of the focus. The setter - * should not mutate the data structure. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig (s -> a) -> ((a, s) -> s) -> Lens s a - * @param {Function} getter - * @param {Function} setter - * @return {Lens} - * @see R.view, R.set, R.over, R.lensIndex, R.lensProp - * @example - * - * var xLens = R.lens(R.prop('x'), R.assoc('x')); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} - */ - var lens = _curry2(function lens(getter, setter) { - return function (toFunctorFn) { - return function (target) { - return map(function (focus) { - return setter(focus, target); - }, toFunctorFn(getter(target))); - }; - }; - }); - - /** - * Returns a lens whose focus is the specified index. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Number -> Lens s a - * @param {Number} n - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * var headLens = R.lensIndex(0); - * - * R.view(headLens, ['a', 'b', 'c']); //=> 'a' - * R.set(headLens, 'x', ['a', 'b', 'c']); //=> ['x', 'b', 'c'] - * R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c'] - */ - var lensIndex = _curry1(function lensIndex(n) { - return lens(nth(n), update(n)); - }); - - /** - * Returns a lens whose focus is the specified path. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @typedefn Idx = String | Int - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig [Idx] -> Lens s a - * @param {Array} path The path to use. - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * var xHeadYLens = R.lensPath(['x', 0, 'y']); - * - * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> 2 - * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} - * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} - */ - var lensPath = _curry1(function lensPath(p) { - return lens(path(p), assocPath(p)); - }); - - /** - * Returns a lens whose focus is the specified property. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig String -> Lens s a - * @param {String} k - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * var xLens = R.lensProp('x'); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} - */ - var lensProp = _curry1(function lensProp(k) { - return lens(prop(k), assoc(k)); - }); - - /** - * "lifts" a function to be the specified arity, so that it may "map over" that - * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig Number -> (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.lift, R.ap - * @example - * - * var madd3 = R.liftN(3, (...args) => R.sum(args)); - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - */ - var liftN = _curry2(function liftN(arity, fn) { - var lifted = curryN(arity, fn); - return curryN(arity, function () { - return _reduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1)); - }); - }); - - /** - * Returns the mean of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.median - * @example - * - * R.mean([2, 7, 9]); //=> 6 - * R.mean([]); //=> NaN - */ - var mean = _curry1(function mean(list) { - return sum(list) / list.length; - }); - - /** - * Returns the median of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.mean - * @example - * - * R.median([2, 9, 7]); //=> 7 - * R.median([7, 2, 10, 9]); //=> 8 - * R.median([]); //=> NaN - */ - var median = _curry1(function median(list) { - var len = list.length; - if (len === 0) { - return NaN; - } - var width = 2 - len % 2; - var idx = (len - width) / 2; - return mean(Array.prototype.slice.call(list, 0).sort(function (a, b) { - return a < b ? -1 : a > b ? 1 : 0; - }).slice(idx, idx + width)); - }); - - /** - * Creates a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects: - * - and both values are objects, the two values will be recursively merged - * - otherwise the value from the first object will be used. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig {a} -> {a} -> {a} - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, - * { age: 40, contact: { email: 'baa@example.com' }}); - * //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }} - */ - var mergeDeepLeft = _curry2(function mergeDeepLeft(lObj, rObj) { - return mergeDeepWithKey(function (k, lVal, rVal) { - return lVal; - }, lObj, rObj); - }); - - /** - * Creates a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects: - * - and both values are objects, the two values will be recursively merged - * - otherwise the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig {a} -> {a} -> {a} - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, - * { age: 40, contact: { email: 'baa@example.com' }}); - * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }} - */ - var mergeDeepRight = _curry2(function mergeDeepRight(lObj, rObj) { - return mergeDeepWithKey(function (k, lVal, rVal) { - return rVal; - }, lObj, rObj); - }); - - /** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to associated values using the - * resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig (a -> a -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWith, R.mergeDeep, R.mergeDeepWithKey - * @example - * - * R.mergeDeepWith(R.concat, - * { a: true, c: { values: [10, 20] }}, - * { b: true, c: { values: [15, 35] }}); - * //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }} - */ - var mergeDeepWith = _curry3(function mergeDeepWith(fn, lObj, rObj) { - return mergeDeepWithKey(function (k, lVal, rVal) { - return fn(lVal, rVal); - }, lObj, rObj); - }); - - /** - * Takes a predicate and a list or other `Filterable` object and returns the - * pair of filterable objects of the same type of elements which do and do not - * satisfy, the predicate, respectively. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> [f a, f a] - * @param {Function} pred A predicate to determine which side the element belongs to. - * @param {Array} filterable the list (or other filterable) to partition. - * @return {Array} An array, containing first the subset of elements that satisfy the - * predicate, and second the subset of elements that do not satisfy. - * @see R.filter, R.reject - * @example - * - * R.partition(R.contains('s'), ['sss', 'ttt', 'foo', 'bars']); - * // => [ [ 'sss', 'bars' ], [ 'ttt', 'foo' ] ] - * - * R.partition(R.contains('s'), { a: 'sss', b: 'ttt', foo: 'bars' }); - * // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' } ] - */ - var partition = juxt([ - filter, - reject - ]); - - /** - * Performs left-to-right function composition. The leftmost function may have - * any arity; the remaining functions must be unary. - * - * In some libraries this function is named `sequence`. - * - * **Note:** The result of pipe is not automatically curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z) - * @param {...Function} functions - * @return {Function} - * @see R.compose - * @example - * - * var f = R.pipe(Math.pow, R.negate, R.inc); - * - * f(3, 4); // -(3^4) + 1 - * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) - */ - var pipe = function pipe() { - if (arguments.length === 0) { - throw new Error('pipe requires at least one argument'); - } - return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments))); - }; - - /** - * Performs left-to-right composition of one or more Promise-returning - * functions. The leftmost function may have any arity; the remaining functions - * must be unary. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z) - * @param {...Function} functions - * @return {Function} - * @see R.composeP - * @example - * - * // followersForUser :: String -> Promise [User] - * var followersForUser = R.pipeP(db.getUserById, db.getFollowers); - */ - var pipeP = function pipeP() { - if (arguments.length === 0) { - throw new Error('pipeP requires at least one argument'); - } - return _arity(arguments[0].length, reduce(_pipeP, arguments[0], tail(arguments))); - }; - - /** - * Multiplies together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The product of all the numbers in the list. - * @see R.reduce - * @example - * - * R.product([2,4,6,8,100,1]); //=> 38400 - */ - var product = reduce(multiply, 1); - - /** - * Transforms a [Traversable](https://github.com/fantasyland/fantasy-land#traversable) - * of [Applicative](https://github.com/fantasyland/fantasy-land#applicative) into an - * Applicative of Traversable. - * - * Dispatches to the `sequence` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (Applicative f, Traversable t) => (a -> f a) -> t (f a) -> f (t a) - * @param {Function} of - * @param {*} traversable - * @return {*} - * @see R.traverse - * @example - * - * R.sequence(Maybe.of, [Just(1), Just(2), Just(3)]); //=> Just([1, 2, 3]) - * R.sequence(Maybe.of, [Just(1), Just(2), Nothing()]); //=> Nothing() - * - * R.sequence(R.of, Just([1, 2, 3])); //=> [Just(1), Just(2), Just(3)] - * R.sequence(R.of, Nothing()); //=> [Nothing()] - */ - var sequence = _curry2(function sequence(of, traversable) { - return typeof traversable.sequence === 'function' ? traversable.sequence(of) : reduceRight(function (x, acc) { - return ap(map(prepend, x), acc); - }, of([]), traversable); - }); - - /** - * Maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning - * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable), - * then uses [`sequence`](#sequence) to transform the resulting Traversable of Applicative - * into an Applicative of Traversable. - * - * Dispatches to the `sequence` method of the third argument, if present. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (Applicative f, Traversable t) => (a -> f a) -> (a -> f b) -> t a -> f (t b) - * @param {Function} of - * @param {Function} f - * @param {*} traversable - * @return {*} - * @see R.sequence - * @example - * - * // Returns `Nothing` if the given divisor is `0` - * safeDiv = n => d => d === 0 ? Nothing() : Just(n / d) - * - * R.traverse(Maybe.of, safeDiv(10), [2, 4, 5]); //=> Just([5, 2.5, 2]) - * R.traverse(Maybe.of, safeDiv(10), [2, 0, 5]); //=> Nothing - */ - var traverse = _curry3(function traverse(of, f, traversable) { - return typeof traversable['fantasy-land/traverse'] === 'function' ? traversable['fantasy-land/traverse'](f, of) : sequence(of, map(f, traversable)); - }); - - /** - * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from - * any [Chain](https://github.com/fantasyland/fantasy-land#chain). - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig Chain c => c (c a) -> c a - * @param {*} list - * @return {*} - * @see R.flatten, R.chain - * @example - * - * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]] - * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6] - */ - var unnest = chain(_identity); - - var _contains = function _contains(a, list) { - return _indexOf(list, a, 0) >= 0; - }; - - // mapPairs :: (Object, [String]) -> [String] - var _toString = function _toString(x, seen) { - var recur = function recur(y) { - var xs = seen.concat([x]); - return _contains(y, xs) ? '' : _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(', ') + '}'; - } - }; - - /** - * Performs right-to-left function composition. The rightmost function may have - * any arity; the remaining functions must be unary. - * - * **Note:** The result of compose is not automatically curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.pipe - * @example - * - * var classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName - * var yellGreeting = R.compose(R.toUpper, classyGreeting); - * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" - * - * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 - * - * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) - */ - var compose = function compose() { - if (arguments.length === 0) { - throw new Error('compose requires at least one argument'); - } - return pipe.apply(this, reverse(arguments)); - }; - - /** - * Returns the right-to-left Kleisli composition of the provided functions, - * each of which must return a value of a type supported by [`chain`](#chain). - * - * `R.composeK(h, g, f)` is equivalent to `R.compose(R.chain(h), R.chain(g), R.chain(f))`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Function - * @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.pipeK - * @example - * - * // get :: String -> Object -> Maybe * - * var get = R.curry((propName, obj) => Maybe(obj[propName])) - * - * // getStateCode :: Maybe String -> Maybe String - * var getStateCode = R.composeK( - * R.compose(Maybe.of, R.toUpper), - * get('state'), - * get('address'), - * get('user'), - * ); - * getStateCode({"user":{"address":{"state":"ny"}}}); //=> Maybe.Just("NY") - * getStateCode({}); //=> Maybe.Nothing() - * @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a))) - */ - var composeK = function composeK() { - if (arguments.length === 0) { - throw new Error('composeK requires at least one argument'); - } - var init = Array.prototype.slice.call(arguments); - var last = init.pop(); - return compose(compose.apply(this, map(chain, init)), last); - }; - - /** - * Performs right-to-left composition of one or more Promise-returning - * functions. The rightmost function may have any arity; the remaining - * functions must be unary. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z) - * @param {...Function} functions The functions to compose - * @return {Function} - * @see R.pipeP - * @example - * - * var db = { - * users: { - * JOE: { - * name: 'Joe', - * followers: ['STEVE', 'SUZY'] - * } - * } - * } - * - * // We'll pretend to do a db lookup which returns a promise - * var lookupUser = (userId) => Promise.resolve(db.users[userId]) - * var lookupFollowers = (user) => Promise.resolve(user.followers) - * lookupUser('JOE').then(lookupFollowers) - * - * // followersForUser :: String -> Promise [UserId] - * var followersForUser = R.composeP(lookupFollowers, lookupUser); - * followersForUser('JOE').then(followers => console.log('Followers:', followers)) - * // Followers: ["STEVE","SUZY"] - */ - var composeP = function composeP() { - if (arguments.length === 0) { - throw new Error('composeP requires at least one argument'); - } - return pipeP.apply(this, reverse(arguments)); - }; - - /** - * Wraps a constructor function inside a curried function that can be called - * with the same arguments and returns the same type. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (* -> {*}) -> (* -> {*}) - * @param {Function} fn The constructor function to wrap. - * @return {Function} A wrapped, curried constructor function. - * @see R.invoker - * @example - * - * // Constructor function - * function Animal(kind) { - * this.kind = kind; - * }; - * Animal.prototype.sighting = function() { - * return "It's a " + this.kind + "!"; - * } - * - * var AnimalConstructor = R.construct(Animal) - * - * // Notice we no longer need the 'new' keyword: - * AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}}; - * - * var animalTypes = ["Lion", "Tiger", "Bear"]; - * var animalSighting = R.invoker(0, 'sighting'); - * var sightNewAnimal = R.compose(animalSighting, AnimalConstructor); - * R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"] - */ - var construct = _curry1(function construct(Fn) { - return constructN(Fn.length, Fn); - }); - - /** - * Returns `true` if the specified value is equal, in [`R.equals`](#equals) - * terms, to at least one element of the given list; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Boolean - * @param {Object} a The item to compare against. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. - * @see R.any - * @example - * - * R.contains(3, [1, 2, 3]); //=> true - * R.contains(4, [1, 2, 3]); //=> false - * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true - * R.contains([42], [[42]]); //=> true - */ - var contains = _curry2(_contains); - - /** - * Finds the set (i.e. no duplicates) of all elements in the first list not - * contained in the second list. Objects and Arrays are compared in terms of - * value equality, not reference equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` that are not in `list2`. - * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without - * @example - * - * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2] - * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5] - * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}] - */ - var difference = _curry2(function difference(first, second) { - var out = []; - var idx = 0; - var firstLen = first.length; - while (idx < firstLen) { - if (!_contains(first[idx], second) && !_contains(first[idx], out)) { - out[out.length] = first[idx]; - } - idx += 1; - } - return out; - }); - - /** - * Returns a new list without any consecutively repeating elements. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] - */ - var dropRepeats = _curry1(_dispatchable([], _xdropRepeatsWith(equals), dropRepeatsWith(equals))); - - /** - * "lifts" a function of arity > 1 so that it may "map over" a list, Function or other - * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.liftN - * @example - * - * var madd3 = R.lift((a, b, c) => a + b + c); - * - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - * - * var madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); - * - * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] - */ - var lift = _curry1(function lift(fn) { - return liftN(fn.length, fn); - }); - - /** - * Returns a partial copy of an object omitting the keys specified. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [String] -> {String: *} -> {String: *} - * @param {Array} names an array of String property names to omit from the new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with properties from `names` not on it. - * @see R.pick - * @example - * - * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} - */ - var omit = _curry2(function omit(names, obj) { - var result = {}; - for (var prop in obj) { - if (!_contains(prop, names)) { - result[prop] = obj[prop]; - } - } - return result; - }); - - /** - * Returns the left-to-right Kleisli composition of the provided functions, - * each of which must return a value of a type supported by [`chain`](#chain). - * - * `R.pipeK(f, g, h)` is equivalent to `R.pipe(R.chain(f), R.chain(g), R.chain(h))`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Function - * @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (a -> m z) - * @param {...Function} - * @return {Function} - * @see R.composeK - * @example - * - * // parseJson :: String -> Maybe * - * // get :: String -> Object -> Maybe * - * - * // getStateCode :: Maybe String -> Maybe String - * var getStateCode = R.pipeK( - * parseJson, - * get('user'), - * get('address'), - * get('state'), - * R.compose(Maybe.of, R.toUpper) - * ); - * - * getStateCode('{"user":{"address":{"state":"ny"}}}'); - * //=> Just('NY') - * getStateCode('[Invalid JSON]'); - * //=> Nothing() - * @symb R.pipeK(f, g, h)(a) = R.chain(h, R.chain(g, f(a))) - */ - var pipeK = function pipeK() { - if (arguments.length === 0) { - throw new Error('pipeK requires at least one argument'); - } - return composeK.apply(this, reverse(arguments)); - }; - - /** - * Returns the string representation of the given value. `eval`'ing the output - * should result in a value equivalent to the input value. Many of the built-in - * `toString` methods do not satisfy this requirement. - * - * If the given value is an `[object Object]` with a `toString` method other - * than `Object.prototype.toString`, this method is invoked with no arguments - * to produce the return value. This means user-defined constructor functions - * can provide a suitable `toString` method. For example: - * - * function Point(x, y) { - * this.x = x; - * this.y = y; - * } - * - * Point.prototype.toString = function() { - * return 'new Point(' + this.x + ', ' + this.y + ')'; - * }; - * - * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)' - * - * @func - * @memberOf R - * @since v0.14.0 - * @category String - * @sig * -> String - * @param {*} val - * @return {String} - * @example - * - * R.toString(42); //=> '42' - * R.toString('abc'); //=> '"abc"' - * R.toString([1, 2, 3]); //=> '[1, 2, 3]' - * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}' - * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")' - */ - var toString = _curry1(function toString(val) { - return _toString(val, []); - }); - - /** - * Returns a new list without values in the first argument. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [a] -> [a] -> [a] - * @param {Array} list1 The values to be removed from `list2`. - * @param {Array} list2 The array to remove values from. - * @return {Array} The new array without values in `list1`. - * @see R.transduce, R.difference - * @example - * - * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] - */ - var without = _curry2(function (xs, list) { - return reject(flip(_contains)(xs), list); - }); - - // A simple Set type that honours R.equals semantics - /* globals Set */ - // 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 - // - // - // @param item The item to check for existence in the Set - // @returns {boolean} true if the item exists in the Set, otherwise false - // - // - // 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. - // - // distinguish between +0 and -0 - // these types can all utilise the native Set - // set._items['boolean'] holds a two element array - // representing [ falseExists, trueExists ] - // compare functions for reference equality - /* falls through */ - // reduce the search size of heterogeneous sets by creating buckets - // for each type. - // scan through all previously applied items - var _Set = 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. - // - 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 (!_contains(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 (!_contains(item, set._items[type])) { - if (shouldAdd) { - set._items[type].push(item); - } - return false; - } - return true; - } - } - return _Set; - }(); - - /** - * A function which calls the two provided functions and returns the `&&` - * of the results. - * It returns the result of the first function if it is false-y and the result - * of the second function otherwise. Note that this is short-circuited, - * meaning that the second function will not be invoked if the first returns a - * false-y value. - * - * In addition to functions, `R.both` also accepts any fantasy-land compatible - * applicative functor. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) - * @param {Function} f A predicate - * @param {Function} g Another predicate - * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together. - * @see R.and - * @example - * - * var gt10 = R.gt(R.__, 10) - * var lt20 = R.lt(R.__, 20) - * var f = R.both(gt10, lt20); - * f(15); //=> true - * f(30); //=> false - */ - var both = _curry2(function both(f, g) { - return _isFunction(f) ? function _both() { - return f.apply(this, arguments) && g.apply(this, arguments); - } : lift(and)(f, g); - }); - - /** - * Takes a function `f` and returns a function `g` such that if called with the same arguments - * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`. - * - * `R.complement` may be applied to any functor - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> *) -> (*... -> Boolean) - * @param {Function} f - * @return {Function} - * @see R.not - * @example - * - * var isNotNil = R.complement(R.isNil); - * isNil(null); //=> true - * isNotNil(null); //=> false - * isNil(7); //=> false - * isNotNil(7); //=> true - */ - var complement = lift(not); - - /** - * Returns the result of concatenating the given lists or strings. - * - * Note: `R.concat` expects both arguments to be of the same type, - * unlike the native `Array.prototype.concat` method. It will throw - * an error if you `concat` an Array with a non-Array value. - * - * Dispatches to the `concat` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] -> [a] - * @sig String -> String -> String - * @param {Array|String} firstList The first list - * @param {Array|String} secondList The second list - * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of - * `secondList`. - * - * @example - * - * R.concat('ABC', 'DEF'); // 'ABCDEF' - * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] - * R.concat([], []); //=> [] - */ - var concat = _curry2(function concat(a, b) { - if (_isArray(a)) { - if (_isArray(b)) { - return a.concat(b); - } - throw new TypeError(toString(b) + ' is not an array'); - } - if (_isString(a)) { - if (_isString(b)) { - return a + b; - } - throw new TypeError(toString(b) + ' is not a string'); - } - if (a != null && _isFunction(a['fantasy-land/concat'])) { - return a['fantasy-land/concat'](b); - } - if (a != null && _isFunction(a.concat)) { - return a.concat(b); - } - throw new TypeError(toString(a) + ' does not have a method named "concat" or "fantasy-land/concat"'); - }); - - /** - * A function wrapping calls to the two functions in an `||` operation, - * returning the result of the first function if it is truth-y and the result - * of the second function otherwise. Note that this is short-circuited, - * meaning that the second function will not be invoked if the first returns a - * truth-y value. - * - * In addition to functions, `R.either` also accepts any fantasy-land compatible - * applicative functor. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) - * @param {Function} f a predicate - * @param {Function} g another predicate - * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together. - * @see R.or - * @example - * - * var gt10 = x => x > 10; - * var even = x => x % 2 === 0; - * var f = R.either(gt10, even); - * f(101); //=> true - * f(8); //=> true - */ - var either = _curry2(function either(f, g) { - return _isFunction(f) ? function _either() { - return f.apply(this, arguments) || g.apply(this, arguments); - } : lift(or)(f, g); - }); - - /** - * Turns a named method with a specified arity into a function that can be - * called directly supplied with arguments and a target object. - * - * The returned function is curried and accepts `arity + 1` parameters where - * the final parameter is the target object. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *) - * @param {Number} arity Number of arguments the returned function should take - * before the target object. - * @param {String} method Name of the method to call. - * @return {Function} A new curried function. - * @see R.construct - * @example - * - * var sliceFrom = R.invoker(1, 'slice'); - * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm' - * var sliceFrom6 = R.invoker(2, 'slice')(6); - * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh' - * @symb R.invoker(0, 'method')(o) = o['method']() - * @symb R.invoker(1, 'method')(a, o) = o['method'](a) - * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b) - */ - var invoker = _curry2(function invoker(arity, method) { - return curryN(arity + 1, function () { - var target = arguments[arity]; - if (target != null && _isFunction(target[method])) { - return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity)); - } - throw new TypeError(toString(target) + ' does not have a method named "' + method + '"'); - }); - }); - - /** - * Returns a string made by inserting the `separator` between each element and - * concatenating all the elements into a single string. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig String -> [a] -> String - * @param {Number|String} separator The string used to separate the elements. - * @param {Array} xs The elements to join into a string. - * @return {String} str The string made by concatenating `xs` with `separator`. - * @see R.split - * @example - * - * var spacer = R.join(' '); - * spacer(['a', 2, 3.4]); //=> 'a 2 3.4' - * R.join('|', [1, 2, 3]); //=> '1|2|3' - */ - var join = invoker(1, 'join'); - - /** - * Creates a new function that, when invoked, caches the result of calling `fn` - * for a given argument set and returns the result. Subsequent calls to the - * memoized `fn` with the same argument set will not result in an additional - * call to `fn`; instead, the cached result for that set of arguments will be - * returned. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (*... -> a) -> (*... -> a) - * @param {Function} fn The function to memoize. - * @return {Function} Memoized version of `fn`. - * @see R.memoizeWith - * @example - * - * let count = 0; - * const factorial = R.memoize(n => { - * count += 1; - * return R.product(R.range(1, n + 1)); - * }); - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * count; //=> 1 - */ - var memoize = memoizeWith(function () { - return toString(arguments); - }); - - /** - * Splits a string into an array of strings based on the given - * separator. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category String - * @sig (String | RegExp) -> String -> [String] - * @param {String|RegExp} sep The pattern. - * @param {String} str The string to separate into an array. - * @return {Array} The array of strings from `str` separated by `str`. - * @see R.join - * @example - * - * var pathComponents = R.split('/'); - * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node'] - * - * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd'] - */ - var split = invoker(1, 'split'); - - /** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifferenceWith, R.difference, R.differenceWith - * @example - * - * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] - * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] - */ - var symmetricDifference = _curry2(function symmetricDifference(list1, list2) { - return concat(difference(list1, list2), difference(list2, list1)); - }); - - /** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. Duplication is determined according to the value - * returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifference, R.difference, R.differenceWith - * @example - * - * var eqA = R.eqBy(R.prop('a')); - * var l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; - * var l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; - * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] - */ - var symmetricDifferenceWith = _curry3(function symmetricDifferenceWith(pred, list1, list2) { - return concat(differenceWith(pred, list1, list2), differenceWith(pred, list2, list1)); - }); - - /** - * Determines whether a given string matches a given regular expression. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category String - * @sig RegExp -> String -> Boolean - * @param {RegExp} pattern - * @param {String} str - * @return {Boolean} - * @see R.match - * @example - * - * R.test(/^x/, 'xyz'); //=> true - * R.test(/^y/, 'xyz'); //=> false - */ - var test = _curry2(function test(pattern, str) { - if (!_isRegExp(pattern)) { - throw new TypeError('\u2018test\u2019 requires a value of type RegExp as its first argument; received ' + toString(pattern)); - } - return _cloneRegExp(pattern).test(str); - }); - - /** - * The lower case version of a string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category String - * @sig String -> String - * @param {String} str The string to lower case. - * @return {String} The lower case version of `str`. - * @see R.toUpper - * @example - * - * R.toLower('XYZ'); //=> 'xyz' - */ - var toLower = invoker(0, 'toLowerCase'); - - /** - * The upper case version of a string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category String - * @sig String -> String - * @param {String} str The string to upper case. - * @return {String} The upper case version of `str`. - * @see R.toLower - * @example - * - * R.toUpper('abc'); //=> 'ABC' - */ - var toUpper = invoker(0, 'toUpperCase'); - - /** - * Returns a new list containing only one copy of each element in the original - * list, based upon the value returned by applying the supplied function to - * each list element. Prefers the first item if the supplied function produces - * the same value on two items. [`R.equals`](#equals) is used for comparison. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> b) -> [a] -> [a] - * @param {Function} fn A function used to produce a value to use during comparisons. - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10] - */ - var uniqBy = _curry2(function uniqBy(fn, list) { - var set = new _Set(); - var result = []; - var idx = 0; - var appliedItem, item; - while (idx < list.length) { - item = list[idx]; - appliedItem = fn(item); - if (set.add(appliedItem)) { - result.push(item); - } - idx += 1; - } - return result; - }); - - /** - * Returns a new list containing only one copy of each element in the original - * list. [`R.equals`](#equals) is used to determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniq([1, 1, 2, 1]); //=> [1, 2] - * R.uniq([1, '1']); //=> [1, '1'] - * R.uniq([[42], [42]]); //=> [[42]] - */ - var uniq = uniqBy(identity); - - /** - * Combines two lists into a set (i.e. no duplicates) composed of those - * elements common to both lists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The list of elements found in both `list1` and `list2`. - * @see R.innerJoin - * @example - * - * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3] - */ - var intersection = _curry2(function intersection(list1, list2) { - var lookupList, filteredList; - if (list1.length > list2.length) { - lookupList = list1; - filteredList = list2; - } else { - lookupList = list2; - filteredList = list1; - } - return uniq(_filter(flip(_contains)(lookupList), filteredList)); - }); - - /** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} as The first list. - * @param {Array} bs The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @example - * - * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4] - */ - var union = _curry2(compose(uniq, _concat)); - - var R = { - F: F, - T: T, - __: __, - add: add, - addIndex: addIndex, - adjust: adjust, - all: all, - allPass: allPass, - always: always, - and: and, - any: any, - anyPass: anyPass, - ap: ap, - aperture: aperture, - append: append, - apply: apply, - applySpec: applySpec, - ascend: ascend, - assoc: assoc, - assocPath: assocPath, - binary: binary, - bind: bind, - both: both, - call: call, - chain: chain, - clamp: clamp, - clone: clone, - comparator: comparator, - complement: complement, - compose: compose, - composeK: composeK, - composeP: composeP, - concat: concat, - cond: cond, - construct: construct, - constructN: constructN, - contains: contains, - converge: converge, - countBy: countBy, - curry: curry, - curryN: curryN, - dec: dec, - defaultTo: defaultTo, - descend: descend, - difference: difference, - differenceWith: differenceWith, - dissoc: dissoc, - dissocPath: dissocPath, - divide: divide, - drop: drop, - dropLast: dropLast, - dropLastWhile: dropLastWhile, - dropRepeats: dropRepeats, - dropRepeatsWith: dropRepeatsWith, - dropWhile: dropWhile, - either: either, - empty: empty, - endsWith: endsWith, - eqBy: eqBy, - eqProps: eqProps, - equals: equals, - evolve: evolve, - filter: filter, - find: find, - findIndex: findIndex, - findLast: findLast, - findLastIndex: findLastIndex, - flatten: flatten, - flip: flip, - forEach: forEach, - forEachObjIndexed: forEachObjIndexed, - fromPairs: fromPairs, - groupBy: groupBy, - groupWith: groupWith, - gt: gt, - gte: gte, - has: has, - hasIn: hasIn, - head: head, - identical: identical, - identity: identity, - ifElse: ifElse, - inc: inc, - indexBy: indexBy, - indexOf: indexOf, - init: init, - innerJoin: innerJoin, - insert: insert, - insertAll: insertAll, - intersection: intersection, - intersectionWith: intersectionWith, - intersperse: intersperse, - into: into, - invert: invert, - invertObj: invertObj, - invoker: invoker, - is: is, - isEmpty: isEmpty, - isNil: isNil, - join: join, - juxt: juxt, - keys: keys, - keysIn: keysIn, - last: last, - lastIndexOf: lastIndexOf, - length: length, - lens: lens, - lensIndex: lensIndex, - lensPath: lensPath, - lensProp: lensProp, - lift: lift, - liftN: liftN, - lt: lt, - lte: lte, - map: map, - mapAccum: mapAccum, - mapAccumRight: mapAccumRight, - mapObjIndexed: mapObjIndexed, - match: match, - mathMod: mathMod, - max: max, - maxBy: maxBy, - mean: mean, - median: median, - memoize: memoize, - memoizeWith: memoizeWith, - merge: merge, - mergeAll: mergeAll, - mergeDeepLeft: mergeDeepLeft, - mergeDeepRight: mergeDeepRight, - mergeDeepWith: mergeDeepWith, - mergeDeepWithKey: mergeDeepWithKey, - mergeWith: mergeWith, - mergeWithKey: mergeWithKey, - min: min, - minBy: minBy, - modulo: modulo, - multiply: multiply, - nAry: nAry, - negate: negate, - none: none, - not: not, - nth: nth, - nthArg: nthArg, - o: o, - objOf: objOf, - of: of, - omit: omit, - once: once, - or: or, - over: over, - pair: pair, - partial: partial, - partialRight: partialRight, - partition: partition, - path: path, - pathEq: pathEq, - pathOr: pathOr, - pathSatisfies: pathSatisfies, - pick: pick, - pickAll: pickAll, - pickBy: pickBy, - pipe: pipe, - pipeK: pipeK, - pipeP: pipeP, - pluck: pluck, - prepend: prepend, - product: product, - project: project, - prop: prop, - propEq: propEq, - propIs: propIs, - propOr: propOr, - propSatisfies: propSatisfies, - props: props, - range: range, - reduce: reduce, - reduceBy: reduceBy, - reduceRight: reduceRight, - reduceWhile: reduceWhile, - reduced: reduced, - reject: reject, - remove: remove, - repeat: repeat, - replace: replace, - reverse: reverse, - scan: scan, - sequence: sequence, - set: set, - slice: slice, - sort: sort, - sortBy: sortBy, - sortWith: sortWith, - split: split, - splitAt: splitAt, - splitEvery: splitEvery, - splitWhen: splitWhen, - startsWith: startsWith, - subtract: subtract, - sum: sum, - symmetricDifference: symmetricDifference, - symmetricDifferenceWith: symmetricDifferenceWith, - tail: tail, - take: take, - takeLast: takeLast, - takeLastWhile: takeLastWhile, - takeWhile: takeWhile, - tap: tap, - test: test, - times: times, - toLower: toLower, - toPairs: toPairs, - toPairsIn: toPairsIn, - toString: toString, - toUpper: toUpper, - transduce: transduce, - transpose: transpose, - traverse: traverse, - trim: trim, - tryCatch: tryCatch, - type: type, - unapply: unapply, - unary: unary, - uncurryN: uncurryN, - unfold: unfold, - union: union, - unionWith: unionWith, - uniq: uniq, - uniqBy: uniqBy, - uniqWith: uniqWith, - unless: unless, - unnest: unnest, - until: until, - update: update, - useWith: useWith, - values: values, - valuesIn: valuesIn, - view: view, - when: when, - where: where, - whereEq: whereEq, - without: without, - xprod: xprod, - zip: zip, - zipObj: zipObj, - zipWith: zipWith - }; - /* eslint-env amd */ - - /* TEST_ENTRY_POINT */ - - if (typeof exports === 'object') { - module.exports = R; - } else if (typeof define === 'function' && define.amd) { - define(function() { return R; }); - } else { - this.R = R; - } - -}.call(this)); diff --git a/node_modules/ramda/dist/ramda.min.js b/node_modules/ramda/dist/ramda.min.js deleted file mode 100644 index 0956058..0000000 --- a/node_modules/ramda/dist/ramda.min.js +++ /dev/null @@ -1,7 +0,0 @@ -// Ramda v0.24.1 -// https://github.com/ramda/ramda -// (c) 2013-2017 Scott Sauyet, Michael Hurley, and David Chambers -// Ramda may be freely distributed under the MIT license. - -(function(){"use strict";var t={"@@functional/placeholder":!0},n=function(t,n){for(var r=0,e=n.length-(t-1),u=new Array(e>=0?e:0);e>r;)u[r]=Array.prototype.slice.call(n,r,r+t),r+=1;return u},r=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,a){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}},e=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},u=function(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},i=function(t){return function(){return!t.apply(this,arguments)}},o=function(t,n){t=t||[],n=n||[];var r,e=t.length,u=n.length,i=[];for(r=0;e>r;)i[i.length]=t[r],r+=1;for(r=0;u>r;)i[i.length]=n[r],r+=1;return i},c=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1},a=function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,0,r+1)},s=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},f=function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}},l=function(t){var n=String(t).match(/^function (\w*)/);return null==n?"":n[1]},p=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},h=function(t){return t},y=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return p("callee",t)}}(),g=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},d=function(t){return"[object Function]"===Object.prototype.toString.call(t)},m=Number.isInteger||function(t){return t<<0===t},v=function(t){return"[object Number]"===Object.prototype.toString.call(t)},w=function(t){return"[object Object]"===Object.prototype.toString.call(t)},b=function(t){return null!=t&&"object"==typeof t&&t["@@functional/placeholder"]===!0},x=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},j=function(t){return"[object String]"===Object.prototype.toString.call(t)},A=function(t){return"function"==typeof t["@@transducer/step"]},O=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u},S=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var i in u)p(i,u)&&(n[i]=u[i]);r+=1}return n},E=function(t){return[t]},_=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}},q=function(t,n){return function(){var r=this;return t.apply(r,arguments).then(function(t){return n.call(r,t)})}},N=function(t){var n=t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").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'"'+n.replace(/"/g,'\\"')+'"'},k=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},I=function(){var t=function(t){return(10>t?"0":"")+t};return"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(n){return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+(n.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}(),W={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},C=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),P="function"==typeof Object.assign?Object.assign:S,T=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return g(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}},F=function(t){return function n(r){return 0===arguments.length||b(r)?n:t.apply(this,arguments)}},B=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return b(r)?n:F(function(n){return t(r,n)});default:return b(r)&&b(e)?n:b(r)?F(function(n){return t(n,e)}):b(e)?F(function(n){return t(r,n)}):t(r,e)}}},R=function(t){return function n(r,e,u){switch(arguments.length){case 0:return n;case 1:return b(r)?n:B(function(n,e){return t(r,n,e)});case 2:return b(r)&&b(e)?n:b(r)?B(function(n,r){return t(n,e,r)}):b(e)?B(function(n,e){return t(r,n,e)}):F(function(n){return t(r,e,n)});default:return b(r)&&b(e)&&b(u)?n:b(r)&&b(e)?B(function(n,r){return t(n,r,u)}):b(r)&&b(u)?B(function(n,r){return t(n,e,r)}):b(e)&&b(u)?B(function(n,e){return t(r,n,e)}):b(r)?F(function(n){return t(n,e,u)}):b(e)?F(function(n){return t(r,n,u)}):b(u)?F(function(n){return t(r,e,n)}):t(r,e,u)}}},U=function Xu(t,n,e){return function(){for(var u=[],i=0,o=t,c=0;c=arguments.length)?a=n[c]:(a=arguments[i],i+=1),u[c]=a,b(a)||(o-=1),c+=1}return 0>=o?e.apply(this,u):r(o,Xu(t,u,e))}},D=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!g(u)){for(var i=0;i0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1:!1}),L=function(t){return function n(r){for(var e,u,i,o=[],c=0,a=r.length;a>c;){if(M(r[c]))for(e=t?n(r[c]):r[c],i=0,u=e.length;u>i;)o[o.length]=e[i],i+=1;else o[o.length]=r[c];c+=1}return o}},z=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=k(this.xf["@@transducer/step"](t,!1))),t},B(function(n,r){return new t(n,r)})}(),K=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=k(this.xf["@@transducer/step"](t,!0))),t},B(function(n,r){return new t(n,r)})}(),V=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return o(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},B(function(n,r){return new t(n,r)})}(),$=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),H=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(n),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},B(function(n,r){return new t(n,r)})}(),J=function(){function t(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),X=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),Y=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},B(function(n,r){return new t(n,r)})}(),Z=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=k(this.xf["@@transducer/step"](t,n))),t},B(function(n,r){return new t(n,r)})}(),G=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=k(this.xf["@@transducer/step"](t,this.idx))),t},B(function(n,r){return new t(n,r)})}(),Q=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t},B(function(n,r){return new t(n,r)})}(),tt=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t},B(function(n,r){return new t(n,r)})}(),nt=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},B(function(n,r){return new t(n,r)})}(),rt=function(){function t(t,n,r,e){this.valueFn=t,this.valueAcc=n,this.keyFn=r,this.xf=e,this.inputs={}}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(p(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),t},U(4,[],function(n,r,e,u){return new t(n,r,e,u)})}(),et=function(){function t(t,n){this.xf=n,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return this.n>=0&&this.i>=this.n?k(r):r},B(function(n,r){return new t(n,r)})}(),ut=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):k(t)},B(function(n,r){return new t(n,r)})}(),it=B(function(t,n){return Number(t)+Number(n)}),ot=R(function(t,n,r){if(n>=r.length||n<-r.length)return r;var e=0>n?r.length:0,u=e+n,i=o(r);return i[u]=t(r[u]),i}),ct=B(D(["all"],z,function(t,n){for(var r=0;re?-1:e>u?1:0}),gt=R(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),dt=B(function(t,n){return r(t.length,function(){return t.apply(n,arguments)})}),mt=R(function(t,n,r){if(t>n)throw new Error("min must not be greater than max in clamp(min, max, value)");return t>r?t:r>n?n:r}),vt=F(function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}}),wt=B(function(t,n){return 1===t?F(n):r(t,U(t,[],n))}),bt=it(-1),xt=B(function(t,n){return null==n||n!==n?t:n}),jt=R(function(t,n,r){var e=t(n),u=t(r);return e>u?-1:u>e?1:0}),At=R(function(t,n,r){for(var e=[],u=0,i=n.length;i>u;)c(t,n[u],r)||c(t,n[u],e)||e.push(n[u]),u+=1;return e}),Ot=B(function(t,n){var r={};for(var e in n)r[e]=n[e];return delete r[t],r}),St=B(function(t,n){return t/n}),Et=B(D(["dropWhile"],X,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,r)})),_t=F(function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():g(t)?[]:j(t)?"":w(t)?{}:y(t)?function(){return arguments}():void 0}),qt=B(function Yu(t,n){var r,e,u,i={};for(e in n)r=t[e],u=typeof r,i[e]="function"===u?r(n[e]):r&&"object"===u?Yu(r,n[e]):n[e];return i}),Nt=B(D(["find"],Z,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),kt=B(D([],G,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return r;r+=1}return-1})),It=B(D([],Q,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return n[r];r-=1}})),Wt=B(D([],tt,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return r;r-=1}return-1})),Ct=F(L(!0)),Pt=B(T("forEach",function(t,n){for(var r=n.length,e=0;r>e;)t(n[e]),e+=1;return n})),Tt=F(function(t){for(var n={},r=0;re;){for(var i=e+1;u>i&&t(n[i-1],n[i]);)i+=1;r.push(n.slice(e,i)),e=i}return r}),Bt=B(function(t,n){return t>n}),Rt=B(function(t,n){return t>=n}),Ut=B(p),Dt=B(function(t,n){return t in n}),Mt=B(function(t,n){return t===n?0!==t||1/t===1/n:t!==t&&n!==n}),Lt=F(h),zt=R(function(t,n,r){return wt(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),Kt=it(1),Vt=R(function(t,n,r){return s(function(n){return c(t,n,r)},n)}),$t=R(function(t,n,r){t=t=0?t:r.length;var e=Array.prototype.slice.call(r,0);return e.splice(t,0,n),e}),Ht=R(function(t,n,r){return t=t=0?t:r.length,[].concat(Array.prototype.slice.call(r,0,t),n,Array.prototype.slice.call(r,t))}),Jt=B(T("intersperse",function(t,n){for(var r=[],e=0,u=n.length;u>e;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r})),Xt=B(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),Yt=F(function(t){return null==t}),Zt=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;r=0;)i=n[o],p(i,u)&&!e(c,i)&&(c[c.length]=i),o-=1;return c}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),Gt=F(function(t){var n,r=[];for(n in t)r[r.length]=n;return r}),Qt=F(function(t){return null!=t&&v(t.length)?t.length:NaN}),tn=B(function(t,n){return n>t}),nn=B(function(t,n){return n>=t}),rn=R(function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];u>e;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]}),en=R(function(t,n,r){for(var e=r.length-1,u=[],i=[n];e>=0;)i=t(r[e],i[0]),u[e]=i[1],e-=1;return[u,i[0]]}),un=B(function(t,n){return n.match(t)||[]}),on=B(function(t,n){return m(t)?!m(n)||1>n?NaN:(t%n+n)%n:NaN}),cn=B(function(t,n){return n>t?n:t}),an=R(function(t,n,r){return t(r)>t(n)?r:n}),sn=B(function(t,n){var e={};return r(n.length,function(){var r=t.apply(this,arguments);return p(r,e)||(e[r]=n.apply(this,arguments)),e[r]})}),fn=B(function(t,n){return P({},t,n)}),ln=F(function(t){return P.apply(null,[{}].concat(t))}),pn=R(function(t,n,r){var e,u={};for(e in n)p(e,n)&&(u[e]=p(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)p(e,r)&&!p(e,u)&&(u[e]=r[e]);return u}),hn=B(function(t,n){return t>n?n:t}),yn=R(function(t,n,r){return t(r)t?n.length+t:t;return j(n)?n.charAt(r):n[r]}),jn=F(function(t){var n=0>t?1:t+1;return wt(n,function(){return xn(t,arguments)})}),An=R(function(t,n,r){return t(n(r))}),On=B(function(t,n){var r={};return r[t]=n,r}),Sn=F(E),En=F(function(t){var n,e=!1;return r(t.length,function(){return e?n:(e=!0,n=t.apply(this,arguments))})}),_n=B(function(t,n){return t||n}),qn=function(){var t=function(n){return{value:n,map:function(r){return t(r(n))}}};return R(function(n,r,e){return n(function(n){return t(r(n))})(e).value})}(),Nn=B(function(t,n){return[t,n]}),kn=B(function(t,n){for(var r=n,e=0;e0&&t(kn(n,r))}),Cn=B(function(t,n){for(var r={},e=0;ee;){var i=t[e];r[i]=n[i],e+=1}return r}),Tn=B(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),Fn=B(function(t,n){return o([t],n)}),Bn=B(function(t,n){return n[t]}),Rn=R(function(t,n,r){return Xt(t,r[n])}),Un=R(function(t,n,r){return null!=r&&p(n,r)?r[n]:t}),Dn=R(function(t,n,r){return t(r[n])}),Mn=B(function(t,n){for(var r=t.length,e=[],u=0;r>u;)e[u]=n[t[u]],u+=1;return e}),Ln=B(function(t,n){if(!v(t)||!v(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;n>e;)r.push(e),e+=1;return r}),zn=R(function(t,n,r){for(var e=r.length-1;e>=0;)n=t(r[e],n),e-=1;return n}),Kn=F(k),Vn=R(function(t,n,r){var e=Array.prototype.slice.call(r,0);return e.splice(t,n),e}),$n=R(function(t,n,r){return r.replace(t,n)}),Hn=F(function(t){return j(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}),Jn=R(function(t,n,r){for(var e=0,u=r.length,i=[n];u>e;)n=t(n,r[e]),i[e+1]=n,e+=1;return i}),Xn=R(function(t,n,r){return qn(t,at(n),r)}),Yn=R(T("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),Zn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(t)}),Gn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0})}),Qn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){for(var e=0,u=0;0===e&&u=t)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;er&&!t(n[r]);)u.push(n[r]),r+=1;return[u,Array.prototype.slice.call(n,r)]}),er=B(function(t,n){return Number(t)-Number(n)}),ur=F(T("tail",Yn(1,1/0))),ir=B(D(["take"],et,function(t,n){return Yn(0,0>t?1/0:t,n)})),or=B(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,r+1)}),cr=B(D(["takeWhile"],ut,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,0,r)})),ar=B(function(t,n){return t(n),n}),sr=B(function(t,n){var r,e=Number(n),u=0;if(0>e||isNaN(e))throw new RangeError("n must be a non-negative number");for(r=new Array(e);e>u;)r[u]=t(u),u+=1;return r}),fr=F(function(t){var n=[];for(var r in t)p(r,t)&&(n[n.length]=[r,t[r]]);return n}),lr=F(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),pr=F(function(t){for(var n=0,r=[];n=e&&"function"==typeof u;)r=e===t?arguments.length:i+u.length,u=u.apply(this,Array.prototype.slice.call(arguments,i,r)),e+=1,i=r;return u})}),wr=B(function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e}),br=B(function(t,n){for(var r,e=0,u=n.length,i=[];u>e;)r=n[e],c(t,r,i)||(i[i.length]=r),e+=1;return i}),xr=R(function(t,n,r){return t(r)?r:n(r)}),jr=R(function(t,n,r){for(var e=r;!t(e);)e=n(e);return e}),Ar=R(function(t,n,r){return ot(at(n),t,r)}),Or=B(function(t,n){return wt(n.length,function(){for(var r=[],e=0;eu;)e[u]=t[n[u]],u+=1;return e}),Er=F(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),_r=function(){var t=function(t){return{value:t,"fantasy-land/map":function(){return this}}};return B(function(n,r){return n(t)(r).value})}(),qr=R(function(t,n,r){return t(r)?n(r):r}),Nr=B(function(t,n){for(var r in t)if(p(r,t)&&!t[r](n[r]))return!1;return!0}),kr=B(function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];u>e;){for(r=0;i>r;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o}),Ir=B(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Wr=B(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),Cr=R(function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);i>u;)e[u]=t(n[u],r[u]),u+=1;return e}),Pr=at(!1),Tr=at(!0),Fr=function Zu(t,n,r,e){var i=function(u){for(var i=n.length,o=0;i>o;){if(t===n[o])return r[o];o+=1}n[o+1]=t,r[o+1]=u;for(var c in t)u[c]=e?Zu(t[c],n,r,!0):t[c];return u};switch(gr(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return u(t);default:return t}},Br=function(t){return B(function(n,e){return r(Math.max(0,n.length-e.length),function(){return n.apply(this,t(e,arguments))})})},Rr=function(t,n){return ir(t=0;){if(r[o]===t)return u[o]===n;o-=1}for(r.push(t),u.push(n),o=i.length-1;o>=0;){var c=i[o];if(!p(c,n)||!Gu(n[c],t[c],r,u))return!1;o-=1}return r.pop(),u.pop(),!0},Dr=function(){function t(t,n,r){for(var e=0,u=r.length;u>e;){if(n=t["@@transducer/step"](n,r[e]),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}function n(t,n,r){for(var e=r.next();!e.done;){if(n=t["@@transducer/step"](n,e.value),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function r(t,n,r,e){return t["@@transducer/result"](r[e](dt(t["@@transducer/step"],t),n))}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(u,i,o){if("function"==typeof u&&(u=C(u)),M(o))return t(u,i,o);if("function"==typeof o["fantasy-land/reduce"])return r(u,i,o,"fantasy-land/reduce");if(null!=o[e])return n(u,i,o[e]());if("function"==typeof o.next)return n(u,i,o);if("function"==typeof o.reduce)return r(u,i,o,"reduce");throw new TypeError("reduce: list must be array or iterable")}}(),Mr=function(){var t={"@@transducer/init":Array,"@@transducer/step":function(t,n){return t.push(n),t},"@@transducer/result":h},n={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":h},r={"@@transducer/init":Object,"@@transducer/step":function(t,n){return P(t,M(n)?On(n[0],n[1]):n)},"@@transducer/result":h};return function(e){if(A(e))return e;if(M(e))return t;if("string"==typeof e)return n;if("object"==typeof e)return r;throw new Error("Cannot create transformer for "+e)}}(),Lr=function(){function t(t,n){this.f=t,this.retained=[],this.xf=n}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.retain(t,n):this.flush(t,n)},t.prototype.flush=function(t,n){return t=Dr(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,n)},t.prototype.retain=function(t,n){return this.retained.push(n),t},B(function(n,r){return new t(n,r)})}(),zr=F(function(t){return wt(t.length,function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=Array.prototype.slice.call(arguments,0);return u[0]=function(){var t=r.apply(this,o(arguments,[n,e]));return n+=1,t},t.apply(this,u)})}),Kr=R(function Qu(t,n,r){if(0===t.length)return n;var e=t[0];if(t.length>1){var u=!Yt(r)&&p(e,r)?r[e]:m(t[1])?[]:{};n=Qu(Array.prototype.slice.call(t,1),n,u)}if(m(e)&&g(r)){var i=[].concat(r);return i[e]=n,i}return gt(e,n,r)}),Vr=F(function(t){return mn(2,t)}),$r=F(function(t){return null!=t&&"function"==typeof t.clone?t.clone():Fr(t,[],[],!0)}),Hr=F(function(t){return wt(t.length,t)}),Jr=B(function ti(t,n){switch(t.length){case 0:return n;case 1:return m(t[0])?Vn(t[0],1,n):Ot(t[0],n);default:var r=t[0],e=Array.prototype.slice.call(t,1);return null==n[r]?n:m(t[0])?Ar(r,ti(e,n[r]),n):gt(r,ti(e,n[r]),n)}}),Xr=B(D(["drop"],$,function(t,n){return Yn(Math.max(0,t),1/0,n)})),Yr=B(D([],H,Rr)),Zr=B(D([],Lr,a)),Gr=B(function(t,n){return Ur(t,n,[],[])}),Qr=B(D(["filter"],Y,function(t,n){return w(n)?Dr(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},Zt(n)):s(t,n)})),te=F(function(t){return Hr(function(n,r){var e=Array.prototype.slice.call(arguments,0);return e[0]=r,e[1]=n,t.apply(this,e)})}),ne=B(function(t,n){for(var r=Zt(n),e=0;er.length?(e=n,u=r):(e=r,u=n);for(var i=[],o=0;oe;){var i=n[e],o=t[i],c=p(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u}),ce=F(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e];u[t[i]]=i,e+=1}return u}),ae=F(function(t){return null!=t&&Gr(t,_t(t))}),se=xn(-1),fe=B(function(t,n){if("function"!=typeof n.lastIndexOf||g(n)){for(var r=n.length-1;r>=0;){if(Gr(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}),le=B(D(["fantasy-land/map","map"],nt,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return wt(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Dr(function(r,e){return r[e]=t(n[e]),r},{},Zt(n));default:return O(t,n)}})),pe=B(function(t,n){return Dr(function(r,e){return r[e]=t(n[e],e,n),r},{},Zt(n))}),he=R(function ni(t,n,r){return pn(function(n,r,e){return w(r)&&w(e)?ni(t,r,e):t(n,r,e)},n,r)}),ye=R(function(t,n,r){return pn(function(n,r,e){return t(r,e)},n,r)}),ge=Br(o),de=Br(te(o)),me=R(function(t,n,r){return Gr(kn(t,r),n)}),ve=B(function(t,n){return le(Bn(t),n)}),we=Or(O,[Pn,Lt]),be=R(function(t,n,r){return Gr(n,r[t])}),xe=R(Dr),je=U(4,[],D([],rt,function(t,n,r,e){return Dr(function(e,u){var i=r(u);return e[i]=t(p(i,e)?e[i]:n,u),e},{},e)})),Ae=U(4,[],function(t,n,r,e){ -return Dr(function(r,e){return t(r,e)?n(r,e):k(r)},r,e)}),Oe=B(function(t,n){return Qr(i(t),n)}),Se=B(function(t,n){return sr(at(t),n)}),Ee=B(function(t,n){return Gr(ir(t.length,n),t)}),_e=xe(it,0),qe=B(function(t,n){return Xr(t>=0?n.length-t:0,n)}),Ne=wt(4,function(t,n,r,e){return Dr(t("function"==typeof n?C(n):n),r,e)}),ke=R(function(t,n,r){return br(t,o(n,r))}),Ie=B(function(t,n){return Nr(le(Gr,t),n)}),We=function(){var t=function(t){return{"@@transducer/init":W.init,"@@transducer/result":function(n){return t["@@transducer/result"](n)},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?f(e):e}}};return function(n){var r=t(n);return{"@@transducer/init":W.init,"@@transducer/result":function(t){return r["@@transducer/result"](t)},"@@transducer/step":function(t,n){return M(n)?Dr(r,t,n):Dr(r,t,[n])}}}}(),Ce=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;rn;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),Fe=F(function(t){return wt(xe(cn,0,ve("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),Be=B(function(t,n){return"function"==typeof n["fantasy-land/ap"]?n["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:Dr(function(t,r){return o(t,le(r,n))},[],t)}),Re=F(function ri(t){return t=le(function(t){return"function"==typeof t?t:ri(t)},t),wt(xe(cn,0,ve("length",Sr(t))),function(){var n=arguments;return le(function(t){return ht(t,n)},t)})}),Ue=Hr(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),De=B(D(["fantasy-land/chain","chain"],Pe,function(t,n){return"function"==typeof n?function(r){return t(n(r))(r)}:L(!1)(le(t,n))})),Me=F(function(t){var n=xe(cn,0,le(function(t){return t[0].length},t));return r(n,function(){for(var n=0;n10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:Hr(mn(t,function(t,r,e,u,i,o,c,a,s,f){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,a);case 9:return new n(t,r,e,u,i,o,c,a,s);case 10:return new n(t,r,e,u,i,o,c,a,s,f)}}))}),ze=B(function(t,n){return wt(xe(cn,0,ve("length",n)),function(){var r=arguments,e=this;return t.apply(e,O(function(t){return t.apply(e,r)},n))})}),Ke=je(function(t,n){return t+1},0),Ve=B(D([],J,function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];u>e;)t(se(r),n[e])||(r[r.length]=n[e]),e+=1;return r})),$e=B(function(t,n){return Gr(qe(t.length,n),t)}),He=R(function(t,n,r){return Gr(t(n),t(r))}),Je=R(function(t,n,r){return Gr(n[t],r[t])}),Xe=B(T("groupBy",je(function(t,n){return null==t&&(t=[]),t.push(n),t},null))),Ye=je(function(t,n){return n},null),Ze=B(function(t,n){return"function"!=typeof n.indexOf||g(n)?Ce(n,t,0):n.indexOf(t)}),Ge=F(function(t){return ze(function(){return Array.prototype.slice.call(arguments,0)},t)}),Qe=B(function(t,n){return function(r){return function(e){return le(function(t){return n(t,e)},r(t(e)))}}}),tu=F(function(t){return Qe(xn(t),Ar(t))}),nu=F(function(t){return Qe(kn(t),Kr(t))}),ru=F(function(t){return Qe(Bn(t),gt(t))}),eu=B(function(t,n){var r=wt(t,n);return wt(t,function(){return Dr(Be,le(r,arguments[0]),Array.prototype.slice.call(arguments,1))})}),uu=F(function(t){return _e(t)/t.length}),iu=F(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return uu(Array.prototype.slice.call(t,0).sort(function(t,n){return n>t?-1:t>n?1:0}).slice(e,e+r))}),ou=B(function(t,n){return he(function(t,n,r){return n},t,n)}),cu=B(function(t,n){return he(function(t,n,r){return r},t,n)}),au=R(function(t,n,r){return he(function(n,r,e){return t(r,e)},n,r)}),su=Ge([Qr,Oe]),fu=function(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return r(arguments[0].length,xe(_,arguments[0],ur(arguments)))},lu=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return r(arguments[0].length,xe(q,arguments[0],ur(arguments)))},pu=xe(dn,1),hu=B(function(t,n){return"function"==typeof n.sequence?n.sequence(t):zn(function(t,n){return Be(le(Fn,t),n)},t([]),n)}),yu=R(function(t,n,r){return"function"==typeof r["fantasy-land/traverse"]?r["fantasy-land/traverse"](n,t):hu(t,le(n,r))}),gu=De(h),du=function(t,n){return Ce(n,t,0)>=0},mu=function ei(t,n){var r=function(r){var e=n.concat([t]);return du(r,e)?"":ei(r,e)},e=function(t,n){return O(function(n){return N(n)+": "+r(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+O(r,t).join(", ")+"))";case"[object Array]":return"["+O(r,t).concat(e(t,Oe(function(t){return/^\d+$/.test(t)},Zt(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):N(I(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t===-(1/0)?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":N(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var u=t.toString();if("[object Object]"!==u)return u}return"{"+e(t,Zt(t)).join(", ")+"}"}},vu=function(){if(0===arguments.length)throw new Error("compose requires at least one argument");return fu.apply(this,Hn(arguments))},wu=function(){if(0===arguments.length)throw new Error("composeK requires at least one argument");var t=Array.prototype.slice.call(arguments),n=t.pop();return vu(vu.apply(this,le(De,t)),n)},bu=function(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return lu.apply(this,Hn(arguments))},xu=F(function(t){return Le(t.length,t)}),ju=B(du),Au=B(function(t,n){for(var r=[],e=0,u=t.length;u>e;)du(t[e],n)||du(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),Ou=F(D([],J(Gr),Ve(Gr))),Su=F(function(t){return eu(t.length,t)}),Eu=B(function(t,n){var r={};for(var e in n)du(e,t)||(r[e]=n[e]);return r}),_u=function(){if(0===arguments.length)throw new Error("pipeK requires at least one argument");return wu.apply(this,Hn(arguments))},qu=F(function(t){return mu(t,[])}),Nu=B(function(t,n){return Oe(te(du)(t),n)}),ku=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function n(t,n,r){var e,u,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t===-(1/0)?r._items["-0"]?!0:(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?t in r._items[i]?!0:(n&&(r._items[i][t]=!0),!1):(n&&(r._items[i]={},r._items[i][t]=!0),!1);case"boolean":if(i in r._items){var o=t?1:0;return r._items[i][o]?!0:(n&&(r._items[i][o]=!0),!1)}return n&&(r._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?du(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1);case"undefined":return r._items[i]?!0:(n&&(r._items[i]=!0),!1);case"object":if(null===t)return r._items["null"]?!0:(n&&(r._items["null"]=!0),!1);default:return i=Object.prototype.toString.call(t),i in r._items?du(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1)}}return t.prototype.add=function(t){return!n(t,!0,this)},t.prototype.has=function(t){return n(t,!1,this)},t}(),Iu=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:Su(st)(t,n)}),Wu=Su(bn),Cu=B(function(t,n){if(g(t)){if(g(n))return t.concat(n);throw new TypeError(qu(n)+" is not an array")}if(j(t)){if(j(n))return t+n;throw new TypeError(qu(n)+" is not a string")}if(null!=t&&d(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(null!=t&&d(t.concat))return t.concat(n);throw new TypeError(qu(t)+' does not have a method named "concat" or "fantasy-land/concat"')}),Pu=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:Su(_n)(t,n)}),Tu=B(function(t,n){return wt(t+1,function(){var r=arguments[t];if(null!=r&&d(r[n]))return r[n].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(qu(r)+' does not have a method named "'+n+'"')})}),Fu=Tu(1,"join"),Bu=sn(function(){return qu(arguments)}),Ru=Tu(1,"split"),Uu=B(function(t,n){return Cu(Au(t,n),Au(n,t))}),Du=R(function(t,n,r){return Cu(At(t,n,r),At(t,r,n))}),Mu=B(function(t,n){if(!x(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+qu(t));return u(t).test(n)}),Lu=Tu(0,"toLowerCase"),zu=Tu(0,"toUpperCase"),Ku=B(function(t,n){for(var r,e,u=new ku,i=[],o=0;on.length?(r=t,e=n):(r=n,e=t),Vu(s(te(du)(r),e))}),Hu=B(vu(Vu,o)),Ju={F:Pr,T:Tr,__:t,add:it,addIndex:zr,adjust:ot,all:ct,allPass:Te,always:at,and:st,any:ft,anyPass:Fe,ap:Be,aperture:lt,append:pt,apply:ht,applySpec:Re,ascend:yt,assoc:gt,assocPath:Kr,binary:Vr,bind:dt,both:Iu,call:Ue,chain:De,clamp:mt,clone:$r,comparator:vt,complement:Wu,compose:vu,composeK:wu,composeP:bu,concat:Cu,cond:Me,construct:xu,constructN:Le,contains:ju,converge:ze,countBy:Ke,curry:Hr,curryN:wt,dec:bt,defaultTo:xt,descend:jt,difference:Au,differenceWith:At,dissoc:Ot,dissocPath:Jr,divide:St,drop:Xr,dropLast:Yr,dropLastWhile:Zr,dropRepeats:Ou,dropRepeatsWith:Ve,dropWhile:Et,either:Pu,empty:_t,endsWith:$e,eqBy:He,eqProps:Je,equals:Gr,evolve:qt,filter:Qr,find:Nt,findIndex:kt,findLast:It,findLastIndex:Wt,flatten:Ct,flip:te,forEach:Pt,forEachObjIndexed:ne,fromPairs:Tt,groupBy:Xe,groupWith:Ft,gt:Bt,gte:Rt,has:Ut,hasIn:Dt,head:re,identical:Mt,identity:Lt,ifElse:zt,inc:Kt,indexBy:Ye,indexOf:Ze,init:ee,innerJoin:Vt,insert:$t,insertAll:Ht,intersection:$u,intersectionWith:ue,intersperse:Jt,into:ie,invert:oe,invertObj:ce,invoker:Tu,is:Xt,isEmpty:ae,isNil:Yt,join:Fu,juxt:Ge,keys:Zt,keysIn:Gt,last:se,lastIndexOf:fe,length:Qt,lens:Qe,lensIndex:tu,lensPath:nu,lensProp:ru,lift:Su,liftN:eu,lt:tn,lte:nn,map:le,mapAccum:rn,mapAccumRight:en,mapObjIndexed:pe,match:un,mathMod:on,max:cn,maxBy:an,mean:uu,median:iu,memoize:Bu,memoizeWith:sn,merge:fn,mergeAll:ln,mergeDeepLeft:ou,mergeDeepRight:cu,mergeDeepWith:au,mergeDeepWithKey:he,mergeWith:ye,mergeWithKey:pn,min:hn,minBy:yn,modulo:gn,multiply:dn,nAry:mn,negate:vn,none:wn,not:bn,nth:xn,nthArg:jn,o:An,objOf:On,of:Sn,omit:Eu,once:En,or:_n,over:qn,pair:Nn,partial:ge,partialRight:de,partition:su,path:kn,pathEq:me,pathOr:In,pathSatisfies:Wn,pick:Cn,pickAll:Pn,pickBy:Tn,pipe:fu,pipeK:_u,pipeP:lu,pluck:ve,prepend:Fn,product:pu,project:we,prop:Bn,propEq:be,propIs:Rn,propOr:Un,propSatisfies:Dn,props:Mn,range:Ln,reduce:xe,reduceBy:je,reduceRight:zn,reduceWhile:Ae,reduced:Kn,reject:Oe,remove:Vn,repeat:Se,replace:$n,reverse:Hn,scan:Jn,sequence:hu,set:Xn,slice:Yn,sort:Zn,sortBy:Gn,sortWith:Qn,split:Ru,splitAt:tr,splitEvery:nr,splitWhen:rr,startsWith:Ee,subtract:er,sum:_e,symmetricDifference:Uu,symmetricDifferenceWith:Du,tail:ur,take:ir,takeLast:qe,takeLastWhile:or,takeWhile:cr,tap:ar,test:Mu,times:sr,toLower:Lu,toPairs:fr,toPairsIn:lr,toString:qu,toUpper:zu,transduce:Ne,transpose:pr,traverse:yu,trim:hr,tryCatch:yr,type:gr,unapply:dr,unary:mr,uncurryN:vr,unfold:wr,union:Hu,unionWith:ke,uniq:Vu,uniqBy:Ku,uniqWith:br,unless:xr,unnest:gu,until:jr,update:Ar,useWith:Or,values:Sr,valuesIn:Er,view:_r,when:qr,where:Nr,whereEq:Ie,without:Nu,xprod:kr,zip:Ir,zipObj:Wr,zipWith:Cr};"object"==typeof exports?module.exports=Ju:"function"==typeof define&&define.amd?define(function(){return Ju}):this.R=Ju}).call(this); diff --git a/node_modules/ramda/index.js b/node_modules/ramda/index.js deleted file mode 100644 index 1b7b302..0000000 --- a/node_modules/ramda/index.js +++ /dev/null @@ -1,248 +0,0 @@ -module.exports = { - F: require('./src/F'), - T: require('./src/T'), - __: require('./src/__'), - add: require('./src/add'), - addIndex: require('./src/addIndex'), - adjust: require('./src/adjust'), - all: require('./src/all'), - allPass: require('./src/allPass'), - always: require('./src/always'), - and: require('./src/and'), - any: require('./src/any'), - anyPass: require('./src/anyPass'), - ap: require('./src/ap'), - aperture: require('./src/aperture'), - append: require('./src/append'), - apply: require('./src/apply'), - applySpec: require('./src/applySpec'), - ascend: require('./src/ascend'), - assoc: require('./src/assoc'), - assocPath: require('./src/assocPath'), - binary: require('./src/binary'), - bind: require('./src/bind'), - both: require('./src/both'), - call: require('./src/call'), - chain: require('./src/chain'), - clamp: require('./src/clamp'), - clone: require('./src/clone'), - comparator: require('./src/comparator'), - complement: require('./src/complement'), - compose: require('./src/compose'), - composeK: require('./src/composeK'), - composeP: require('./src/composeP'), - concat: require('./src/concat'), - cond: require('./src/cond'), - construct: require('./src/construct'), - constructN: require('./src/constructN'), - contains: require('./src/contains'), - converge: require('./src/converge'), - countBy: require('./src/countBy'), - curry: require('./src/curry'), - curryN: require('./src/curryN'), - dec: require('./src/dec'), - defaultTo: require('./src/defaultTo'), - descend: require('./src/descend'), - difference: require('./src/difference'), - differenceWith: require('./src/differenceWith'), - dissoc: require('./src/dissoc'), - dissocPath: require('./src/dissocPath'), - divide: require('./src/divide'), - drop: require('./src/drop'), - dropLast: require('./src/dropLast'), - dropLastWhile: require('./src/dropLastWhile'), - dropRepeats: require('./src/dropRepeats'), - dropRepeatsWith: require('./src/dropRepeatsWith'), - dropWhile: require('./src/dropWhile'), - either: require('./src/either'), - empty: require('./src/empty'), - endsWith: require('./src/endsWith'), - eqBy: require('./src/eqBy'), - eqProps: require('./src/eqProps'), - equals: require('./src/equals'), - evolve: require('./src/evolve'), - filter: require('./src/filter'), - find: require('./src/find'), - findIndex: require('./src/findIndex'), - findLast: require('./src/findLast'), - findLastIndex: require('./src/findLastIndex'), - flatten: require('./src/flatten'), - flip: require('./src/flip'), - forEach: require('./src/forEach'), - forEachObjIndexed: require('./src/forEachObjIndexed'), - fromPairs: require('./src/fromPairs'), - groupBy: require('./src/groupBy'), - groupWith: require('./src/groupWith'), - gt: require('./src/gt'), - gte: require('./src/gte'), - has: require('./src/has'), - hasIn: require('./src/hasIn'), - head: require('./src/head'), - identical: require('./src/identical'), - identity: require('./src/identity'), - ifElse: require('./src/ifElse'), - inc: require('./src/inc'), - indexBy: require('./src/indexBy'), - indexOf: require('./src/indexOf'), - init: require('./src/init'), - innerJoin: require('./src/innerJoin'), - insert: require('./src/insert'), - insertAll: require('./src/insertAll'), - intersection: require('./src/intersection'), - intersectionWith: require('./src/intersectionWith'), - intersperse: require('./src/intersperse'), - into: require('./src/into'), - invert: require('./src/invert'), - invertObj: require('./src/invertObj'), - invoker: require('./src/invoker'), - is: require('./src/is'), - isEmpty: require('./src/isEmpty'), - isNil: require('./src/isNil'), - join: require('./src/join'), - juxt: require('./src/juxt'), - keys: require('./src/keys'), - keysIn: require('./src/keysIn'), - last: require('./src/last'), - lastIndexOf: require('./src/lastIndexOf'), - length: require('./src/length'), - lens: require('./src/lens'), - lensIndex: require('./src/lensIndex'), - lensPath: require('./src/lensPath'), - lensProp: require('./src/lensProp'), - lift: require('./src/lift'), - liftN: require('./src/liftN'), - lt: require('./src/lt'), - lte: require('./src/lte'), - map: require('./src/map'), - mapAccum: require('./src/mapAccum'), - mapAccumRight: require('./src/mapAccumRight'), - mapObjIndexed: require('./src/mapObjIndexed'), - match: require('./src/match'), - mathMod: require('./src/mathMod'), - max: require('./src/max'), - maxBy: require('./src/maxBy'), - mean: require('./src/mean'), - median: require('./src/median'), - memoize: require('./src/memoize'), - memoizeWith: require('./src/memoizeWith'), - merge: require('./src/merge'), - mergeAll: require('./src/mergeAll'), - mergeDeepLeft: require('./src/mergeDeepLeft'), - mergeDeepRight: require('./src/mergeDeepRight'), - mergeDeepWith: require('./src/mergeDeepWith'), - mergeDeepWithKey: require('./src/mergeDeepWithKey'), - mergeWith: require('./src/mergeWith'), - mergeWithKey: require('./src/mergeWithKey'), - min: require('./src/min'), - minBy: require('./src/minBy'), - modulo: require('./src/modulo'), - multiply: require('./src/multiply'), - nAry: require('./src/nAry'), - negate: require('./src/negate'), - none: require('./src/none'), - not: require('./src/not'), - nth: require('./src/nth'), - nthArg: require('./src/nthArg'), - o: require('./src/o'), - objOf: require('./src/objOf'), - of: require('./src/of'), - omit: require('./src/omit'), - once: require('./src/once'), - or: require('./src/or'), - over: require('./src/over'), - pair: require('./src/pair'), - partial: require('./src/partial'), - partialRight: require('./src/partialRight'), - partition: require('./src/partition'), - path: require('./src/path'), - pathEq: require('./src/pathEq'), - pathOr: require('./src/pathOr'), - pathSatisfies: require('./src/pathSatisfies'), - pick: require('./src/pick'), - pickAll: require('./src/pickAll'), - pickBy: require('./src/pickBy'), - pipe: require('./src/pipe'), - pipeK: require('./src/pipeK'), - pipeP: require('./src/pipeP'), - pluck: require('./src/pluck'), - prepend: require('./src/prepend'), - product: require('./src/product'), - project: require('./src/project'), - prop: require('./src/prop'), - propEq: require('./src/propEq'), - propIs: require('./src/propIs'), - propOr: require('./src/propOr'), - propSatisfies: require('./src/propSatisfies'), - props: require('./src/props'), - range: require('./src/range'), - reduce: require('./src/reduce'), - reduceBy: require('./src/reduceBy'), - reduceRight: require('./src/reduceRight'), - reduceWhile: require('./src/reduceWhile'), - reduced: require('./src/reduced'), - reject: require('./src/reject'), - remove: require('./src/remove'), - repeat: require('./src/repeat'), - replace: require('./src/replace'), - reverse: require('./src/reverse'), - scan: require('./src/scan'), - sequence: require('./src/sequence'), - set: require('./src/set'), - slice: require('./src/slice'), - sort: require('./src/sort'), - sortBy: require('./src/sortBy'), - sortWith: require('./src/sortWith'), - split: require('./src/split'), - splitAt: require('./src/splitAt'), - splitEvery: require('./src/splitEvery'), - splitWhen: require('./src/splitWhen'), - startsWith: require('./src/startsWith'), - subtract: require('./src/subtract'), - sum: require('./src/sum'), - symmetricDifference: require('./src/symmetricDifference'), - symmetricDifferenceWith: require('./src/symmetricDifferenceWith'), - tail: require('./src/tail'), - take: require('./src/take'), - takeLast: require('./src/takeLast'), - takeLastWhile: require('./src/takeLastWhile'), - takeWhile: require('./src/takeWhile'), - tap: require('./src/tap'), - test: require('./src/test'), - times: require('./src/times'), - toLower: require('./src/toLower'), - toPairs: require('./src/toPairs'), - toPairsIn: require('./src/toPairsIn'), - toString: require('./src/toString'), - toUpper: require('./src/toUpper'), - transduce: require('./src/transduce'), - transpose: require('./src/transpose'), - traverse: require('./src/traverse'), - trim: require('./src/trim'), - tryCatch: require('./src/tryCatch'), - type: require('./src/type'), - unapply: require('./src/unapply'), - unary: require('./src/unary'), - uncurryN: require('./src/uncurryN'), - unfold: require('./src/unfold'), - union: require('./src/union'), - unionWith: require('./src/unionWith'), - uniq: require('./src/uniq'), - uniqBy: require('./src/uniqBy'), - uniqWith: require('./src/uniqWith'), - unless: require('./src/unless'), - unnest: require('./src/unnest'), - until: require('./src/until'), - update: require('./src/update'), - useWith: require('./src/useWith'), - values: require('./src/values'), - valuesIn: require('./src/valuesIn'), - view: require('./src/view'), - when: require('./src/when'), - where: require('./src/where'), - whereEq: require('./src/whereEq'), - without: require('./src/without'), - xprod: require('./src/xprod'), - zip: require('./src/zip'), - zipObj: require('./src/zipObj'), - zipWith: require('./src/zipWith') -}; diff --git a/node_modules/ramda/package.json b/node_modules/ramda/package.json deleted file mode 100644 index ba7764b..0000000 --- a/node_modules/ramda/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "author": "Scott Sauyet (scott.sauyet.com)", - "contributors": [ - { - "name": "Michael Hurley", - "email": "mh@buzzdecafe.com", - "web": "http://buzzdecafe.com" - }, - { - "name": "Scott Sauyet", - "email": "scott@sauyet.com", - "web": "http://fr.umio.us" - }, - { - "name": "David Chambers", - "email": "dc@davidchambers.me", - "web": "http://davidchambers.me" - }, - { - "name": "Graeme Yeates", - "email": "yeatesgraeme@gmail.com", - "web": "https://github.com/megawac" - } - ], - "name": "ramda", - "description": "A practical functional library for JavaScript programmers.", - "version": "0.24.1", - "homepage": "http://ramdajs.com/", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/ramda/ramda.git" - }, - "main": "index.js", - "files": [ - "index.js", - "src", - "dist" - ], - "scripts": { - "bench": "scripts/benchRunner", - "bookmarklet": "scripts/bookmarklet", - "build": "make && make dist/ramda.min.js", - "clean": "rimraf dist/* coverage/*", - "precoverage": "npm run pretest", - "coverage": "istanbul cover node_modules/.bin/_mocha -- --reporter spec", - "postcoverage": "npm run posttest", - "lint": "eslint scripts/bookmarklet scripts/build src/*.js src/internal/*.js test/*.js test/**/*.js lib/sauce/*.js lib/bench/*.js", - "test": "mocha --reporter spec", - "posttest": "git checkout -- dist", - "prebrowser_test": "npm run pretest", - "browser_test": "testem ci", - "postbrowser_test": "npm run posttest" - }, - "dependencies": {}, - "devDependencies": { - "acorn": "0.9.x", - "benchmark": "~1.0.0", - "browserify": "10.x.x", - "cli-table": "0.3.x", - "commander": "2.5.x", - "dox": "latest", - "envvar": "1.x.x", - "escodegen": "1.4.x", - "eslint": "^2.11.0", - "handlebars": "3.0.x", - "istanbul": "^0.4.x", - "js-yaml": "^3.2.5", - "jsverify": "^0.7.3", - "mocha": "2.x.x", - "q": "^1.1.1", - "ramda": "0.17.x", - "rimraf": "~2.3.2", - "sanctuary": "0.7.x", - "sinon": "^1.17.4", - "testem": "0.9.x", - "uglify-js": "2.4.x", - "xyz": "1.0.x" - } -} diff --git a/node_modules/ramda/src/F.js b/node_modules/ramda/src/F.js deleted file mode 100644 index ef2ad19..0000000 --- a/node_modules/ramda/src/F.js +++ /dev/null @@ -1,19 +0,0 @@ -var always = require('./always'); - - -/** - * A function that always returns `false`. Any passed in parameters are ignored. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig * -> Boolean - * @param {*} - * @return {Boolean} - * @see R.always, R.T - * @example - * - * R.F(); //=> false - */ -module.exports = always(false); diff --git a/node_modules/ramda/src/T.js b/node_modules/ramda/src/T.js deleted file mode 100644 index fc15477..0000000 --- a/node_modules/ramda/src/T.js +++ /dev/null @@ -1,19 +0,0 @@ -var always = require('./always'); - - -/** - * A function that always returns `true`. Any passed in parameters are ignored. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig * -> Boolean - * @param {*} - * @return {Boolean} - * @see R.always, R.F - * @example - * - * R.T(); //=> true - */ -module.exports = always(true); diff --git a/node_modules/ramda/src/__.js b/node_modules/ramda/src/__.js deleted file mode 100644 index b6b7499..0000000 --- a/node_modules/ramda/src/__.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * A special placeholder value used to specify "gaps" within curried functions, - * allowing partial application of any combination of arguments, regardless of - * their positions. - * - * If `g` is a curried ternary function and `_` is `R.__`, the following are - * equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2, _)(1, 3)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @constant - * @memberOf R - * @since v0.6.0 - * @category Function - * @example - * - * var greet = R.replace('{name}', R.__, 'Hello, {name}!'); - * greet('Alice'); //=> 'Hello, Alice!' - */ -module.exports = {'@@functional/placeholder': true}; diff --git a/node_modules/ramda/src/add.js b/node_modules/ramda/src/add.js deleted file mode 100644 index 934e25c..0000000 --- a/node_modules/ramda/src/add.js +++ /dev/null @@ -1,23 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Adds two values. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a - * @param {Number} b - * @return {Number} - * @see R.subtract - * @example - * - * R.add(2, 3); //=> 5 - * R.add(7)(10); //=> 17 - */ -module.exports = _curry2(function add(a, b) { - return Number(a) + Number(b); -}); diff --git a/node_modules/ramda/src/addIndex.js b/node_modules/ramda/src/addIndex.js deleted file mode 100644 index 982beee..0000000 --- a/node_modules/ramda/src/addIndex.js +++ /dev/null @@ -1,43 +0,0 @@ -var _concat = require('./internal/_concat'); -var _curry1 = require('./internal/_curry1'); -var curryN = require('./curryN'); - - -/** - * Creates a new list iteration function from an existing one by adding two new - * parameters to its callback function: the current index, and the entire list. - * - * This would turn, for instance, [`R.map`](#map) function into one that - * more closely resembles `Array.prototype.map`. Note that this will only work - * for functions in which the iteration callback function is the first - * parameter, and where the list is the last parameter. (This latter might be - * unimportant if the list parameter is not used.) - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Function - * @category List - * @sig ((a ... -> b) ... -> [a] -> *) -> (a ..., Int, [a] -> b) ... -> [a] -> *) - * @param {Function} fn A list iteration function that does not pass index or list to its callback - * @return {Function} An altered list iteration function that passes (item, index, list) to its callback - * @example - * - * var mapIndexed = R.addIndex(R.map); - * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']); - * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r'] - */ -module.exports = _curry1(function addIndex(fn) { - return curryN(fn.length, function() { - var idx = 0; - var origFn = arguments[0]; - var list = arguments[arguments.length - 1]; - var args = Array.prototype.slice.call(arguments, 0); - args[0] = function() { - var result = origFn.apply(this, _concat(arguments, [idx, list])); - idx += 1; - return result; - }; - return fn.apply(this, args); - }); -}); diff --git a/node_modules/ramda/src/adjust.js b/node_modules/ramda/src/adjust.js deleted file mode 100644 index ca69bf8..0000000 --- a/node_modules/ramda/src/adjust.js +++ /dev/null @@ -1,39 +0,0 @@ -var _concat = require('./internal/_concat'); -var _curry3 = require('./internal/_curry3'); - - -/** - * Applies a function to the value at the given index of an array, returning a - * new copy of the array with the element at the given index replaced with the - * result of the function application. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig (a -> a) -> Number -> [a] -> [a] - * @param {Function} fn The function to apply. - * @param {Number} idx The index. - * @param {Array|Arguments} list An array-like object whose value - * at the supplied index will be replaced. - * @return {Array} A copy of the supplied array-like object with - * the element at index `idx` replaced with the value - * returned by applying `fn` to the existing element. - * @see R.update - * @example - * - * R.adjust(R.add(10), 1, [1, 2, 3]); //=> [1, 12, 3] - * R.adjust(R.add(10))(1)([1, 2, 3]); //=> [1, 12, 3] - * @symb R.adjust(f, -1, [a, b]) = [a, f(b)] - * @symb R.adjust(f, 0, [a, b]) = [f(a), b] - */ -module.exports = _curry3(function adjust(fn, idx, list) { - if (idx >= list.length || idx < -list.length) { - return list; - } - var start = idx < 0 ? list.length : 0; - var _idx = start + idx; - var _list = _concat(list); - _list[_idx] = fn(list[_idx]); - return _list; -}); diff --git a/node_modules/ramda/src/all.js b/node_modules/ramda/src/all.js deleted file mode 100644 index dc8ca5d..0000000 --- a/node_modules/ramda/src/all.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xall = require('./internal/_xall'); - - -/** - * Returns `true` if all elements of the list match the predicate, `false` if - * there are any that don't. - * - * Dispatches to the `all` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by every element, `false` - * otherwise. - * @see R.any, R.none, R.transduce - * @example - * - * var equals3 = R.equals(3); - * R.all(equals3)([3, 3, 3, 3]); //=> true - * R.all(equals3)([3, 3, 1, 3]); //=> false - */ -module.exports = _curry2(_dispatchable(['all'], _xall, function all(fn, list) { - var idx = 0; - while (idx < list.length) { - if (!fn(list[idx])) { - return false; - } - idx += 1; - } - return true; -})); diff --git a/node_modules/ramda/src/allPass.js b/node_modules/ramda/src/allPass.js deleted file mode 100644 index 4896a9a..0000000 --- a/node_modules/ramda/src/allPass.js +++ /dev/null @@ -1,45 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var curryN = require('./curryN'); -var max = require('./max'); -var pluck = require('./pluck'); -var reduce = require('./reduce'); - - -/** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if every one of the provided predicates is satisfied - * by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.anyPass - * @example - * - * var isQueen = R.propEq('rank', 'Q'); - * var isSpade = R.propEq('suit', '♠︎'); - * var isQueenOfSpades = R.allPass([isQueen, isSpade]); - * - * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false - * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true - */ -module.exports = _curry1(function allPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function() { - var idx = 0; - var len = preds.length; - while (idx < len) { - if (!preds[idx].apply(this, arguments)) { - return false; - } - idx += 1; - } - return true; - }); -}); diff --git a/node_modules/ramda/src/always.js b/node_modules/ramda/src/always.js deleted file mode 100644 index 6615090..0000000 --- a/node_modules/ramda/src/always.js +++ /dev/null @@ -1,27 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Returns a function that always returns the given value. Note that for - * non-primitives the value returned is a reference to the original value. - * - * This function is known as `const`, `constant`, or `K` (for K combinator) in - * other languages and libraries. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig a -> (* -> a) - * @param {*} val The value to wrap in a function - * @return {Function} A Function :: * -> val. - * @example - * - * var t = R.always('Tee'); - * t(); //=> 'Tee' - */ -module.exports = _curry1(function always(val) { - return function() { - return val; - }; -}); diff --git a/node_modules/ramda/src/and.js b/node_modules/ramda/src/and.js deleted file mode 100644 index 0151429..0000000 --- a/node_modules/ramda/src/and.js +++ /dev/null @@ -1,25 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns `true` if both arguments are `true`; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> b -> a | b - * @param {Any} a - * @param {Any} b - * @return {Any} the first argument if it is falsy, otherwise the second argument. - * @see R.both - * @example - * - * R.and(true, true); //=> true - * R.and(true, false); //=> false - * R.and(false, true); //=> false - * R.and(false, false); //=> false - */ -module.exports = _curry2(function and(a, b) { - return a && b; -}); diff --git a/node_modules/ramda/src/any.js b/node_modules/ramda/src/any.js deleted file mode 100644 index 9b8a7c5..0000000 --- a/node_modules/ramda/src/any.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xany = require('./internal/_xany'); - - -/** - * Returns `true` if at least one of elements of the list match the predicate, - * `false` otherwise. - * - * Dispatches to the `any` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` - * otherwise. - * @see R.all, R.none, R.transduce - * @example - * - * var lessThan0 = R.flip(R.lt)(0); - * var lessThan2 = R.flip(R.lt)(2); - * R.any(lessThan0)([1, 2]); //=> false - * R.any(lessThan2)([1, 2]); //=> true - */ -module.exports = _curry2(_dispatchable(['any'], _xany, function any(fn, list) { - var idx = 0; - while (idx < list.length) { - if (fn(list[idx])) { - return true; - } - idx += 1; - } - return false; -})); diff --git a/node_modules/ramda/src/anyPass.js b/node_modules/ramda/src/anyPass.js deleted file mode 100644 index 22dc166..0000000 --- a/node_modules/ramda/src/anyPass.js +++ /dev/null @@ -1,46 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var curryN = require('./curryN'); -var max = require('./max'); -var pluck = require('./pluck'); -var reduce = require('./reduce'); - - -/** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if at least one of the provided predicates is - * satisfied by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.allPass - * @example - * - * var isClub = R.propEq('suit', '♣'); - * var isSpade = R.propEq('suit', '♠'); - * var isBlackCard = R.anyPass([isClub, isSpade]); - * - * isBlackCard({rank: '10', suit: '♣'}); //=> true - * isBlackCard({rank: 'Q', suit: '♠'}); //=> true - * isBlackCard({rank: 'Q', suit: '♦'}); //=> false - */ -module.exports = _curry1(function anyPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function() { - var idx = 0; - var len = preds.length; - while (idx < len) { - if (preds[idx].apply(this, arguments)) { - return true; - } - idx += 1; - } - return false; - }); -}); diff --git a/node_modules/ramda/src/ap.js b/node_modules/ramda/src/ap.js deleted file mode 100644 index 3b10e51..0000000 --- a/node_modules/ramda/src/ap.js +++ /dev/null @@ -1,39 +0,0 @@ -var _concat = require('./internal/_concat'); -var _curry2 = require('./internal/_curry2'); -var _reduce = require('./internal/_reduce'); -var map = require('./map'); - - -/** - * ap applies a list of functions to a list of values. - * - * Dispatches to the `ap` method of the second argument, if present. Also - * treats curried functions as applicatives. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig [a -> b] -> [a] -> [b] - * @sig Apply f => f (a -> b) -> f a -> f b - * @param {*} applyF - * @param {*} applyX - * @return {*} - * @example - * - * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6] - * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"] - * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)] - */ -module.exports = _curry2(function ap(applyF, applyX) { - return ( - typeof applyX['fantasy-land/ap'] === 'function' ? - applyX['fantasy-land/ap'](applyF) : - typeof applyF.ap === 'function' ? - applyF.ap(applyX) : - typeof applyF === 'function' ? - function(x) { return applyF(x)(applyX(x)); } : - // else - _reduce(function(acc, f) { return _concat(acc, map(f, applyX)); }, [], applyF) - ); -}); diff --git a/node_modules/ramda/src/aperture.js b/node_modules/ramda/src/aperture.js deleted file mode 100644 index a65d833..0000000 --- a/node_modules/ramda/src/aperture.js +++ /dev/null @@ -1,28 +0,0 @@ -var _aperture = require('./internal/_aperture'); -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xaperture = require('./internal/_xaperture'); - - -/** - * Returns a new list, composed of n-tuples of consecutive elements. If `n` is - * greater than the length of the list, an empty list is returned. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig Number -> [a] -> [[a]] - * @param {Number} n The size of the tuples to create - * @param {Array} list The list to split into `n`-length tuples - * @return {Array} The resulting list of `n`-length tuples - * @see R.transduce - * @example - * - * R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]] - * R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]] - * R.aperture(7, [1, 2, 3, 4, 5]); //=> [] - */ -module.exports = _curry2(_dispatchable([], _xaperture, _aperture)); diff --git a/node_modules/ramda/src/append.js b/node_modules/ramda/src/append.js deleted file mode 100644 index 474d447..0000000 --- a/node_modules/ramda/src/append.js +++ /dev/null @@ -1,27 +0,0 @@ -var _concat = require('./internal/_concat'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a new list containing the contents of the given list, followed by - * the given element. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} el The element to add to the end of the new list. - * @param {Array} list The list of elements to add a new item to. - * list. - * @return {Array} A new list containing the elements of the old list followed by `el`. - * @see R.prepend - * @example - * - * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests'] - * R.append('tests', []); //=> ['tests'] - * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']] - */ -module.exports = _curry2(function append(el, list) { - return _concat(list, [el]); -}); diff --git a/node_modules/ramda/src/apply.js b/node_modules/ramda/src/apply.js deleted file mode 100644 index d053b3c..0000000 --- a/node_modules/ramda/src/apply.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Applies function `fn` to the argument list `args`. This is useful for - * creating a fixed-arity function from a variadic function. `fn` should be a - * bound function if context is significant. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> a) -> [*] -> a - * @param {Function} fn The function which will be called with `args` - * @param {Array} args The arguments to call `fn` with - * @return {*} result The result, equivalent to `fn(...args)` - * @see R.call, R.unapply - * @example - * - * var nums = [1, 2, 3, -99, 42, 6, 7]; - * R.apply(Math.max, nums); //=> 42 - * @symb R.apply(f, [a, b, c]) = f(a, b, c) - */ -module.exports = _curry2(function apply(fn, args) { - return fn.apply(this, args); -}); diff --git a/node_modules/ramda/src/applySpec.js b/node_modules/ramda/src/applySpec.js deleted file mode 100644 index ba76be2..0000000 --- a/node_modules/ramda/src/applySpec.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var apply = require('./apply'); -var curryN = require('./curryN'); -var map = require('./map'); -var max = require('./max'); -var pluck = require('./pluck'); -var reduce = require('./reduce'); -var values = require('./values'); - - -/** - * Given a spec object recursively mapping properties to functions, creates a - * function producing an object of the same structure, by mapping each property - * to the result of calling its associated function with the supplied arguments. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Function - * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) - * @param {Object} spec an object recursively mapping properties to functions for - * producing the values for these properties. - * @return {Function} A function that returns an object of the same structure - * as `spec', with each property set to the value returned by calling its - * associated function with the supplied arguments. - * @see R.converge, R.juxt - * @example - * - * var getMetrics = R.applySpec({ - * sum: R.add, - * nested: { mul: R.multiply } - * }); - * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } - * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } - */ -module.exports = _curry1(function applySpec(spec) { - spec = map(function(v) { return typeof v == 'function' ? v : applySpec(v); }, - spec); - return curryN(reduce(max, 0, pluck('length', values(spec))), - function() { - var args = arguments; - return map(function(f) { return apply(f, args); }, spec); - }); -}); diff --git a/node_modules/ramda/src/ascend.js b/node_modules/ramda/src/ascend.js deleted file mode 100644 index bc5cc3c..0000000 --- a/node_modules/ramda/src/ascend.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Makes an ascending comparator function out of a function that returns a value - * that can be compared with `<` and `>`. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Function - * @sig Ord b => (a -> b) -> a -> a -> Number - * @param {Function} fn A function of arity one that returns a value that can be compared - * @param {*} a The first item to be compared. - * @param {*} b The second item to be compared. - * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0` - * @see R.descend - * @example - * - * var byAge = R.ascend(R.prop('age')); - * var people = [ - * // ... - * ]; - * var peopleByYoungestFirst = R.sort(byAge, people); - */ -module.exports = _curry3(function ascend(fn, a, b) { - var aa = fn(a); - var bb = fn(b); - return aa < bb ? -1 : aa > bb ? 1 : 0; -}); diff --git a/node_modules/ramda/src/assoc.js b/node_modules/ramda/src/assoc.js deleted file mode 100644 index a012355..0000000 --- a/node_modules/ramda/src/assoc.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Makes a shallow clone of an object, setting or overriding the specified - * property with the given value. Note that this copies and flattens prototype - * properties onto the new object as well. All non-primitive properties are - * copied by reference. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @sig String -> a -> {k: v} -> {k: v} - * @param {String} prop The property name to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except for the changed property. - * @see R.dissoc - * @example - * - * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} - */ -module.exports = _curry3(function assoc(prop, val, obj) { - var result = {}; - for (var p in obj) { - result[p] = obj[p]; - } - result[prop] = val; - return result; -}); diff --git a/node_modules/ramda/src/assocPath.js b/node_modules/ramda/src/assocPath.js deleted file mode 100644 index b0285fb..0000000 --- a/node_modules/ramda/src/assocPath.js +++ /dev/null @@ -1,49 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var _has = require('./internal/_has'); -var _isArray = require('./internal/_isArray'); -var _isInteger = require('./internal/_isInteger'); -var assoc = require('./assoc'); -var isNil = require('./isNil'); - - -/** - * Makes a shallow clone of an object, setting or overriding the nodes required - * to create the given path, and placing the specific value at the tail end of - * that path. Note that this copies and flattens prototype properties onto the - * new object as well. All non-primitive properties are copied by reference. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> {a} - * @param {Array} path the path to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except along the specified path. - * @see R.dissocPath - * @example - * - * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} - * - * // Any missing or non-object keys in path will be overridden - * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} - */ -module.exports = _curry3(function assocPath(path, val, obj) { - if (path.length === 0) { - return val; - } - var idx = path[0]; - if (path.length > 1) { - var nextObj = (!isNil(obj) && _has(idx, obj)) ? obj[idx] : _isInteger(path[1]) ? [] : {}; - val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); - } - if (_isInteger(idx) && _isArray(obj)) { - var arr = [].concat(obj); - arr[idx] = val; - return arr; - } else { - return assoc(idx, val, obj); - } -}); diff --git a/node_modules/ramda/src/binary.js b/node_modules/ramda/src/binary.js deleted file mode 100644 index 9bafb5b..0000000 --- a/node_modules/ramda/src/binary.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var nAry = require('./nAry'); - - -/** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 2 parameters. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> c) -> (a, b -> c) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 2. - * @see R.nAry, R.unary - * @example - * - * var takesThreeArgs = function(a, b, c) { - * return [a, b, c]; - * }; - * takesThreeArgs.length; //=> 3 - * takesThreeArgs(1, 2, 3); //=> [1, 2, 3] - * - * var takesTwoArgs = R.binary(takesThreeArgs); - * takesTwoArgs.length; //=> 2 - * // Only 2 arguments are passed to the wrapped function - * takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] - * @symb R.binary(f)(a, b, c) = f(a, b) - */ -module.exports = _curry1(function binary(fn) { - return nAry(2, fn); -}); diff --git a/node_modules/ramda/src/bind.js b/node_modules/ramda/src/bind.js deleted file mode 100644 index e90e2c6..0000000 --- a/node_modules/ramda/src/bind.js +++ /dev/null @@ -1,31 +0,0 @@ -var _arity = require('./internal/_arity'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Creates a function that is bound to a context. - * Note: `R.bind` does not provide the additional argument-binding capabilities of - * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Function - * @category Object - * @sig (* -> *) -> {*} -> (* -> *) - * @param {Function} fn The function to bind to context - * @param {Object} thisObj The context to bind `fn` to - * @return {Function} A function that will execute in the context of `thisObj`. - * @see R.partial - * @example - * - * var log = R.bind(console.log, console); - * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3} - * // logs {a: 2} - * @symb R.bind(f, o)(a, b) = f.call(o, a, b) - */ -module.exports = _curry2(function bind(fn, thisObj) { - return _arity(fn.length, function() { - return fn.apply(thisObj, arguments); - }); -}); diff --git a/node_modules/ramda/src/both.js b/node_modules/ramda/src/both.js deleted file mode 100644 index 0e0faf5..0000000 --- a/node_modules/ramda/src/both.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _isFunction = require('./internal/_isFunction'); -var and = require('./and'); -var lift = require('./lift'); - - -/** - * A function which calls the two provided functions and returns the `&&` - * of the results. - * It returns the result of the first function if it is false-y and the result - * of the second function otherwise. Note that this is short-circuited, - * meaning that the second function will not be invoked if the first returns a - * false-y value. - * - * In addition to functions, `R.both` also accepts any fantasy-land compatible - * applicative functor. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) - * @param {Function} f A predicate - * @param {Function} g Another predicate - * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together. - * @see R.and - * @example - * - * var gt10 = R.gt(R.__, 10) - * var lt20 = R.lt(R.__, 20) - * var f = R.both(gt10, lt20); - * f(15); //=> true - * f(30); //=> false - */ -module.exports = _curry2(function both(f, g) { - return _isFunction(f) ? - function _both() { - return f.apply(this, arguments) && g.apply(this, arguments); - } : - lift(and)(f, g); -}); diff --git a/node_modules/ramda/src/call.js b/node_modules/ramda/src/call.js deleted file mode 100644 index 6808d6c..0000000 --- a/node_modules/ramda/src/call.js +++ /dev/null @@ -1,38 +0,0 @@ -var curry = require('./curry'); - - -/** - * Returns the result of calling its first argument with the remaining - * arguments. This is occasionally useful as a converging function for - * [`R.converge`](#converge): the first branch can produce a function while the - * remaining branches produce values to be passed to that function as its - * arguments. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig (*... -> a),*... -> a - * @param {Function} fn The function to apply to the remaining arguments. - * @param {...*} args Any number of positional arguments. - * @return {*} - * @see R.apply - * @example - * - * R.call(R.add, 1, 2); //=> 3 - * - * var indentN = R.pipe(R.times(R.always(' ')), - * R.join(''), - * R.replace(/^(?!$)/gm)); - * - * var format = R.converge(R.call, [ - * R.pipe(R.prop('indent'), indentN), - * R.prop('value') - * ]); - * - * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' - * @symb R.call(f, a, b) = f(a, b) - */ -module.exports = curry(function call(fn) { - return fn.apply(this, Array.prototype.slice.call(arguments, 1)); -}); diff --git a/node_modules/ramda/src/chain.js b/node_modules/ramda/src/chain.js deleted file mode 100644 index 2cbfec2..0000000 --- a/node_modules/ramda/src/chain.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _makeFlat = require('./internal/_makeFlat'); -var _xchain = require('./internal/_xchain'); -var map = require('./map'); - - -/** - * `chain` maps a function over a list and concatenates the results. `chain` - * is also known as `flatMap` in some libraries - * - * Dispatches to the `chain` method of the second argument, if present, - * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain). - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig Chain m => (a -> m b) -> m a -> m b - * @param {Function} fn The function to map with - * @param {Array} list The list to map over - * @return {Array} The result of flat-mapping `list` with `fn` - * @example - * - * var duplicate = n => [n, n]; - * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] - * - * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1] - */ -module.exports = _curry2(_dispatchable(['fantasy-land/chain', 'chain'], _xchain, function chain(fn, monad) { - if (typeof monad === 'function') { - return function(x) { return fn(monad(x))(x); }; - } - return _makeFlat(false)(map(fn, monad)); -})); diff --git a/node_modules/ramda/src/clamp.js b/node_modules/ramda/src/clamp.js deleted file mode 100644 index 4e1680f..0000000 --- a/node_modules/ramda/src/clamp.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - -/** - * Restricts a number to be within a range. - * - * Also works for other ordered types such as Strings and Dates. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Relation - * @sig Ord a => a -> a -> a -> a - * @param {Number} minimum The lower limit of the clamp (inclusive) - * @param {Number} maximum The upper limit of the clamp (inclusive) - * @param {Number} value Value to be clamped - * @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise - * @example - * - * R.clamp(1, 10, -5) // => 1 - * R.clamp(1, 10, 15) // => 10 - * R.clamp(1, 10, 4) // => 4 - */ -module.exports = _curry3(function clamp(min, max, value) { - if (min > max) { - throw new Error('min must not be greater than max in clamp(min, max, value)'); - } - return value < min ? min : - value > max ? max : - value; -}); diff --git a/node_modules/ramda/src/clone.js b/node_modules/ramda/src/clone.js deleted file mode 100644 index 4f48366..0000000 --- a/node_modules/ramda/src/clone.js +++ /dev/null @@ -1,30 +0,0 @@ -var _clone = require('./internal/_clone'); -var _curry1 = require('./internal/_curry1'); - - -/** - * Creates a deep copy of the value which may contain (nested) `Array`s and - * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are - * assigned by reference rather than copied - * - * Dispatches to a `clone` method if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {*} -> {*} - * @param {*} value The object or array to clone - * @return {*} A deeply cloned copy of `val` - * @example - * - * var objects = [{}, {}, {}]; - * var objectsClone = R.clone(objects); - * objects === objectsClone; //=> false - * objects[0] === objectsClone[0]; //=> false - */ -module.exports = _curry1(function clone(value) { - return value != null && typeof value.clone === 'function' ? - value.clone() : - _clone(value, [], [], true); -}); diff --git a/node_modules/ramda/src/comparator.js b/node_modules/ramda/src/comparator.js deleted file mode 100644 index fcf1854..0000000 --- a/node_modules/ramda/src/comparator.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Makes a comparator function out of a function that reports whether the first - * element is less than the second. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a, b -> Boolean) -> (a, b -> Number) - * @param {Function} pred A predicate function of arity two which will return `true` if the first argument - * is less than the second, `false` otherwise - * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` - * @example - * - * var byAge = R.comparator((a, b) => a.age < b.age); - * var people = [ - * // ... - * ]; - * var peopleByIncreasingAge = R.sort(byAge, people); - */ -module.exports = _curry1(function comparator(pred) { - return function(a, b) { - return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; - }; -}); diff --git a/node_modules/ramda/src/complement.js b/node_modules/ramda/src/complement.js deleted file mode 100644 index 4418751..0000000 --- a/node_modules/ramda/src/complement.js +++ /dev/null @@ -1,27 +0,0 @@ -var lift = require('./lift'); -var not = require('./not'); - - -/** - * Takes a function `f` and returns a function `g` such that if called with the same arguments - * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`. - * - * `R.complement` may be applied to any functor - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> *) -> (*... -> Boolean) - * @param {Function} f - * @return {Function} - * @see R.not - * @example - * - * var isNotNil = R.complement(R.isNil); - * isNil(null); //=> true - * isNotNil(null); //=> false - * isNil(7); //=> false - * isNotNil(7); //=> true - */ -module.exports = lift(not); diff --git a/node_modules/ramda/src/compose.js b/node_modules/ramda/src/compose.js deleted file mode 100644 index 0f4dbe8..0000000 --- a/node_modules/ramda/src/compose.js +++ /dev/null @@ -1,34 +0,0 @@ -var pipe = require('./pipe'); -var reverse = require('./reverse'); - - -/** - * Performs right-to-left function composition. The rightmost function may have - * any arity; the remaining functions must be unary. - * - * **Note:** The result of compose is not automatically curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.pipe - * @example - * - * var classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName - * var yellGreeting = R.compose(R.toUpper, classyGreeting); - * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" - * - * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 - * - * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) - */ -module.exports = function compose() { - if (arguments.length === 0) { - throw new Error('compose requires at least one argument'); - } - return pipe.apply(this, reverse(arguments)); -}; diff --git a/node_modules/ramda/src/composeK.js b/node_modules/ramda/src/composeK.js deleted file mode 100644 index b1778ba..0000000 --- a/node_modules/ramda/src/composeK.js +++ /dev/null @@ -1,43 +0,0 @@ -var chain = require('./chain'); -var compose = require('./compose'); -var map = require('./map'); - - -/** - * Returns the right-to-left Kleisli composition of the provided functions, - * each of which must return a value of a type supported by [`chain`](#chain). - * - * `R.composeK(h, g, f)` is equivalent to `R.compose(R.chain(h), R.chain(g), R.chain(f))`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Function - * @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.pipeK - * @example - * - * // get :: String -> Object -> Maybe * - * var get = R.curry((propName, obj) => Maybe(obj[propName])) - * - * // getStateCode :: Maybe String -> Maybe String - * var getStateCode = R.composeK( - * R.compose(Maybe.of, R.toUpper), - * get('state'), - * get('address'), - * get('user'), - * ); - * getStateCode({"user":{"address":{"state":"ny"}}}); //=> Maybe.Just("NY") - * getStateCode({}); //=> Maybe.Nothing() - * @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a))) - */ -module.exports = function composeK() { - if (arguments.length === 0) { - throw new Error('composeK requires at least one argument'); - } - var init = Array.prototype.slice.call(arguments); - var last = init.pop(); - return compose(compose.apply(this, map(chain, init)), last); -}; diff --git a/node_modules/ramda/src/composeP.js b/node_modules/ramda/src/composeP.js deleted file mode 100644 index e0d22e9..0000000 --- a/node_modules/ramda/src/composeP.js +++ /dev/null @@ -1,44 +0,0 @@ -var pipeP = require('./pipeP'); -var reverse = require('./reverse'); - - -/** - * Performs right-to-left composition of one or more Promise-returning - * functions. The rightmost function may have any arity; the remaining - * functions must be unary. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z) - * @param {...Function} functions The functions to compose - * @return {Function} - * @see R.pipeP - * @example - * - * var db = { - * users: { - * JOE: { - * name: 'Joe', - * followers: ['STEVE', 'SUZY'] - * } - * } - * } - * - * // We'll pretend to do a db lookup which returns a promise - * var lookupUser = (userId) => Promise.resolve(db.users[userId]) - * var lookupFollowers = (user) => Promise.resolve(user.followers) - * lookupUser('JOE').then(lookupFollowers) - * - * // followersForUser :: String -> Promise [UserId] - * var followersForUser = R.composeP(lookupFollowers, lookupUser); - * followersForUser('JOE').then(followers => console.log('Followers:', followers)) - * // Followers: ["STEVE","SUZY"] - */ -module.exports = function composeP() { - if (arguments.length === 0) { - throw new Error('composeP requires at least one argument'); - } - return pipeP.apply(this, reverse(arguments)); -}; diff --git a/node_modules/ramda/src/concat.js b/node_modules/ramda/src/concat.js deleted file mode 100644 index 2e01e94..0000000 --- a/node_modules/ramda/src/concat.js +++ /dev/null @@ -1,54 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _isArray = require('./internal/_isArray'); -var _isFunction = require('./internal/_isFunction'); -var _isString = require('./internal/_isString'); -var toString = require('./toString'); - - -/** - * Returns the result of concatenating the given lists or strings. - * - * Note: `R.concat` expects both arguments to be of the same type, - * unlike the native `Array.prototype.concat` method. It will throw - * an error if you `concat` an Array with a non-Array value. - * - * Dispatches to the `concat` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] -> [a] - * @sig String -> String -> String - * @param {Array|String} firstList The first list - * @param {Array|String} secondList The second list - * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of - * `secondList`. - * - * @example - * - * R.concat('ABC', 'DEF'); // 'ABCDEF' - * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] - * R.concat([], []); //=> [] - */ -module.exports = _curry2(function concat(a, b) { - if (_isArray(a)) { - if (_isArray(b)) { - return a.concat(b); - } - throw new TypeError(toString(b) + ' is not an array'); - } - if (_isString(a)) { - if (_isString(b)) { - return a + b; - } - throw new TypeError(toString(b) + ' is not a string'); - } - if (a != null && _isFunction(a['fantasy-land/concat'])) { - return a['fantasy-land/concat'](b); - } - if (a != null && _isFunction(a.concat)) { - return a.concat(b); - } - throw new TypeError(toString(a) + ' does not have a method named "concat" or "fantasy-land/concat"'); -}); diff --git a/node_modules/ramda/src/cond.js b/node_modules/ramda/src/cond.js deleted file mode 100644 index a96822a..0000000 --- a/node_modules/ramda/src/cond.js +++ /dev/null @@ -1,47 +0,0 @@ -var _arity = require('./internal/_arity'); -var _curry1 = require('./internal/_curry1'); -var map = require('./map'); -var max = require('./max'); -var reduce = require('./reduce'); - - -/** - * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic. - * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments - * to `fn` are applied to each of the predicates in turn until one returns a - * "truthy" value, at which point `fn` returns the result of applying its - * arguments to the corresponding transformer. If none of the predicates - * matches, `fn` returns undefined. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Logic - * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *) - * @param {Array} pairs A list of [predicate, transformer] - * @return {Function} - * @example - * - * var fn = R.cond([ - * [R.equals(0), R.always('water freezes at 0°C')], - * [R.equals(100), R.always('water boils at 100°C')], - * [R.T, temp => 'nothing special happens at ' + temp + '°C'] - * ]); - * fn(0); //=> 'water freezes at 0°C' - * fn(50); //=> 'nothing special happens at 50°C' - * fn(100); //=> 'water boils at 100°C' - */ -module.exports = _curry1(function cond(pairs) { - var arity = reduce(max, - 0, - map(function(pair) { return pair[0].length; }, pairs)); - return _arity(arity, function() { - var idx = 0; - while (idx < pairs.length) { - if (pairs[idx][0].apply(this, arguments)) { - return pairs[idx][1].apply(this, arguments); - } - idx += 1; - } - }); -}); diff --git a/node_modules/ramda/src/construct.js b/node_modules/ramda/src/construct.js deleted file mode 100644 index 43dd68f..0000000 --- a/node_modules/ramda/src/construct.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var constructN = require('./constructN'); - - -/** - * Wraps a constructor function inside a curried function that can be called - * with the same arguments and returns the same type. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (* -> {*}) -> (* -> {*}) - * @param {Function} fn The constructor function to wrap. - * @return {Function} A wrapped, curried constructor function. - * @see R.invoker - * @example - * - * // Constructor function - * function Animal(kind) { - * this.kind = kind; - * }; - * Animal.prototype.sighting = function() { - * return "It's a " + this.kind + "!"; - * } - * - * var AnimalConstructor = R.construct(Animal) - * - * // Notice we no longer need the 'new' keyword: - * AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}}; - * - * var animalTypes = ["Lion", "Tiger", "Bear"]; - * var animalSighting = R.invoker(0, 'sighting'); - * var sightNewAnimal = R.compose(animalSighting, AnimalConstructor); - * R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"] - */ -module.exports = _curry1(function construct(Fn) { - return constructN(Fn.length, Fn); -}); diff --git a/node_modules/ramda/src/constructN.js b/node_modules/ramda/src/constructN.js deleted file mode 100644 index 0258cc9..0000000 --- a/node_modules/ramda/src/constructN.js +++ /dev/null @@ -1,62 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var curry = require('./curry'); -var nAry = require('./nAry'); - - -/** - * Wraps a constructor function inside a curried function that can be called - * with the same arguments and returns the same type. The arity of the function - * returned is specified to allow using variadic constructor functions. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Function - * @sig Number -> (* -> {*}) -> (* -> {*}) - * @param {Number} n The arity of the constructor function. - * @param {Function} Fn The constructor function to wrap. - * @return {Function} A wrapped, curried constructor function. - * @example - * - * // Variadic Constructor function - * function Salad() { - * this.ingredients = arguments; - * }; - * Salad.prototype.recipe = function() { - * var instructions = R.map((ingredient) => ( - * 'Add a whollop of ' + ingredient, this.ingredients) - * ) - * return R.join('\n', instructions) - * } - * - * var ThreeLayerSalad = R.constructN(3, Salad) - * - * // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments. - * var salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup') - * console.log(salad.recipe()); - * // Add a whollop of Mayonnaise - * // Add a whollop of Potato Chips - * // Add a whollop of Potato Ketchup - */ -module.exports = _curry2(function constructN(n, Fn) { - if (n > 10) { - throw new Error('Constructor with greater than ten arguments'); - } - if (n === 0) { - return function() { return new Fn(); }; - } - return curry(nAry(n, function($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { - switch (arguments.length) { - case 1: return new Fn($0); - case 2: return new Fn($0, $1); - case 3: return new Fn($0, $1, $2); - case 4: return new Fn($0, $1, $2, $3); - case 5: return new Fn($0, $1, $2, $3, $4); - case 6: return new Fn($0, $1, $2, $3, $4, $5); - case 7: return new Fn($0, $1, $2, $3, $4, $5, $6); - case 8: return new Fn($0, $1, $2, $3, $4, $5, $6, $7); - case 9: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8); - case 10: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9); - } - })); -}); diff --git a/node_modules/ramda/src/contains.js b/node_modules/ramda/src/contains.js deleted file mode 100644 index d0c6ae7..0000000 --- a/node_modules/ramda/src/contains.js +++ /dev/null @@ -1,25 +0,0 @@ -var _contains = require('./internal/_contains'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns `true` if the specified value is equal, in [`R.equals`](#equals) - * terms, to at least one element of the given list; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Boolean - * @param {Object} a The item to compare against. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. - * @see R.any - * @example - * - * R.contains(3, [1, 2, 3]); //=> true - * R.contains(4, [1, 2, 3]); //=> false - * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true - * R.contains([42], [[42]]); //=> true - */ -module.exports = _curry2(_contains); diff --git a/node_modules/ramda/src/converge.js b/node_modules/ramda/src/converge.js deleted file mode 100644 index e5f3b92..0000000 --- a/node_modules/ramda/src/converge.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _map = require('./internal/_map'); -var curryN = require('./curryN'); -var max = require('./max'); -var pluck = require('./pluck'); -var reduce = require('./reduce'); - - -/** - * Accepts a converging function and a list of branching functions and returns - * a new function. When invoked, this new function is applied to some - * arguments, each branching function is applied to those same arguments. The - * results of each branching function are passed as arguments to the converging - * function to produce the return value. - * - * @func - * @memberOf R - * @since v0.4.2 - * @category Function - * @sig (x1 -> x2 -> ... -> z) -> [(a -> b -> ... -> x1), (a -> b -> ... -> x2), ...] -> (a -> b -> ... -> z) - * @param {Function} after A function. `after` will be invoked with the return values of - * `fn1` and `fn2` as its arguments. - * @param {Array} functions A list of functions. - * @return {Function} A new function. - * @see R.useWith - * @example - * - * var average = R.converge(R.divide, [R.sum, R.length]) - * average([1, 2, 3, 4, 5, 6, 7]) //=> 4 - * - * var strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower]) - * strangeConcat("Yodel") //=> "YODELyodel" - * - * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b)) - */ -module.exports = _curry2(function converge(after, fns) { - return curryN(reduce(max, 0, pluck('length', fns)), function() { - var args = arguments; - var context = this; - return after.apply(context, _map(function(fn) { - return fn.apply(context, args); - }, fns)); - }); -}); diff --git a/node_modules/ramda/src/countBy.js b/node_modules/ramda/src/countBy.js deleted file mode 100644 index 396a926..0000000 --- a/node_modules/ramda/src/countBy.js +++ /dev/null @@ -1,28 +0,0 @@ -var reduceBy = require('./reduceBy'); - - -/** - * Counts the elements of a list according to how many match each value of a - * key generated by the supplied function. Returns an object mapping the keys - * produced by `fn` to the number of occurrences in the list. Note that all - * keys are coerced to strings because of how JavaScript objects work. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig (a -> String) -> [a] -> {*} - * @param {Function} fn The function used to map values to keys. - * @param {Array} list The list to count elements from. - * @return {Object} An object mapping keys to number of occurrences in the list. - * @example - * - * var numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2]; - * R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1} - * - * var letters = ['a', 'b', 'A', 'a', 'B', 'c']; - * R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1} - */ -module.exports = reduceBy(function(acc, elem) { return acc + 1; }, 0); diff --git a/node_modules/ramda/src/curry.js b/node_modules/ramda/src/curry.js deleted file mode 100644 index 22d22e0..0000000 --- a/node_modules/ramda/src/curry.js +++ /dev/null @@ -1,48 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var curryN = require('./curryN'); - - -/** - * Returns a curried equivalent of the provided function. The curried function - * has two unusual capabilities. First, its arguments needn't be provided one - * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the - * following are equivalent: - * - * - `g(1)(2)(3)` - * - `g(1)(2, 3)` - * - `g(1, 2)(3)` - * - `g(1, 2, 3)` - * - * Secondly, the special placeholder value [`R.__`](#__) may be used to specify - * "gaps", allowing partial application of any combination of arguments, - * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), - * the following are equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (* -> a) -> (* -> a) - * @param {Function} fn The function to curry. - * @return {Function} A new, curried function. - * @see R.curryN - * @example - * - * var addFourNumbers = (a, b, c, d) => a + b + c + d; - * - * var curriedAddFourNumbers = R.curry(addFourNumbers); - * var f = curriedAddFourNumbers(1, 2); - * var g = f(3); - * g(4); //=> 10 - */ -module.exports = _curry1(function curry(fn) { - return curryN(fn.length, fn); -}); diff --git a/node_modules/ramda/src/curryN.js b/node_modules/ramda/src/curryN.js deleted file mode 100644 index a05f41d..0000000 --- a/node_modules/ramda/src/curryN.js +++ /dev/null @@ -1,54 +0,0 @@ -var _arity = require('./internal/_arity'); -var _curry1 = require('./internal/_curry1'); -var _curry2 = require('./internal/_curry2'); -var _curryN = require('./internal/_curryN'); - - -/** - * Returns a curried equivalent of the provided function, with the specified - * arity. The curried function has two unusual capabilities. First, its - * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the - * following are equivalent: - * - * - `g(1)(2)(3)` - * - `g(1)(2, 3)` - * - `g(1, 2)(3)` - * - `g(1, 2, 3)` - * - * Secondly, the special placeholder value [`R.__`](#__) may be used to specify - * "gaps", allowing partial application of any combination of arguments, - * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), - * the following are equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @func - * @memberOf R - * @since v0.5.0 - * @category Function - * @sig Number -> (* -> a) -> (* -> a) - * @param {Number} length The arity for the returned function. - * @param {Function} fn The function to curry. - * @return {Function} A new, curried function. - * @see R.curry - * @example - * - * var sumArgs = (...args) => R.sum(args); - * - * var curriedAddFourNumbers = R.curryN(4, sumArgs); - * var f = curriedAddFourNumbers(1, 2); - * var g = f(3); - * g(4); //=> 10 - */ -module.exports = _curry2(function curryN(length, fn) { - if (length === 1) { - return _curry1(fn); - } - return _arity(length, _curryN(length, [], fn)); -}); diff --git a/node_modules/ramda/src/dec.js b/node_modules/ramda/src/dec.js deleted file mode 100644 index 215ac35..0000000 --- a/node_modules/ramda/src/dec.js +++ /dev/null @@ -1,19 +0,0 @@ -var add = require('./add'); - - -/** - * Decrements its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n - 1 - * @see R.inc - * @example - * - * R.dec(42); //=> 41 - */ -module.exports = add(-1); diff --git a/node_modules/ramda/src/defaultTo.js b/node_modules/ramda/src/defaultTo.js deleted file mode 100644 index c6efd5b..0000000 --- a/node_modules/ramda/src/defaultTo.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns the second argument if it is not `null`, `undefined` or `NaN`; - * otherwise the first argument is returned. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Logic - * @sig a -> b -> a | b - * @param {a} default The default value. - * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`. - * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value - * @example - * - * var defaultTo42 = R.defaultTo(42); - * - * defaultTo42(null); //=> 42 - * defaultTo42(undefined); //=> 42 - * defaultTo42('Ramda'); //=> 'Ramda' - * // parseInt('string') results in NaN - * defaultTo42(parseInt('string')); //=> 42 - */ -module.exports = _curry2(function defaultTo(d, v) { - return v == null || v !== v ? d : v; -}); diff --git a/node_modules/ramda/src/descend.js b/node_modules/ramda/src/descend.js deleted file mode 100644 index 6ca40c7..0000000 --- a/node_modules/ramda/src/descend.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Makes a descending comparator function out of a function that returns a value - * that can be compared with `<` and `>`. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Function - * @sig Ord b => (a -> b) -> a -> a -> Number - * @param {Function} fn A function of arity one that returns a value that can be compared - * @param {*} a The first item to be compared. - * @param {*} b The second item to be compared. - * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0` - * @see R.ascend - * @example - * - * var byAge = R.descend(R.prop('age')); - * var people = [ - * // ... - * ]; - * var peopleByOldestFirst = R.sort(byAge, people); - */ -module.exports = _curry3(function descend(fn, a, b) { - var aa = fn(a); - var bb = fn(b); - return aa > bb ? -1 : aa < bb ? 1 : 0; -}); diff --git a/node_modules/ramda/src/difference.js b/node_modules/ramda/src/difference.js deleted file mode 100644 index 7071db1..0000000 --- a/node_modules/ramda/src/difference.js +++ /dev/null @@ -1,36 +0,0 @@ -var _contains = require('./internal/_contains'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Finds the set (i.e. no duplicates) of all elements in the first list not - * contained in the second list. Objects and Arrays are compared in terms of - * value equality, not reference equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` that are not in `list2`. - * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without - * @example - * - * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2] - * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5] - * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}] - */ -module.exports = _curry2(function difference(first, second) { - var out = []; - var idx = 0; - var firstLen = first.length; - while (idx < firstLen) { - if (!_contains(first[idx], second) && !_contains(first[idx], out)) { - out[out.length] = first[idx]; - } - idx += 1; - } - return out; -}); diff --git a/node_modules/ramda/src/differenceWith.js b/node_modules/ramda/src/differenceWith.js deleted file mode 100644 index 1dc3db5..0000000 --- a/node_modules/ramda/src/differenceWith.js +++ /dev/null @@ -1,39 +0,0 @@ -var _containsWith = require('./internal/_containsWith'); -var _curry3 = require('./internal/_curry3'); - - -/** - * Finds the set (i.e. no duplicates) of all elements in the first list not - * contained in the second list. Duplication is determined according to the - * value returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` that are not in `list2`. - * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith - * @example - * - * var cmp = (x, y) => x.a === y.a; - * var l1 = [{a: 1}, {a: 2}, {a: 3}]; - * var l2 = [{a: 3}, {a: 4}]; - * R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}] - */ -module.exports = _curry3(function differenceWith(pred, first, second) { - var out = []; - var idx = 0; - var firstLen = first.length; - while (idx < firstLen) { - if (!_containsWith(pred, first[idx], second) && - !_containsWith(pred, first[idx], out)) { - out.push(first[idx]); - } - idx += 1; - } - return out; -}); diff --git a/node_modules/ramda/src/dissoc.js b/node_modules/ramda/src/dissoc.js deleted file mode 100644 index f461608..0000000 --- a/node_modules/ramda/src/dissoc.js +++ /dev/null @@ -1,27 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a new object that does not contain a `prop` property. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Object - * @sig String -> {k: v} -> {k: v} - * @param {String} prop The name of the property to dissociate - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original but without the specified property - * @see R.assoc - * @example - * - * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3} - */ -module.exports = _curry2(function dissoc(prop, obj) { - var result = {}; - for (var p in obj) { - result[p] = obj[p]; - } - delete result[prop]; - return result; -}); diff --git a/node_modules/ramda/src/dissocPath.js b/node_modules/ramda/src/dissocPath.js deleted file mode 100644 index cf96b9d..0000000 --- a/node_modules/ramda/src/dissocPath.js +++ /dev/null @@ -1,45 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _isInteger = require('./internal/_isInteger'); -var assoc = require('./assoc'); -var dissoc = require('./dissoc'); -var remove = require('./remove'); -var update = require('./update'); - - -/** - * Makes a shallow clone of an object, omitting the property at the given path. - * Note that this copies and flattens prototype properties onto the new object - * as well. All non-primitive properties are copied by reference. - * - * @func - * @memberOf R - * @since v0.11.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {k: v} -> {k: v} - * @param {Array} path The path to the value to omit - * @param {Object} obj The object to clone - * @return {Object} A new object without the property at path - * @see R.assocPath - * @example - * - * R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}} - */ -module.exports = _curry2(function dissocPath(path, obj) { - switch (path.length) { - case 0: - return obj; - case 1: - return _isInteger(path[0]) ? remove(path[0], 1, obj) : dissoc(path[0], obj); - default: - var head = path[0]; - var tail = Array.prototype.slice.call(path, 1); - if (obj[head] == null) { - return obj; - } else if (_isInteger(path[0])) { - return update(head, dissocPath(tail, obj[head]), obj); - } else { - return assoc(head, dissocPath(tail, obj[head]), obj); - } - } -}); diff --git a/node_modules/ramda/src/divide.js b/node_modules/ramda/src/divide.js deleted file mode 100644 index 1829979..0000000 --- a/node_modules/ramda/src/divide.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Divides two numbers. Equivalent to `a / b`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a / b`. - * @see R.multiply - * @example - * - * R.divide(71, 100); //=> 0.71 - * - * var half = R.divide(R.__, 2); - * half(42); //=> 21 - * - * var reciprocal = R.divide(1); - * reciprocal(4); //=> 0.25 - */ -module.exports = _curry2(function divide(a, b) { return a / b; }); diff --git a/node_modules/ramda/src/drop.js b/node_modules/ramda/src/drop.js deleted file mode 100644 index 1503645..0000000 --- a/node_modules/ramda/src/drop.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xdrop = require('./internal/_xdrop'); -var slice = require('./slice'); - - -/** - * Returns all but the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `drop` method). - * - * Dispatches to the `drop` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} A copy of list without the first `n` elements - * @see R.take, R.transduce, R.dropLast, R.dropWhile - * @example - * - * R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.drop(3, ['foo', 'bar', 'baz']); //=> [] - * R.drop(4, ['foo', 'bar', 'baz']); //=> [] - * R.drop(3, 'ramda'); //=> 'da' - */ -module.exports = _curry2(_dispatchable(['drop'], _xdrop, function drop(n, xs) { - return slice(Math.max(0, n), Infinity, xs); -})); diff --git a/node_modules/ramda/src/dropLast.js b/node_modules/ramda/src/dropLast.js deleted file mode 100644 index 8fd298b..0000000 --- a/node_modules/ramda/src/dropLast.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _dropLast = require('./internal/_dropLast'); -var _xdropLast = require('./internal/_xdropLast'); - - -/** - * Returns a list containing all but the last `n` elements of the given `list`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements of `list` to skip. - * @param {Array} list The list of elements to consider. - * @return {Array} A copy of the list with only the first `list.length - n` elements - * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile - * @example - * - * R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.dropLast(3, ['foo', 'bar', 'baz']); //=> [] - * R.dropLast(4, ['foo', 'bar', 'baz']); //=> [] - * R.dropLast(3, 'ramda'); //=> 'ra' - */ -module.exports = _curry2(_dispatchable([], _xdropLast, _dropLast)); diff --git a/node_modules/ramda/src/dropLastWhile.js b/node_modules/ramda/src/dropLastWhile.js deleted file mode 100644 index 9713a59..0000000 --- a/node_modules/ramda/src/dropLastWhile.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _dropLastWhile = require('./internal/_dropLastWhile'); -var _xdropLastWhile = require('./internal/_xdropLastWhile'); - - -/** - * Returns a new list excluding all the tailing elements of a given list which - * satisfy the supplied predicate function. It passes each value from the right - * to the supplied predicate function, skipping elements until the predicate - * function returns a `falsy` value. The predicate function is applied to one argument: - * *(value)*. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @param {Function} predicate The function to be called on each element - * @param {Array} list The collection to iterate over. - * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`. - * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile - * @example - * - * var lteThree = x => x <= 3; - * - * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4] - */ -module.exports = _curry2(_dispatchable([], _xdropLastWhile, _dropLastWhile)); diff --git a/node_modules/ramda/src/dropRepeats.js b/node_modules/ramda/src/dropRepeats.js deleted file mode 100644 index 3604eb2..0000000 --- a/node_modules/ramda/src/dropRepeats.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _dispatchable = require('./internal/_dispatchable'); -var _xdropRepeatsWith = require('./internal/_xdropRepeatsWith'); -var dropRepeatsWith = require('./dropRepeatsWith'); -var equals = require('./equals'); - - -/** - * Returns a new list without any consecutively repeating elements. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] - */ -module.exports = _curry1(_dispatchable([], _xdropRepeatsWith(equals), dropRepeatsWith(equals))); diff --git a/node_modules/ramda/src/dropRepeatsWith.js b/node_modules/ramda/src/dropRepeatsWith.js deleted file mode 100644 index ed31f4d..0000000 --- a/node_modules/ramda/src/dropRepeatsWith.js +++ /dev/null @@ -1,43 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xdropRepeatsWith = require('./internal/_xdropRepeatsWith'); -var last = require('./last'); - - -/** - * Returns a new list without any consecutively repeating elements. Equality is - * determined by applying the supplied predicate to each pair of consecutive elements. The - * first element in a series of equal elements will be preserved. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig (a, a -> Boolean) -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * var l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3]; - * R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3] - */ -module.exports = _curry2(_dispatchable([], _xdropRepeatsWith, function dropRepeatsWith(pred, list) { - var result = []; - var idx = 1; - var len = list.length; - if (len !== 0) { - result[0] = list[0]; - while (idx < len) { - if (!pred(last(result), list[idx])) { - result[result.length] = list[idx]; - } - idx += 1; - } - } - return result; -})); - diff --git a/node_modules/ramda/src/dropWhile.js b/node_modules/ramda/src/dropWhile.js deleted file mode 100644 index c9391c4..0000000 --- a/node_modules/ramda/src/dropWhile.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xdropWhile = require('./internal/_xdropWhile'); - - -/** - * Returns a new list excluding the leading elements of a given list which - * satisfy the supplied predicate function. It passes each value to the supplied - * predicate function, skipping elements while the predicate function returns - * `true`. The predicate function is applied to one argument: *(value)*. - * - * Dispatches to the `dropWhile` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @param {Function} fn The function called per iteration. - * @param {Array} list The collection to iterate over. - * @return {Array} A new array. - * @see R.takeWhile, R.transduce, R.addIndex - * @example - * - * var lteTwo = x => x <= 2; - * - * R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1] - */ -module.exports = _curry2(_dispatchable(['dropWhile'], _xdropWhile, function dropWhile(pred, list) { - var idx = 0; - var len = list.length; - while (idx < len && pred(list[idx])) { - idx += 1; - } - return Array.prototype.slice.call(list, idx); -})); diff --git a/node_modules/ramda/src/either.js b/node_modules/ramda/src/either.js deleted file mode 100644 index e9cc6ee..0000000 --- a/node_modules/ramda/src/either.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _isFunction = require('./internal/_isFunction'); -var lift = require('./lift'); -var or = require('./or'); - - -/** - * A function wrapping calls to the two functions in an `||` operation, - * returning the result of the first function if it is truth-y and the result - * of the second function otherwise. Note that this is short-circuited, - * meaning that the second function will not be invoked if the first returns a - * truth-y value. - * - * In addition to functions, `R.either` also accepts any fantasy-land compatible - * applicative functor. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) - * @param {Function} f a predicate - * @param {Function} g another predicate - * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together. - * @see R.or - * @example - * - * var gt10 = x => x > 10; - * var even = x => x % 2 === 0; - * var f = R.either(gt10, even); - * f(101); //=> true - * f(8); //=> true - */ -module.exports = _curry2(function either(f, g) { - return _isFunction(f) ? - function _either() { - return f.apply(this, arguments) || g.apply(this, arguments); - } : - lift(or)(f, g); -}); diff --git a/node_modules/ramda/src/empty.js b/node_modules/ramda/src/empty.js deleted file mode 100644 index 4251f23..0000000 --- a/node_modules/ramda/src/empty.js +++ /dev/null @@ -1,51 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _isArguments = require('./internal/_isArguments'); -var _isArray = require('./internal/_isArray'); -var _isObject = require('./internal/_isObject'); -var _isString = require('./internal/_isString'); - - -/** - * Returns the empty value of its argument's type. Ramda defines the empty - * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other - * types are supported if they define `.empty` and/or - * `.prototype.empty`. - * - * Dispatches to the `empty` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> a - * @param {*} x - * @return {*} - * @example - * - * R.empty(Just(42)); //=> Nothing() - * R.empty([1, 2, 3]); //=> [] - * R.empty('unicorns'); //=> '' - * R.empty({x: 1, y: 2}); //=> {} - */ -module.exports = _curry1(function empty(x) { - return ( - (x != null && typeof x['fantasy-land/empty'] === 'function') ? - x['fantasy-land/empty']() : - (x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function') ? - x.constructor['fantasy-land/empty']() : - (x != null && typeof x.empty === 'function') ? - x.empty() : - (x != null && x.constructor != null && typeof x.constructor.empty === 'function') ? - x.constructor.empty() : - _isArray(x) ? - [] : - _isString(x) ? - '' : - _isObject(x) ? - {} : - _isArguments(x) ? - (function() { return arguments; }()) : - // else - void 0 - ); -}); diff --git a/node_modules/ramda/src/endsWith.js b/node_modules/ramda/src/endsWith.js deleted file mode 100644 index e4f5c91..0000000 --- a/node_modules/ramda/src/endsWith.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var equals = require('./equals'); -var takeLast = require('./takeLast'); - -/** - * Checks if a list ends with the provided values - * - * @func - * @memberOf R - * @since v0.24.0 - * @category List - * @sig [a] -> Boolean - * @sig String -> Boolean - * @param {*} suffix - * @param {*} list - * @return {Boolean} - * @example - * - * R.endsWith('c', 'abc') //=> true - * R.endsWith('b', 'abc') //=> false - * R.endsWith(['c'], ['a', 'b', 'c']) //=> true - * R.endsWith(['b'], ['a', 'b', 'c']) //=> false - */ -module.exports = _curry2(function(suffix, list) { - return equals(takeLast(suffix.length, list), suffix); -}); diff --git a/node_modules/ramda/src/eqBy.js b/node_modules/ramda/src/eqBy.js deleted file mode 100644 index b30a9fd..0000000 --- a/node_modules/ramda/src/eqBy.js +++ /dev/null @@ -1,24 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var equals = require('./equals'); - - -/** - * Takes a function and two values in its domain and returns `true` if the - * values map to the same value in the codomain; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Relation - * @sig (a -> b) -> a -> a -> Boolean - * @param {Function} f - * @param {*} x - * @param {*} y - * @return {Boolean} - * @example - * - * R.eqBy(Math.abs, 5, -5); //=> true - */ -module.exports = _curry3(function eqBy(f, x, y) { - return equals(f(x), f(y)); -}); diff --git a/node_modules/ramda/src/eqProps.js b/node_modules/ramda/src/eqProps.js deleted file mode 100644 index a26eda5..0000000 --- a/node_modules/ramda/src/eqProps.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var equals = require('./equals'); - - -/** - * Reports whether two objects have the same value, in [`R.equals`](#equals) - * terms, for the specified property. Useful as a curried predicate. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig k -> {k: v} -> {k: v} -> Boolean - * @param {String} prop The name of the property to compare - * @param {Object} obj1 - * @param {Object} obj2 - * @return {Boolean} - * - * @example - * - * var o1 = { a: 1, b: 2, c: 3, d: 4 }; - * var o2 = { a: 10, b: 20, c: 3, d: 40 }; - * R.eqProps('a', o1, o2); //=> false - * R.eqProps('c', o1, o2); //=> true - */ -module.exports = _curry3(function eqProps(prop, obj1, obj2) { - return equals(obj1[prop], obj2[prop]); -}); diff --git a/node_modules/ramda/src/equals.js b/node_modules/ramda/src/equals.js deleted file mode 100644 index 5cc2bbe..0000000 --- a/node_modules/ramda/src/equals.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _equals = require('./internal/_equals'); - - -/** - * Returns `true` if its arguments are equivalent, `false` otherwise. Handles - * cyclical data structures. - * - * Dispatches symmetrically to the `equals` methods of both arguments, if - * present. - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Relation - * @sig a -> b -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @example - * - * R.equals(1, 1); //=> true - * R.equals(1, '1'); //=> false - * R.equals([1, 2, 3], [1, 2, 3]); //=> true - * - * var a = {}; a.v = a; - * var b = {}; b.v = b; - * R.equals(a, b); //=> true - */ -module.exports = _curry2(function equals(a, b) { - return _equals(a, b, [], []); -}); diff --git a/node_modules/ramda/src/evolve.js b/node_modules/ramda/src/evolve.js deleted file mode 100644 index 1757dbf..0000000 --- a/node_modules/ramda/src/evolve.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Creates a new object by recursively evolving a shallow copy of `object`, - * according to the `transformation` functions. All non-primitive properties - * are copied by reference. - * - * A `transformation` function will not be invoked if its corresponding key - * does not exist in the evolved object. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {k: (v -> v)} -> {k: v} -> {k: v} - * @param {Object} transformations The object specifying transformation functions to apply - * to the object. - * @param {Object} object The object to be transformed. - * @return {Object} The transformed object. - * @example - * - * var tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123}; - * var transformations = { - * firstName: R.trim, - * lastName: R.trim, // Will not get invoked. - * data: {elapsed: R.add(1), remaining: R.add(-1)} - * }; - * R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123} - */ -module.exports = _curry2(function evolve(transformations, object) { - var result = {}; - var transformation, key, type; - for (key in object) { - transformation = transformations[key]; - type = typeof transformation; - result[key] = type === 'function' ? transformation(object[key]) - : transformation && type === 'object' ? evolve(transformation, object[key]) - : object[key]; - } - return result; -}); diff --git a/node_modules/ramda/src/filter.js b/node_modules/ramda/src/filter.js deleted file mode 100644 index 7cef2b9..0000000 --- a/node_modules/ramda/src/filter.js +++ /dev/null @@ -1,49 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _filter = require('./internal/_filter'); -var _isObject = require('./internal/_isObject'); -var _reduce = require('./internal/_reduce'); -var _xfilter = require('./internal/_xfilter'); -var keys = require('./keys'); - - -/** - * Takes a predicate and a `Filterable`, and returns a new filterable of the - * same type containing the members of the given filterable which satisfy the - * given predicate. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * Dispatches to the `filter` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} Filterable - * @see R.reject, R.transduce, R.addIndex - * @example - * - * var isEven = n => n % 2 === 0; - * - * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] - * - * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ -module.exports = _curry2(_dispatchable(['filter'], _xfilter, function(pred, filterable) { - return ( - _isObject(filterable) ? - _reduce(function(acc, key) { - if (pred(filterable[key])) { - acc[key] = filterable[key]; - } - return acc; - }, {}, keys(filterable)) : - // else - _filter(pred, filterable) - ); -})); diff --git a/node_modules/ramda/src/find.js b/node_modules/ramda/src/find.js deleted file mode 100644 index acc3e2d..0000000 --- a/node_modules/ramda/src/find.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xfind = require('./internal/_xfind'); - - -/** - * Returns the first element of the list which matches the predicate, or - * `undefined` if no element matches. - * - * Dispatches to the `find` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> a | undefined - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Object} The element found, or `undefined`. - * @see R.transduce - * @example - * - * var xs = [{a: 1}, {a: 2}, {a: 3}]; - * R.find(R.propEq('a', 2))(xs); //=> {a: 2} - * R.find(R.propEq('a', 4))(xs); //=> undefined - */ -module.exports = _curry2(_dispatchable(['find'], _xfind, function find(fn, list) { - var idx = 0; - var len = list.length; - while (idx < len) { - if (fn(list[idx])) { - return list[idx]; - } - idx += 1; - } -})); diff --git a/node_modules/ramda/src/findIndex.js b/node_modules/ramda/src/findIndex.js deleted file mode 100644 index fb9bfb1..0000000 --- a/node_modules/ramda/src/findIndex.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xfindIndex = require('./internal/_xfindIndex'); - - -/** - * Returns the index of the first element of the list which matches the - * predicate, or `-1` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> Number - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Number} The index of the element found, or `-1`. - * @see R.transduce - * @example - * - * var xs = [{a: 1}, {a: 2}, {a: 3}]; - * R.findIndex(R.propEq('a', 2))(xs); //=> 1 - * R.findIndex(R.propEq('a', 4))(xs); //=> -1 - */ -module.exports = _curry2(_dispatchable([], _xfindIndex, function findIndex(fn, list) { - var idx = 0; - var len = list.length; - while (idx < len) { - if (fn(list[idx])) { - return idx; - } - idx += 1; - } - return -1; -})); diff --git a/node_modules/ramda/src/findLast.js b/node_modules/ramda/src/findLast.js deleted file mode 100644 index c878603..0000000 --- a/node_modules/ramda/src/findLast.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xfindLast = require('./internal/_xfindLast'); - - -/** - * Returns the last element of the list which matches the predicate, or - * `undefined` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> a | undefined - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Object} The element found, or `undefined`. - * @see R.transduce - * @example - * - * var xs = [{a: 1, b: 0}, {a:1, b: 1}]; - * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1} - * R.findLast(R.propEq('a', 4))(xs); //=> undefined - */ -module.exports = _curry2(_dispatchable([], _xfindLast, function findLast(fn, list) { - var idx = list.length - 1; - while (idx >= 0) { - if (fn(list[idx])) { - return list[idx]; - } - idx -= 1; - } -})); diff --git a/node_modules/ramda/src/findLastIndex.js b/node_modules/ramda/src/findLastIndex.js deleted file mode 100644 index 72b55f7..0000000 --- a/node_modules/ramda/src/findLastIndex.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xfindLastIndex = require('./internal/_xfindLastIndex'); - - -/** - * Returns the index of the last element of the list which matches the - * predicate, or `-1` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> Number - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Number} The index of the element found, or `-1`. - * @see R.transduce - * @example - * - * var xs = [{a: 1, b: 0}, {a:1, b: 1}]; - * R.findLastIndex(R.propEq('a', 1))(xs); //=> 1 - * R.findLastIndex(R.propEq('a', 4))(xs); //=> -1 - */ -module.exports = _curry2(_dispatchable([], _xfindLastIndex, function findLastIndex(fn, list) { - var idx = list.length - 1; - while (idx >= 0) { - if (fn(list[idx])) { - return idx; - } - idx -= 1; - } - return -1; -})); diff --git a/node_modules/ramda/src/flatten.js b/node_modules/ramda/src/flatten.js deleted file mode 100644 index 5fe6661..0000000 --- a/node_modules/ramda/src/flatten.js +++ /dev/null @@ -1,22 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _makeFlat = require('./internal/_makeFlat'); - - -/** - * Returns a new list by pulling every item out of it (and all its sub-arrays) - * and putting them in a new array, depth-first. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] - * @param {Array} list The array to consider. - * @return {Array} The flattened list. - * @see R.unnest - * @example - * - * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]); - * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] - */ -module.exports = _curry1(_makeFlat(true)); diff --git a/node_modules/ramda/src/flip.js b/node_modules/ramda/src/flip.js deleted file mode 100644 index 2204a1d..0000000 --- a/node_modules/ramda/src/flip.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var curry = require('./curry'); - - -/** - * Returns a new function much like the supplied one, except that the first two - * arguments' order is reversed. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a -> b -> c -> ... -> z) -> (b -> a -> c -> ... -> z) - * @param {Function} fn The function to invoke with its first two parameters reversed. - * @return {*} The result of invoking `fn` with its first two parameters' order reversed. - * @example - * - * var mergeThree = (a, b, c) => [].concat(a, b, c); - * - * mergeThree(1, 2, 3); //=> [1, 2, 3] - * - * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] - * @symb R.flip(f)(a, b, c) = f(b, a, c) - */ -module.exports = _curry1(function flip(fn) { - return curry(function(a, b) { - var args = Array.prototype.slice.call(arguments, 0); - args[0] = b; - args[1] = a; - return fn.apply(this, args); - }); -}); diff --git a/node_modules/ramda/src/forEach.js b/node_modules/ramda/src/forEach.js deleted file mode 100644 index 1fc0073..0000000 --- a/node_modules/ramda/src/forEach.js +++ /dev/null @@ -1,47 +0,0 @@ -var _checkForMethod = require('./internal/_checkForMethod'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Iterate over an input `list`, calling a provided function `fn` for each - * element in the list. - * - * `fn` receives one argument: *(value)*. - * - * Note: `R.forEach` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.forEach` method. For more - * details on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description - * - * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns - * the original array. In some libraries this function is named `each`. - * - * Dispatches to the `forEach` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> *) -> [a] -> [a] - * @param {Function} fn The function to invoke. Receives one argument, `value`. - * @param {Array} list The list to iterate over. - * @return {Array} The original list. - * @see R.addIndex - * @example - * - * var printXPlusFive = x => console.log(x + 5); - * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3] - * // logs 6 - * // logs 7 - * // logs 8 - * @symb R.forEach(f, [a, b, c]) = [a, b, c] - */ -module.exports = _curry2(_checkForMethod('forEach', function forEach(fn, list) { - var len = list.length; - var idx = 0; - while (idx < len) { - fn(list[idx]); - idx += 1; - } - return list; -})); diff --git a/node_modules/ramda/src/forEachObjIndexed.js b/node_modules/ramda/src/forEachObjIndexed.js deleted file mode 100644 index fa67250..0000000 --- a/node_modules/ramda/src/forEachObjIndexed.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var keys = require('./keys'); - - -/** - * Iterate over an input `object`, calling a provided function `fn` for each - * key and value in the object. - * - * `fn` receives three argument: *(value, key, obj)*. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Object - * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a - * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`. - * @param {Object} obj The object to iterate over. - * @return {Object} The original object. - * @example - * - * var printKeyConcatValue = (value, key) => console.log(key + ':' + value); - * R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2} - * // logs x:1 - * // logs y:2 - * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b} - */ -module.exports = _curry2(function forEachObjIndexed(fn, obj) { - var keyList = keys(obj); - var idx = 0; - while (idx < keyList.length) { - var key = keyList[idx]; - fn(obj[key], key, obj); - idx += 1; - } - return obj; -}); diff --git a/node_modules/ramda/src/fromPairs.js b/node_modules/ramda/src/fromPairs.js deleted file mode 100644 index 5e24e97..0000000 --- a/node_modules/ramda/src/fromPairs.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Creates a new object from a list key-value pairs. If a key appears in - * multiple pairs, the rightmost pair is included in the object. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [[k,v]] -> {k: v} - * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object. - * @return {Object} The object made by pairing up `keys` and `values`. - * @see R.toPairs, R.pair - * @example - * - * R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3} - */ -module.exports = _curry1(function fromPairs(pairs) { - var result = {}; - var idx = 0; - while (idx < pairs.length) { - result[pairs[idx][0]] = pairs[idx][1]; - idx += 1; - } - return result; -}); diff --git a/node_modules/ramda/src/groupBy.js b/node_modules/ramda/src/groupBy.js deleted file mode 100644 index cfdabdc..0000000 --- a/node_modules/ramda/src/groupBy.js +++ /dev/null @@ -1,51 +0,0 @@ -var _checkForMethod = require('./internal/_checkForMethod'); -var _curry2 = require('./internal/_curry2'); -var reduceBy = require('./reduceBy'); - -/** - * Splits a list into sub-lists stored in an object, based on the result of - * calling a String-returning function on each element, and grouping the - * results according to values returned. - * - * Dispatches to the `groupBy` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> String) -> [a] -> {String: [a]} - * @param {Function} fn Function :: a -> String - * @param {Array} list The array to group - * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements - * that produced that key when passed to `fn`. - * @see R.transduce - * @example - * - * var byGrade = R.groupBy(function(student) { - * var score = student.score; - * return score < 65 ? 'F' : - * score < 70 ? 'D' : - * score < 80 ? 'C' : - * score < 90 ? 'B' : 'A'; - * }); - * var students = [{name: 'Abby', score: 84}, - * {name: 'Eddy', score: 58}, - * // ... - * {name: 'Jack', score: 69}]; - * byGrade(students); - * // { - * // 'A': [{name: 'Dianne', score: 99}], - * // 'B': [{name: 'Abby', score: 84}] - * // // ..., - * // 'F': [{name: 'Eddy', score: 58}] - * // } - */ -module.exports = _curry2(_checkForMethod('groupBy', reduceBy(function(acc, item) { - if (acc == null) { - acc = []; - } - acc.push(item); - return acc; -}, null))); diff --git a/node_modules/ramda/src/groupWith.js b/node_modules/ramda/src/groupWith.js deleted file mode 100644 index 5b1b728..0000000 --- a/node_modules/ramda/src/groupWith.js +++ /dev/null @@ -1,46 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - -/** - * Takes a list and returns a list of lists where each sublist's elements are - * all satisfied pairwise comparison according to the provided function. - * Only adjacent elements are passed to the comparison function. - * - * @func - * @memberOf R - * @since v0.21.0 - * @category List - * @sig ((a, a) → Boolean) → [a] → [[a]] - * @param {Function} fn Function for determining whether two given (adjacent) - * elements should be in the same group - * @param {Array} list The array to group. Also accepts a string, which will be - * treated as a list of characters. - * @return {List} A list that contains sublists of elements, - * whose concatenations are equal to the original list. - * @example - * - * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] - * - * R.groupWith(R.eqBy(isVowel), 'aestiou') - * //=> ['ae', 'st', 'iou'] - */ -module.exports = _curry2(function(fn, list) { - var res = []; - var idx = 0; - var len = list.length; - while (idx < len) { - var nextidx = idx + 1; - while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { - nextidx += 1; - } - res.push(list.slice(idx, nextidx)); - idx = nextidx; - } - return res; -}); diff --git a/node_modules/ramda/src/gt.js b/node_modules/ramda/src/gt.js deleted file mode 100644 index 70c647a..0000000 --- a/node_modules/ramda/src/gt.js +++ /dev/null @@ -1,25 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns `true` if the first argument is greater than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.lt - * @example - * - * R.gt(2, 1); //=> true - * R.gt(2, 2); //=> false - * R.gt(2, 3); //=> false - * R.gt('a', 'z'); //=> false - * R.gt('z', 'a'); //=> true - */ -module.exports = _curry2(function gt(a, b) { return a > b; }); diff --git a/node_modules/ramda/src/gte.js b/node_modules/ramda/src/gte.js deleted file mode 100644 index d4a5d2d..0000000 --- a/node_modules/ramda/src/gte.js +++ /dev/null @@ -1,25 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns `true` if the first argument is greater than or equal to the second; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.lte - * @example - * - * R.gte(2, 1); //=> true - * R.gte(2, 2); //=> true - * R.gte(2, 3); //=> false - * R.gte('a', 'z'); //=> false - * R.gte('z', 'a'); //=> true - */ -module.exports = _curry2(function gte(a, b) { return a >= b; }); diff --git a/node_modules/ramda/src/has.js b/node_modules/ramda/src/has.js deleted file mode 100644 index fdbdd70..0000000 --- a/node_modules/ramda/src/has.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _has = require('./internal/_has'); - - -/** - * Returns whether or not an object has an own property with the specified name - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. - * @example - * - * var hasName = R.has('name'); - * hasName({name: 'alice'}); //=> true - * hasName({name: 'bob'}); //=> true - * hasName({}); //=> false - * - * var point = {x: 0, y: 0}; - * var pointHas = R.has(R.__, point); - * pointHas('x'); //=> true - * pointHas('y'); //=> true - * pointHas('z'); //=> false - */ -module.exports = _curry2(_has); diff --git a/node_modules/ramda/src/hasIn.js b/node_modules/ramda/src/hasIn.js deleted file mode 100644 index e6a54cc..0000000 --- a/node_modules/ramda/src/hasIn.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns whether or not an object or its prototype chain has a property with - * the specified name - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. - * @example - * - * function Rectangle(width, height) { - * this.width = width; - * this.height = height; - * } - * Rectangle.prototype.area = function() { - * return this.width * this.height; - * }; - * - * var square = new Rectangle(2, 2); - * R.hasIn('width', square); //=> true - * R.hasIn('area', square); //=> true - */ -module.exports = _curry2(function hasIn(prop, obj) { - return prop in obj; -}); diff --git a/node_modules/ramda/src/head.js b/node_modules/ramda/src/head.js deleted file mode 100644 index 4be7bea..0000000 --- a/node_modules/ramda/src/head.js +++ /dev/null @@ -1,25 +0,0 @@ -var nth = require('./nth'); - - -/** - * Returns the first element of the given list or string. In some libraries - * this function is named `first`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> a | Undefined - * @sig String -> String - * @param {Array|String} list - * @return {*} - * @see R.tail, R.init, R.last - * @example - * - * R.head(['fi', 'fo', 'fum']); //=> 'fi' - * R.head([]); //=> undefined - * - * R.head('abc'); //=> 'a' - * R.head(''); //=> '' - */ -module.exports = nth(0); diff --git a/node_modules/ramda/src/identical.js b/node_modules/ramda/src/identical.js deleted file mode 100644 index 9284857..0000000 --- a/node_modules/ramda/src/identical.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns true if its arguments are identical, false otherwise. Values are - * identical if they reference the same memory. `NaN` is identical to `NaN`; - * `0` and `-0` are not identical. - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Relation - * @sig a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @example - * - * var o = {}; - * R.identical(o, o); //=> true - * R.identical(1, 1); //=> true - * R.identical(1, '1'); //=> false - * R.identical([], []); //=> false - * R.identical(0, -0); //=> false - * R.identical(NaN, NaN); //=> true - */ -module.exports = _curry2(function identical(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; - } -}); diff --git a/node_modules/ramda/src/identity.js b/node_modules/ramda/src/identity.js deleted file mode 100644 index 75f0f95..0000000 --- a/node_modules/ramda/src/identity.js +++ /dev/null @@ -1,24 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _identity = require('./internal/_identity'); - - -/** - * A function that does nothing but return the parameter supplied to it. Good - * as a default or placeholder function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig a -> a - * @param {*} x The value to return. - * @return {*} The input value, `x`. - * @example - * - * R.identity(1); //=> 1 - * - * var obj = {}; - * R.identity(obj) === obj; //=> true - * @symb R.identity(a) = a - */ -module.exports = _curry1(_identity); diff --git a/node_modules/ramda/src/ifElse.js b/node_modules/ramda/src/ifElse.js deleted file mode 100644 index e0e4a1d..0000000 --- a/node_modules/ramda/src/ifElse.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var curryN = require('./curryN'); - - -/** - * Creates a function that will process either the `onTrue` or the `onFalse` - * function depending upon the result of the `condition` predicate. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *) - * @param {Function} condition A predicate function - * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. - * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. - * @return {Function} A new unary function that will process either the `onTrue` or the `onFalse` - * function depending upon the result of the `condition` predicate. - * @see R.unless, R.when - * @example - * - * var incCount = R.ifElse( - * R.has('count'), - * R.over(R.lensProp('count'), R.inc), - * R.assoc('count', 1) - * ); - * incCount({}); //=> { count: 1 } - * incCount({ count: 1 }); //=> { count: 2 } - */ -module.exports = _curry3(function ifElse(condition, onTrue, onFalse) { - return curryN(Math.max(condition.length, onTrue.length, onFalse.length), - function _ifElse() { - return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments); - } - ); -}); diff --git a/node_modules/ramda/src/inc.js b/node_modules/ramda/src/inc.js deleted file mode 100644 index 1f7a091..0000000 --- a/node_modules/ramda/src/inc.js +++ /dev/null @@ -1,19 +0,0 @@ -var add = require('./add'); - - -/** - * Increments its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n + 1 - * @see R.dec - * @example - * - * R.inc(42); //=> 43 - */ -module.exports = add(1); diff --git a/node_modules/ramda/src/indexBy.js b/node_modules/ramda/src/indexBy.js deleted file mode 100644 index a888ac6..0000000 --- a/node_modules/ramda/src/indexBy.js +++ /dev/null @@ -1,26 +0,0 @@ -var reduceBy = require('./reduceBy'); - - -/** - * Given a function that generates a key, turns a list of objects into an - * object indexing the objects by the given key. Note that if multiple - * objects generate the same value for the indexing key only the last value - * will be included in the generated object. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (a -> String) -> [{k: v}] -> {k: {k: v}} - * @param {Function} fn Function :: a -> String - * @param {Array} array The array of objects to index - * @return {Object} An object indexing each array element by the given property. - * @example - * - * var list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}]; - * R.indexBy(R.prop('id'), list); - * //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}} - */ -module.exports = reduceBy(function(acc, elem) { return elem; }, null); diff --git a/node_modules/ramda/src/indexOf.js b/node_modules/ramda/src/indexOf.js deleted file mode 100644 index 7257f25..0000000 --- a/node_modules/ramda/src/indexOf.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _indexOf = require('./internal/_indexOf'); -var _isArray = require('./internal/_isArray'); - - -/** - * Returns the position of the first occurrence of an item in an array, or -1 - * if the item is not included in the array. [`R.equals`](#equals) is used to - * determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Number - * @param {*} target The item to find. - * @param {Array} xs The array to search in. - * @return {Number} the index of the target, or -1 if the target is not found. - * @see R.lastIndexOf - * @example - * - * R.indexOf(3, [1,2,3,4]); //=> 2 - * R.indexOf(10, [1,2,3,4]); //=> -1 - */ -module.exports = _curry2(function indexOf(target, xs) { - return typeof xs.indexOf === 'function' && !_isArray(xs) ? - xs.indexOf(target) : - _indexOf(xs, target, 0); -}); diff --git a/node_modules/ramda/src/init.js b/node_modules/ramda/src/init.js deleted file mode 100644 index f2fd5c8..0000000 --- a/node_modules/ramda/src/init.js +++ /dev/null @@ -1,28 +0,0 @@ -var slice = require('./slice'); - - -/** - * Returns all but the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.last, R.head, R.tail - * @example - * - * R.init([1, 2, 3]); //=> [1, 2] - * R.init([1, 2]); //=> [1] - * R.init([1]); //=> [] - * R.init([]); //=> [] - * - * R.init('abc'); //=> 'ab' - * R.init('ab'); //=> 'a' - * R.init('a'); //=> '' - * R.init(''); //=> '' - */ -module.exports = slice(0, -1); diff --git a/node_modules/ramda/src/innerJoin.js b/node_modules/ramda/src/innerJoin.js deleted file mode 100644 index 692ec15..0000000 --- a/node_modules/ramda/src/innerJoin.js +++ /dev/null @@ -1,43 +0,0 @@ -var _containsWith = require('./internal/_containsWith'); -var _curry3 = require('./internal/_curry3'); -var _filter = require('./internal/_filter'); - - -/** - * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list - * `xs'` comprising each of the elements of `xs` which is equal to one or more - * elements of `ys` according to `pred`. - * - * `pred` must be a binary function expecting an element from each list. - * - * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should - * not be significant, but since `xs'` is ordered the implementation guarantees - * that its values are in the same order as they appear in `xs`. Duplicates are - * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Relation - * @sig (a -> b -> Boolean) -> [a] -> [b] -> [a] - * @param {Function} pred - * @param {Array} xs - * @param {Array} ys - * @return {Array} - * @see R.intersection - * @example - * - * R.innerJoin( - * (record, id) => record.id === id, - * [{id: 824, name: 'Richie Furay'}, - * {id: 956, name: 'Dewey Martin'}, - * {id: 313, name: 'Bruce Palmer'}, - * {id: 456, name: 'Stephen Stills'}, - * {id: 177, name: 'Neil Young'}], - * [177, 456, 999] - * ); - * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] - */ -module.exports = _curry3(function innerJoin(pred, xs, ys) { - return _filter(function(x) { return _containsWith(pred, x, ys); }, xs); -}); diff --git a/node_modules/ramda/src/insert.js b/node_modules/ramda/src/insert.js deleted file mode 100644 index 70d8c44..0000000 --- a/node_modules/ramda/src/insert.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Inserts the supplied element into the list, at the specified `index`. _Note that - - * this is not destructive_: it returns a copy of the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.2.2 - * @category List - * @sig Number -> a -> [a] -> [a] - * @param {Number} index The position to insert the element - * @param {*} elt The element to insert into the Array - * @param {Array} list The list to insert into - * @return {Array} A new Array with `elt` inserted at `index`. - * @example - * - * R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4] - */ -module.exports = _curry3(function insert(idx, elt, list) { - idx = idx < list.length && idx >= 0 ? idx : list.length; - var result = Array.prototype.slice.call(list, 0); - result.splice(idx, 0, elt); - return result; -}); diff --git a/node_modules/ramda/src/insertAll.js b/node_modules/ramda/src/insertAll.js deleted file mode 100644 index 10db9ea..0000000 --- a/node_modules/ramda/src/insertAll.js +++ /dev/null @@ -1,27 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Inserts the sub-list into the list, at the specified `index`. _Note that this is not - * destructive_: it returns a copy of the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig Number -> [a] -> [a] -> [a] - * @param {Number} index The position to insert the sub-list - * @param {Array} elts The sub-list to insert into the Array - * @param {Array} list The list to insert the sub-list into - * @return {Array} A new Array with `elts` inserted starting at `index`. - * @example - * - * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4] - */ -module.exports = _curry3(function insertAll(idx, elts, list) { - idx = idx < list.length && idx >= 0 ? idx : list.length; - return [].concat(Array.prototype.slice.call(list, 0, idx), - elts, - Array.prototype.slice.call(list, idx)); -}); diff --git a/node_modules/ramda/src/internal/_Set.js b/node_modules/ramda/src/internal/_Set.js deleted file mode 100644 index 98966c6..0000000 --- a/node_modules/ramda/src/internal/_Set.js +++ /dev/null @@ -1,171 +0,0 @@ -var _contains = require('./_contains'); - - -// A simple Set type that honours R.equals semantics -module.exports = (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. - // - 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 (!_contains(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 (!_contains(item, set._items[type])) { - if (shouldAdd) { - set._items[type].push(item); - } - return false; - } - return true; - } - } - return _Set; -}()); diff --git a/node_modules/ramda/src/internal/_aperture.js b/node_modules/ramda/src/internal/_aperture.js deleted file mode 100644 index d932c82..0000000 --- a/node_modules/ramda/src/internal/_aperture.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = 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; -}; diff --git a/node_modules/ramda/src/internal/_arity.js b/node_modules/ramda/src/internal/_arity.js deleted file mode 100644 index ca64574..0000000 --- a/node_modules/ramda/src/internal/_arity.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = 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'); - } -}; diff --git a/node_modules/ramda/src/internal/_arrayFromIterator.js b/node_modules/ramda/src/internal/_arrayFromIterator.js deleted file mode 100644 index bc4ee0b..0000000 --- a/node_modules/ramda/src/internal/_arrayFromIterator.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function _arrayFromIterator(iter) { - var list = []; - var next; - while (!(next = iter.next()).done) { - list.push(next.value); - } - return list; -}; diff --git a/node_modules/ramda/src/internal/_assign.js b/node_modules/ramda/src/internal/_assign.js deleted file mode 100644 index bbbe2d7..0000000 --- a/node_modules/ramda/src/internal/_assign.js +++ /dev/null @@ -1,4 +0,0 @@ -var _objectAssign = require('./_objectAssign'); - -module.exports = - typeof Object.assign === 'function' ? Object.assign : _objectAssign; diff --git a/node_modules/ramda/src/internal/_checkForMethod.js b/node_modules/ramda/src/internal/_checkForMethod.js deleted file mode 100644 index 9a27e81..0000000 --- a/node_modules/ramda/src/internal/_checkForMethod.js +++ /dev/null @@ -1,25 +0,0 @@ -var _isArray = require('./_isArray'); - - -/** - * 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. - */ -module.exports = 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)); - }; -}; diff --git a/node_modules/ramda/src/internal/_clone.js b/node_modules/ramda/src/internal/_clone.js deleted file mode 100644 index 28c0ebd..0000000 --- a/node_modules/ramda/src/internal/_clone.js +++ /dev/null @@ -1,40 +0,0 @@ -var _cloneRegExp = require('./_cloneRegExp'); -var type = require('../type'); - - -/** - * 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. - */ -module.exports = 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; - } -}; diff --git a/node_modules/ramda/src/internal/_cloneRegExp.js b/node_modules/ramda/src/internal/_cloneRegExp.js deleted file mode 100644 index f654035..0000000 --- a/node_modules/ramda/src/internal/_cloneRegExp.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = function _cloneRegExp(pattern) { - return new RegExp(pattern.source, (pattern.global ? 'g' : '') + - (pattern.ignoreCase ? 'i' : '') + - (pattern.multiline ? 'm' : '') + - (pattern.sticky ? 'y' : '') + - (pattern.unicode ? 'u' : '')); -}; diff --git a/node_modules/ramda/src/internal/_complement.js b/node_modules/ramda/src/internal/_complement.js deleted file mode 100644 index 25cdde4..0000000 --- a/node_modules/ramda/src/internal/_complement.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function _complement(f) { - return function() { - return !f.apply(this, arguments); - }; -}; diff --git a/node_modules/ramda/src/internal/_concat.js b/node_modules/ramda/src/internal/_concat.js deleted file mode 100644 index 3c0511d..0000000 --- a/node_modules/ramda/src/internal/_concat.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 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] - */ -module.exports = 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; -}; diff --git a/node_modules/ramda/src/internal/_contains.js b/node_modules/ramda/src/internal/_contains.js deleted file mode 100644 index 9478d9b..0000000 --- a/node_modules/ramda/src/internal/_contains.js +++ /dev/null @@ -1,6 +0,0 @@ -var _indexOf = require('./_indexOf'); - - -module.exports = function _contains(a, list) { - return _indexOf(list, a, 0) >= 0; -}; diff --git a/node_modules/ramda/src/internal/_containsWith.js b/node_modules/ramda/src/internal/_containsWith.js deleted file mode 100644 index 3d21830..0000000 --- a/node_modules/ramda/src/internal/_containsWith.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = function _containsWith(pred, x, list) { - var idx = 0; - var len = list.length; - - while (idx < len) { - if (pred(x, list[idx])) { - return true; - } - idx += 1; - } - return false; -}; diff --git a/node_modules/ramda/src/internal/_createPartialApplicator.js b/node_modules/ramda/src/internal/_createPartialApplicator.js deleted file mode 100644 index 60af5c4..0000000 --- a/node_modules/ramda/src/internal/_createPartialApplicator.js +++ /dev/null @@ -1,11 +0,0 @@ -var _arity = require('./_arity'); -var _curry2 = require('./_curry2'); - - -module.exports = 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)); - }); - }); -}; diff --git a/node_modules/ramda/src/internal/_curry1.js b/node_modules/ramda/src/internal/_curry1.js deleted file mode 100644 index a3bb2a9..0000000 --- a/node_modules/ramda/src/internal/_curry1.js +++ /dev/null @@ -1,20 +0,0 @@ -var _isPlaceholder = require('./_isPlaceholder'); - - -/** - * Optimized internal one-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ -module.exports = function _curry1(fn) { - return function f1(a) { - if (arguments.length === 0 || _isPlaceholder(a)) { - return f1; - } else { - return fn.apply(this, arguments); - } - }; -}; diff --git a/node_modules/ramda/src/internal/_curry2.js b/node_modules/ramda/src/internal/_curry2.js deleted file mode 100644 index a884098..0000000 --- a/node_modules/ramda/src/internal/_curry2.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry1 = require('./_curry1'); -var _isPlaceholder = require('./_isPlaceholder'); - - -/** - * Optimized internal two-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ -module.exports = 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); - } - }; -}; diff --git a/node_modules/ramda/src/internal/_curry3.js b/node_modules/ramda/src/internal/_curry3.js deleted file mode 100644 index e5994bd..0000000 --- a/node_modules/ramda/src/internal/_curry3.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry1 = require('./_curry1'); -var _curry2 = require('./_curry2'); -var _isPlaceholder = require('./_isPlaceholder'); - - -/** - * Optimized internal three-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ -module.exports = 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); - } - }; -}; diff --git a/node_modules/ramda/src/internal/_curryN.js b/node_modules/ramda/src/internal/_curryN.js deleted file mode 100644 index 80966eb..0000000 --- a/node_modules/ramda/src/internal/_curryN.js +++ /dev/null @@ -1,40 +0,0 @@ -var _arity = require('./_arity'); -var _isPlaceholder = require('./_isPlaceholder'); - - -/** - * 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. - */ -module.exports = 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)); - }; -}; diff --git a/node_modules/ramda/src/internal/_dispatchable.js b/node_modules/ramda/src/internal/_dispatchable.js deleted file mode 100644 index c65e1c8..0000000 --- a/node_modules/ramda/src/internal/_dispatchable.js +++ /dev/null @@ -1,41 +0,0 @@ -var _isArray = require('./_isArray'); -var _isTransformer = require('./_isTransformer'); - - -/** - * 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 - */ -module.exports = 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); - }; -}; diff --git a/node_modules/ramda/src/internal/_dropLast.js b/node_modules/ramda/src/internal/_dropLast.js deleted file mode 100644 index f8634f4..0000000 --- a/node_modules/ramda/src/internal/_dropLast.js +++ /dev/null @@ -1,5 +0,0 @@ -var take = require('../take'); - -module.exports = function dropLast(n, xs) { - return take(n < xs.length ? xs.length - n : 0, xs); -}; diff --git a/node_modules/ramda/src/internal/_dropLastWhile.js b/node_modules/ramda/src/internal/_dropLastWhile.js deleted file mode 100644 index 179bdf3..0000000 --- a/node_modules/ramda/src/internal/_dropLastWhile.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = function dropLastWhile(pred, list) { - var idx = list.length - 1; - while (idx >= 0 && pred(list[idx])) { - idx -= 1; - } - return Array.prototype.slice.call(list, 0, idx + 1); -}; diff --git a/node_modules/ramda/src/internal/_equals.js b/node_modules/ramda/src/internal/_equals.js deleted file mode 100644 index 040623c..0000000 --- a/node_modules/ramda/src/internal/_equals.js +++ /dev/null @@ -1,114 +0,0 @@ -var _arrayFromIterator = require('./_arrayFromIterator'); -var _functionName = require('./_functionName'); -var _has = require('./_has'); -var identical = require('../identical'); -var keys = require('../keys'); -var type = require('../type'); - - -module.exports = function _equals(a, b, stackA, stackB) { - if (identical(a, b)) { - return true; - } - - if (type(a) !== 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 (type(a)) { - 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 && identical(a.valueOf(), b.valueOf()))) { - return false; - } - break; - case 'Date': - if (!identical(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; - case 'Map': - case 'Set': - if (!_equals(_arrayFromIterator(a.entries()), _arrayFromIterator(b.entries()), stackA, stackB)) { - return false; - } - break; - case 'Int8Array': - case 'Uint8Array': - case 'Uint8ClampedArray': - case 'Int16Array': - case 'Uint16Array': - case 'Int32Array': - case 'Uint32Array': - case 'Float32Array': - case 'Float64Array': - break; - 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 idx = stackA.length - 1; - while (idx >= 0) { - if (stackA[idx] === a) { - return stackB[idx] === b; - } - idx -= 1; - } - - stackA.push(a); - stackB.push(b); - idx = keysA.length - 1; - while (idx >= 0) { - var key = keysA[idx]; - if (!(_has(key, b) && _equals(b[key], a[key], stackA, stackB))) { - return false; - } - idx -= 1; - } - stackA.pop(); - stackB.pop(); - return true; -}; diff --git a/node_modules/ramda/src/internal/_filter.js b/node_modules/ramda/src/internal/_filter.js deleted file mode 100644 index c9b7bd5..0000000 --- a/node_modules/ramda/src/internal/_filter.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = 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; -}; diff --git a/node_modules/ramda/src/internal/_flatCat.js b/node_modules/ramda/src/internal/_flatCat.js deleted file mode 100644 index 63cb474..0000000 --- a/node_modules/ramda/src/internal/_flatCat.js +++ /dev/null @@ -1,32 +0,0 @@ -var _forceReduced = require('./_forceReduced'); -var _isArrayLike = require('./_isArrayLike'); -var _reduce = require('./_reduce'); -var _xfBase = require('./_xfBase'); - -module.exports = (function() { - 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; - } - }; - }; - - return 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); - } - }; - }; -}()); diff --git a/node_modules/ramda/src/internal/_forceReduced.js b/node_modules/ramda/src/internal/_forceReduced.js deleted file mode 100644 index d20f9df..0000000 --- a/node_modules/ramda/src/internal/_forceReduced.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function _forceReduced(x) { - return { - '@@transducer/value': x, - '@@transducer/reduced': true - }; -}; diff --git a/node_modules/ramda/src/internal/_functionName.js b/node_modules/ramda/src/internal/_functionName.js deleted file mode 100644 index 2d5f2bf..0000000 --- a/node_modules/ramda/src/internal/_functionName.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = 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]; -}; diff --git a/node_modules/ramda/src/internal/_functionsWith.js b/node_modules/ramda/src/internal/_functionsWith.js deleted file mode 100644 index 7ae5b3a..0000000 --- a/node_modules/ramda/src/internal/_functionsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var _filter = require('./_filter'); - - -/** - * @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. - */ -module.exports = function _functionsWith(fn) { - return function(obj) { - return _filter(function(key) { return typeof obj[key] === 'function'; }, fn(obj)); - }; -}; diff --git a/node_modules/ramda/src/internal/_has.js b/node_modules/ramda/src/internal/_has.js deleted file mode 100644 index 60d0c82..0000000 --- a/node_modules/ramda/src/internal/_has.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function _has(prop, obj) { - return Object.prototype.hasOwnProperty.call(obj, prop); -}; diff --git a/node_modules/ramda/src/internal/_identity.js b/node_modules/ramda/src/internal/_identity.js deleted file mode 100644 index 6bb23f4..0000000 --- a/node_modules/ramda/src/internal/_identity.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function _identity(x) { return x; }; diff --git a/node_modules/ramda/src/internal/_indexOf.js b/node_modules/ramda/src/internal/_indexOf.js deleted file mode 100644 index c1e9274..0000000 --- a/node_modules/ramda/src/internal/_indexOf.js +++ /dev/null @@ -1,57 +0,0 @@ -var equals = require('../equals'); - - -module.exports = 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; -}; diff --git a/node_modules/ramda/src/internal/_isArguments.js b/node_modules/ramda/src/internal/_isArguments.js deleted file mode 100644 index eb52bb6..0000000 --- a/node_modules/ramda/src/internal/_isArguments.js +++ /dev/null @@ -1,9 +0,0 @@ -var _has = require('./_has'); - - -module.exports = (function() { - var toString = Object.prototype.toString; - return toString.call(arguments) === '[object Arguments]' ? - function _isArguments(x) { return toString.call(x) === '[object Arguments]'; } : - function _isArguments(x) { return _has('callee', x); }; -}()); diff --git a/node_modules/ramda/src/internal/_isArray.js b/node_modules/ramda/src/internal/_isArray.js deleted file mode 100644 index e8f0bb9..0000000 --- a/node_modules/ramda/src/internal/_isArray.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * 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 - */ -module.exports = Array.isArray || function _isArray(val) { - return (val != null && - val.length >= 0 && - Object.prototype.toString.call(val) === '[object Array]'); -}; diff --git a/node_modules/ramda/src/internal/_isArrayLike.js b/node_modules/ramda/src/internal/_isArrayLike.js deleted file mode 100644 index be504fa..0000000 --- a/node_modules/ramda/src/internal/_isArrayLike.js +++ /dev/null @@ -1,34 +0,0 @@ -var _curry1 = require('./_curry1'); -var _isArray = require('./_isArray'); -var _isString = require('./_isString'); - - -/** - * 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 - */ -module.exports = _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; -}); diff --git a/node_modules/ramda/src/internal/_isFunction.js b/node_modules/ramda/src/internal/_isFunction.js deleted file mode 100644 index 4196d89..0000000 --- a/node_modules/ramda/src/internal/_isFunction.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function _isFunction(x) { - return Object.prototype.toString.call(x) === '[object Function]'; -}; diff --git a/node_modules/ramda/src/internal/_isInteger.js b/node_modules/ramda/src/internal/_isInteger.js deleted file mode 100644 index 2d08103..0000000 --- a/node_modules/ramda/src/internal/_isInteger.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Determine if the passed argument is an integer. - * - * @private - * @param {*} n - * @category Type - * @return {Boolean} - */ -module.exports = Number.isInteger || function _isInteger(n) { - return (n << 0) === n; -}; diff --git a/node_modules/ramda/src/internal/_isNumber.js b/node_modules/ramda/src/internal/_isNumber.js deleted file mode 100644 index f1b5a11..0000000 --- a/node_modules/ramda/src/internal/_isNumber.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function _isNumber(x) { - return Object.prototype.toString.call(x) === '[object Number]'; -}; diff --git a/node_modules/ramda/src/internal/_isObject.js b/node_modules/ramda/src/internal/_isObject.js deleted file mode 100644 index 28f9ca3..0000000 --- a/node_modules/ramda/src/internal/_isObject.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function _isObject(x) { - return Object.prototype.toString.call(x) === '[object Object]'; -}; diff --git a/node_modules/ramda/src/internal/_isPlaceholder.js b/node_modules/ramda/src/internal/_isPlaceholder.js deleted file mode 100644 index d473d9d..0000000 --- a/node_modules/ramda/src/internal/_isPlaceholder.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function _isPlaceholder(a) { - return a != null && - typeof a === 'object' && - a['@@functional/placeholder'] === true; -}; diff --git a/node_modules/ramda/src/internal/_isRegExp.js b/node_modules/ramda/src/internal/_isRegExp.js deleted file mode 100644 index 05b68b6..0000000 --- a/node_modules/ramda/src/internal/_isRegExp.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function _isRegExp(x) { - return Object.prototype.toString.call(x) === '[object RegExp]'; -}; diff --git a/node_modules/ramda/src/internal/_isString.js b/node_modules/ramda/src/internal/_isString.js deleted file mode 100644 index 2c9fd08..0000000 --- a/node_modules/ramda/src/internal/_isString.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function _isString(x) { - return Object.prototype.toString.call(x) === '[object String]'; -}; diff --git a/node_modules/ramda/src/internal/_isTransformer.js b/node_modules/ramda/src/internal/_isTransformer.js deleted file mode 100644 index 9e21fcc..0000000 --- a/node_modules/ramda/src/internal/_isTransformer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function _isTransformer(obj) { - return typeof obj['@@transducer/step'] === 'function'; -}; diff --git a/node_modules/ramda/src/internal/_makeFlat.js b/node_modules/ramda/src/internal/_makeFlat.js deleted file mode 100644 index ebaa7a5..0000000 --- a/node_modules/ramda/src/internal/_makeFlat.js +++ /dev/null @@ -1,33 +0,0 @@ -var _isArrayLike = require('./_isArrayLike'); - - -/** - * `_makeFlat` is a helper function that returns a one-level or fully recursive - * function based on the flag passed in. - * - * @private - */ -module.exports = 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; - }; -}; diff --git a/node_modules/ramda/src/internal/_map.js b/node_modules/ramda/src/internal/_map.js deleted file mode 100644 index 2b22f91..0000000 --- a/node_modules/ramda/src/internal/_map.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = 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; -}; diff --git a/node_modules/ramda/src/internal/_objectAssign.js b/node_modules/ramda/src/internal/_objectAssign.js deleted file mode 100644 index 17b223f..0000000 --- a/node_modules/ramda/src/internal/_objectAssign.js +++ /dev/null @@ -1,24 +0,0 @@ -var _has = require('./_has'); - -// Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign -module.exports = 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; -}; diff --git a/node_modules/ramda/src/internal/_of.js b/node_modules/ramda/src/internal/_of.js deleted file mode 100644 index 073116d..0000000 --- a/node_modules/ramda/src/internal/_of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function _of(x) { return [x]; }; diff --git a/node_modules/ramda/src/internal/_pipe.js b/node_modules/ramda/src/internal/_pipe.js deleted file mode 100644 index 3cb2a69..0000000 --- a/node_modules/ramda/src/internal/_pipe.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function _pipe(f, g) { - return function() { - return g.call(this, f.apply(this, arguments)); - }; -}; diff --git a/node_modules/ramda/src/internal/_pipeP.js b/node_modules/ramda/src/internal/_pipeP.js deleted file mode 100644 index ddfd690..0000000 --- a/node_modules/ramda/src/internal/_pipeP.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function _pipeP(f, g) { - return function() { - var ctx = this; - return f.apply(ctx, arguments).then(function(x) { - return g.call(ctx, x); - }); - }; -}; diff --git a/node_modules/ramda/src/internal/_quote.js b/node_modules/ramda/src/internal/_quote.js deleted file mode 100644 index fe93fe7..0000000 --- a/node_modules/ramda/src/internal/_quote.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = 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, '\\"') + '"'; -}; diff --git a/node_modules/ramda/src/internal/_reduce.js b/node_modules/ramda/src/internal/_reduce.js deleted file mode 100644 index a7461ad..0000000 --- a/node_modules/ramda/src/internal/_reduce.js +++ /dev/null @@ -1,61 +0,0 @@ -var _isArrayLike = require('./_isArrayLike'); -var _xwrap = require('./_xwrap'); -var bind = require('../bind'); - - -module.exports = (function() { - 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'; - return 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'); - }; -}()); diff --git a/node_modules/ramda/src/internal/_reduced.js b/node_modules/ramda/src/internal/_reduced.js deleted file mode 100644 index a82bc0e..0000000 --- a/node_modules/ramda/src/internal/_reduced.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = function _reduced(x) { - return x && x['@@transducer/reduced'] ? x : - { - '@@transducer/value': x, - '@@transducer/reduced': true - }; -}; diff --git a/node_modules/ramda/src/internal/_stepCat.js b/node_modules/ramda/src/internal/_stepCat.js deleted file mode 100644 index 8a8da9c..0000000 --- a/node_modules/ramda/src/internal/_stepCat.js +++ /dev/null @@ -1,48 +0,0 @@ -var _assign = require('./_assign'); -var _identity = require('./_identity'); -var _isArrayLike = require('./_isArrayLike'); -var _isTransformer = require('./_isTransformer'); -var objOf = require('../objOf'); - - -module.exports = (function() { - 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 _assign( - result, - _isArrayLike(input) ? objOf(input[0], input[1]) : input - ); - }, - '@@transducer/result': _identity - }; - - return 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); - }; -}()); diff --git a/node_modules/ramda/src/internal/_toISOString.js b/node_modules/ramda/src/internal/_toISOString.js deleted file mode 100644 index 25126a1..0000000 --- a/node_modules/ramda/src/internal/_toISOString.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Polyfill from . - */ -module.exports = (function() { - var pad = function pad(n) { return (n < 10 ? '0' : '') + n; }; - - return 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' - ); - }; -}()); diff --git a/node_modules/ramda/src/internal/_toString.js b/node_modules/ramda/src/internal/_toString.js deleted file mode 100644 index 3ec22c8..0000000 --- a/node_modules/ramda/src/internal/_toString.js +++ /dev/null @@ -1,46 +0,0 @@ -var _contains = require('./_contains'); -var _map = require('./_map'); -var _quote = require('./_quote'); -var _toISOString = require('./_toISOString'); -var keys = require('../keys'); -var reject = require('../reject'); - - -module.exports = function _toString(x, seen) { - var recur = function recur(y) { - var xs = seen.concat([x]); - return _contains(y, xs) ? '' : _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(', ') + '}'; - } -}; diff --git a/node_modules/ramda/src/internal/_xall.js b/node_modules/ramda/src/internal/_xall.js deleted file mode 100644 index ab827de..0000000 --- a/node_modules/ramda/src/internal/_xall.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry2 = require('./_curry2'); -var _reduced = require('./_reduced'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xall(f, xf) { return new XAll(f, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xany.js b/node_modules/ramda/src/internal/_xany.js deleted file mode 100644 index 9471187..0000000 --- a/node_modules/ramda/src/internal/_xany.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry2 = require('./_curry2'); -var _reduced = require('./_reduced'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xany(f, xf) { return new XAny(f, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xaperture.js b/node_modules/ramda/src/internal/_xaperture.js deleted file mode 100644 index 32f1560..0000000 --- a/node_modules/ramda/src/internal/_xaperture.js +++ /dev/null @@ -1,36 +0,0 @@ -var _concat = require('./_concat'); -var _curry2 = require('./_curry2'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xaperture(n, xf) { return new XAperture(n, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xchain.js b/node_modules/ramda/src/internal/_xchain.js deleted file mode 100644 index e2f21b5..0000000 --- a/node_modules/ramda/src/internal/_xchain.js +++ /dev/null @@ -1,8 +0,0 @@ -var _curry2 = require('./_curry2'); -var _flatCat = require('./_flatCat'); -var map = require('../map'); - - -module.exports = _curry2(function _xchain(f, xf) { - return map(f, _flatCat(xf)); -}); diff --git a/node_modules/ramda/src/internal/_xdrop.js b/node_modules/ramda/src/internal/_xdrop.js deleted file mode 100644 index 8dad359..0000000 --- a/node_modules/ramda/src/internal/_xdrop.js +++ /dev/null @@ -1,21 +0,0 @@ -var _curry2 = require('./_curry2'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xdrop(n, xf) { return new XDrop(n, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xdropLast.js b/node_modules/ramda/src/internal/_xdropLast.js deleted file mode 100644 index cee40ed..0000000 --- a/node_modules/ramda/src/internal/_xdropLast.js +++ /dev/null @@ -1,34 +0,0 @@ -var _curry2 = require('./_curry2'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xdropLast(n, xf) { return new XDropLast(n, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xdropLastWhile.js b/node_modules/ramda/src/internal/_xdropLastWhile.js deleted file mode 100644 index 7cf0890..0000000 --- a/node_modules/ramda/src/internal/_xdropLastWhile.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry2 = require('./_curry2'); -var _reduce = require('./_reduce'); -var _xfBase = require('./_xfBase'); - -module.exports = (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 _curry2(function _xdropLastWhile(fn, xf) { return new XDropLastWhile(fn, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xdropRepeatsWith.js b/node_modules/ramda/src/internal/_xdropRepeatsWith.js deleted file mode 100644 index 58240c1..0000000 --- a/node_modules/ramda/src/internal/_xdropRepeatsWith.js +++ /dev/null @@ -1,27 +0,0 @@ -var _curry2 = require('./_curry2'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xdropRepeatsWith(pred, xf) { return new XDropRepeatsWith(pred, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xdropWhile.js b/node_modules/ramda/src/internal/_xdropWhile.js deleted file mode 100644 index 529a973..0000000 --- a/node_modules/ramda/src/internal/_xdropWhile.js +++ /dev/null @@ -1,23 +0,0 @@ -var _curry2 = require('./_curry2'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xdropWhile(f, xf) { return new XDropWhile(f, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xfBase.js b/node_modules/ramda/src/internal/_xfBase.js deleted file mode 100644 index 0f84131..0000000 --- a/node_modules/ramda/src/internal/_xfBase.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - init: function() { - return this.xf['@@transducer/init'](); - }, - result: function(result) { - return this.xf['@@transducer/result'](result); - } -}; diff --git a/node_modules/ramda/src/internal/_xfilter.js b/node_modules/ramda/src/internal/_xfilter.js deleted file mode 100644 index ed04700..0000000 --- a/node_modules/ramda/src/internal/_xfilter.js +++ /dev/null @@ -1,17 +0,0 @@ -var _curry2 = require('./_curry2'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xfilter(f, xf) { return new XFilter(f, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xfind.js b/node_modules/ramda/src/internal/_xfind.js deleted file mode 100644 index d14850e..0000000 --- a/node_modules/ramda/src/internal/_xfind.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry2 = require('./_curry2'); -var _reduced = require('./_reduced'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xfind(f, xf) { return new XFind(f, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xfindIndex.js b/node_modules/ramda/src/internal/_xfindIndex.js deleted file mode 100644 index 3c204e5..0000000 --- a/node_modules/ramda/src/internal/_xfindIndex.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry2 = require('./_curry2'); -var _reduced = require('./_reduced'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xfindIndex(f, xf) { return new XFindIndex(f, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xfindLast.js b/node_modules/ramda/src/internal/_xfindLast.js deleted file mode 100644 index 5ab31c1..0000000 --- a/node_modules/ramda/src/internal/_xfindLast.js +++ /dev/null @@ -1,22 +0,0 @@ -var _curry2 = require('./_curry2'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xfindLast(f, xf) { return new XFindLast(f, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xfindLastIndex.js b/node_modules/ramda/src/internal/_xfindLastIndex.js deleted file mode 100644 index a1e10ae..0000000 --- a/node_modules/ramda/src/internal/_xfindLastIndex.js +++ /dev/null @@ -1,25 +0,0 @@ -var _curry2 = require('./_curry2'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xfindLastIndex(f, xf) { return new XFindLastIndex(f, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xmap.js b/node_modules/ramda/src/internal/_xmap.js deleted file mode 100644 index 3d276a6..0000000 --- a/node_modules/ramda/src/internal/_xmap.js +++ /dev/null @@ -1,17 +0,0 @@ -var _curry2 = require('./_curry2'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xmap(f, xf) { return new XMap(f, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xreduceBy.js b/node_modules/ramda/src/internal/_xreduceBy.js deleted file mode 100644 index 667ded4..0000000 --- a/node_modules/ramda/src/internal/_xreduceBy.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curryN = require('./_curryN'); -var _has = require('./_has'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curryN(4, [], - function _xreduceBy(valueFn, valueAcc, keyFn, xf) { - return new XReduceBy(valueFn, valueAcc, keyFn, xf); - }); -}()); diff --git a/node_modules/ramda/src/internal/_xtake.js b/node_modules/ramda/src/internal/_xtake.js deleted file mode 100644 index 1d59117..0000000 --- a/node_modules/ramda/src/internal/_xtake.js +++ /dev/null @@ -1,20 +0,0 @@ -var _curry2 = require('./_curry2'); -var _reduced = require('./_reduced'); -var _xfBase = require('./_xfBase'); - -module.exports = (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 _curry2(function _xtake(n, xf) { return new XTake(n, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xtakeWhile.js b/node_modules/ramda/src/internal/_xtakeWhile.js deleted file mode 100644 index 7e1b513..0000000 --- a/node_modules/ramda/src/internal/_xtakeWhile.js +++ /dev/null @@ -1,18 +0,0 @@ -var _curry2 = require('./_curry2'); -var _reduced = require('./_reduced'); -var _xfBase = require('./_xfBase'); - - -module.exports = (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 _curry2(function _xtakeWhile(f, xf) { return new XTakeWhile(f, xf); }); -}()); diff --git a/node_modules/ramda/src/internal/_xwrap.js b/node_modules/ramda/src/internal/_xwrap.js deleted file mode 100644 index c96f9ec..0000000 --- a/node_modules/ramda/src/internal/_xwrap.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = (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 function _xwrap(fn) { return new XWrap(fn); }; -}()); diff --git a/node_modules/ramda/src/intersection.js b/node_modules/ramda/src/intersection.js deleted file mode 100644 index a4703e3..0000000 --- a/node_modules/ramda/src/intersection.js +++ /dev/null @@ -1,35 +0,0 @@ -var _contains = require('./internal/_contains'); -var _curry2 = require('./internal/_curry2'); -var _filter = require('./internal/_filter'); -var flip = require('./flip'); -var uniq = require('./uniq'); - - -/** - * Combines two lists into a set (i.e. no duplicates) composed of those - * elements common to both lists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The list of elements found in both `list1` and `list2`. - * @see R.innerJoin - * @example - * - * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3] - */ -module.exports = _curry2(function intersection(list1, list2) { - var lookupList, filteredList; - if (list1.length > list2.length) { - lookupList = list1; - filteredList = list2; - } else { - lookupList = list2; - filteredList = list1; - } - return uniq(_filter(flip(_contains)(lookupList), filteredList)); -}); diff --git a/node_modules/ramda/src/intersectionWith.js b/node_modules/ramda/src/intersectionWith.js deleted file mode 100644 index 686a5bc..0000000 --- a/node_modules/ramda/src/intersectionWith.js +++ /dev/null @@ -1,60 +0,0 @@ -var _containsWith = require('./internal/_containsWith'); -var _curry3 = require('./internal/_curry3'); -var uniqWith = require('./uniqWith'); - - -/** - * Combines two lists into a set (i.e. no duplicates) composed of those - * elements common to both lists. Duplication is determined according to the - * value returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate function that determines whether - * the two supplied elements are equal. - * @param {Array} list1 One list of items to compare - * @param {Array} list2 A second list of items to compare - * @return {Array} A new list containing those elements common to both lists. - * @see R.innerJoin - * @deprecated since v0.24.0 - * @example - * - * var buffaloSpringfield = [ - * {id: 824, name: 'Richie Furay'}, - * {id: 956, name: 'Dewey Martin'}, - * {id: 313, name: 'Bruce Palmer'}, - * {id: 456, name: 'Stephen Stills'}, - * {id: 177, name: 'Neil Young'} - * ]; - * var csny = [ - * {id: 204, name: 'David Crosby'}, - * {id: 456, name: 'Stephen Stills'}, - * {id: 539, name: 'Graham Nash'}, - * {id: 177, name: 'Neil Young'} - * ]; - * - * R.intersectionWith(R.eqBy(R.prop('id')), buffaloSpringfield, csny); - * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] - */ -module.exports = _curry3(function intersectionWith(pred, list1, list2) { - var lookupList, filteredList; - if (list1.length > list2.length) { - lookupList = list1; - filteredList = list2; - } else { - lookupList = list2; - filteredList = list1; - } - var results = []; - var idx = 0; - while (idx < filteredList.length) { - if (_containsWith(pred, filteredList[idx], lookupList)) { - results[results.length] = filteredList[idx]; - } - idx += 1; - } - return uniqWith(pred, results); -}); diff --git a/node_modules/ramda/src/intersperse.js b/node_modules/ramda/src/intersperse.js deleted file mode 100644 index 7df5dfb..0000000 --- a/node_modules/ramda/src/intersperse.js +++ /dev/null @@ -1,35 +0,0 @@ -var _checkForMethod = require('./internal/_checkForMethod'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Creates a new list with the separator interposed between elements. - * - * Dispatches to the `intersperse` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} separator The element to add to the list. - * @param {Array} list The list to be interposed. - * @return {Array} The new list. - * @example - * - * R.intersperse('n', ['ba', 'a', 'a']); //=> ['ba', 'n', 'a', 'n', 'a'] - */ -module.exports = _curry2(_checkForMethod('intersperse', function intersperse(separator, list) { - var out = []; - var idx = 0; - var length = list.length; - while (idx < length) { - if (idx === length - 1) { - out.push(list[idx]); - } else { - out.push(list[idx], separator); - } - idx += 1; - } - return out; -})); diff --git a/node_modules/ramda/src/into.js b/node_modules/ramda/src/into.js deleted file mode 100644 index 3c7cec5..0000000 --- a/node_modules/ramda/src/into.js +++ /dev/null @@ -1,50 +0,0 @@ -var _clone = require('./internal/_clone'); -var _curry3 = require('./internal/_curry3'); -var _isTransformer = require('./internal/_isTransformer'); -var _reduce = require('./internal/_reduce'); -var _stepCat = require('./internal/_stepCat'); - - -/** - * Transforms the items of the list with the transducer and appends the - * transformed items to the accumulator using an appropriate iterator function - * based on the accumulator type. - * - * The accumulator can be an array, string, object or a transformer. Iterated - * items will be appended to arrays and concatenated to strings. Objects will - * be merged directly or 2-item arrays will be merged as key, value pairs. - * - * The accumulator can also be a transformer object that provides a 2-arity - * reducing iterator function, step, 0-arity initial value function, init, and - * 1-arity result extraction function result. The step function is used as the - * iterator function in reduce. The result function is used to convert the - * final accumulator into the return type and in most cases is R.identity. The - * init function is used to provide the initial accumulator. - * - * The iteration is performed with [`R.reduce`](#reduce) after initializing the - * transducer. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig a -> (b -> b) -> [c] -> a - * @param {*} acc The initial accumulator value. - * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @example - * - * var numbers = [1, 2, 3, 4]; - * var transducer = R.compose(R.map(R.add(1)), R.take(2)); - * - * R.into([], transducer, numbers); //=> [2, 3] - * - * var intoArray = R.into([]); - * intoArray(transducer, numbers); //=> [2, 3] - */ -module.exports = _curry3(function into(acc, xf, list) { - return _isTransformer(acc) ? - _reduce(xf(acc), acc['@@transducer/init'](), list) : - _reduce(xf(_stepCat(acc)), _clone(acc, [], [], false), list); -}); diff --git a/node_modules/ramda/src/invert.js b/node_modules/ramda/src/invert.js deleted file mode 100644 index 1e8cc92..0000000 --- a/node_modules/ramda/src/invert.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _has = require('./internal/_has'); -var keys = require('./keys'); - - -/** - * Same as [`R.invertObj`](#invertObj), however this accounts for objects with - * duplicate values by putting the values into an array. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {s: x} -> {x: [ s, ... ]} - * @param {Object} obj The object or array to invert - * @return {Object} out A new object with keys in an array. - * @see R.invertObj - * @example - * - * var raceResultsByFirstName = { - * first: 'alice', - * second: 'jake', - * third: 'alice', - * }; - * R.invert(raceResultsByFirstName); - * //=> { 'alice': ['first', 'third'], 'jake':['second'] } - */ -module.exports = _curry1(function invert(obj) { - var props = keys(obj); - var len = props.length; - var idx = 0; - var out = {}; - - while (idx < len) { - var key = props[idx]; - var val = obj[key]; - var list = _has(val, out) ? out[val] : (out[val] = []); - list[list.length] = key; - idx += 1; - } - return out; -}); diff --git a/node_modules/ramda/src/invertObj.js b/node_modules/ramda/src/invertObj.js deleted file mode 100644 index 24a63bd..0000000 --- a/node_modules/ramda/src/invertObj.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var keys = require('./keys'); - - -/** - * Returns a new object with the keys of the given object as values, and the - * values of the given object, which are coerced to strings, as keys. Note - * that the last key found is preferred when handling the same value. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {s: x} -> {x: s} - * @param {Object} obj The object or array to invert - * @return {Object} out A new object - * @see R.invert - * @example - * - * var raceResults = { - * first: 'alice', - * second: 'jake' - * }; - * R.invertObj(raceResults); - * //=> { 'alice': 'first', 'jake':'second' } - * - * // Alternatively: - * var raceResults = ['alice', 'jake']; - * R.invertObj(raceResults); - * //=> { 'alice': '0', 'jake':'1' } - */ -module.exports = _curry1(function invertObj(obj) { - var props = keys(obj); - var len = props.length; - var idx = 0; - var out = {}; - - while (idx < len) { - var key = props[idx]; - out[obj[key]] = key; - idx += 1; - } - return out; -}); diff --git a/node_modules/ramda/src/invoker.js b/node_modules/ramda/src/invoker.js deleted file mode 100644 index 829d655..0000000 --- a/node_modules/ramda/src/invoker.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _isFunction = require('./internal/_isFunction'); -var curryN = require('./curryN'); -var toString = require('./toString'); - - -/** - * Turns a named method with a specified arity into a function that can be - * called directly supplied with arguments and a target object. - * - * The returned function is curried and accepts `arity + 1` parameters where - * the final parameter is the target object. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *) - * @param {Number} arity Number of arguments the returned function should take - * before the target object. - * @param {String} method Name of the method to call. - * @return {Function} A new curried function. - * @see R.construct - * @example - * - * var sliceFrom = R.invoker(1, 'slice'); - * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm' - * var sliceFrom6 = R.invoker(2, 'slice')(6); - * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh' - * @symb R.invoker(0, 'method')(o) = o['method']() - * @symb R.invoker(1, 'method')(a, o) = o['method'](a) - * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b) - */ -module.exports = _curry2(function invoker(arity, method) { - return curryN(arity + 1, function() { - var target = arguments[arity]; - if (target != null && _isFunction(target[method])) { - return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity)); - } - throw new TypeError(toString(target) + ' does not have a method named "' + method + '"'); - }); -}); diff --git a/node_modules/ramda/src/is.js b/node_modules/ramda/src/is.js deleted file mode 100644 index 0d9748f..0000000 --- a/node_modules/ramda/src/is.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * See if an object (`val`) is an instance of the supplied constructor. This - * function will check up the inheritance chain, if any. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Type - * @sig (* -> {*}) -> a -> Boolean - * @param {Object} ctor A constructor - * @param {*} val The value to test - * @return {Boolean} - * @example - * - * R.is(Object, {}); //=> true - * R.is(Number, 1); //=> true - * R.is(Object, 1); //=> false - * R.is(String, 's'); //=> true - * R.is(String, new String('')); //=> true - * R.is(Object, new String('')); //=> true - * R.is(Object, 's'); //=> false - * R.is(Number, {}); //=> false - */ -module.exports = _curry2(function is(Ctor, val) { - return val != null && val.constructor === Ctor || val instanceof Ctor; -}); diff --git a/node_modules/ramda/src/isEmpty.js b/node_modules/ramda/src/isEmpty.js deleted file mode 100644 index 27fc832..0000000 --- a/node_modules/ramda/src/isEmpty.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var empty = require('./empty'); -var equals = require('./equals'); - - -/** - * Returns `true` if the given value is its type's empty value; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> Boolean - * @param {*} x - * @return {Boolean} - * @see R.empty - * @example - * - * R.isEmpty([1, 2, 3]); //=> false - * R.isEmpty([]); //=> true - * R.isEmpty(''); //=> true - * R.isEmpty(null); //=> false - * R.isEmpty({}); //=> true - * R.isEmpty({length: 0}); //=> false - */ -module.exports = _curry1(function isEmpty(x) { - return x != null && equals(x, empty(x)); -}); diff --git a/node_modules/ramda/src/isNil.js b/node_modules/ramda/src/isNil.js deleted file mode 100644 index 1ce59a5..0000000 --- a/node_modules/ramda/src/isNil.js +++ /dev/null @@ -1,21 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Checks if the input value is `null` or `undefined`. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Type - * @sig * -> Boolean - * @param {*} x The value to test. - * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`. - * @example - * - * R.isNil(null); //=> true - * R.isNil(undefined); //=> true - * R.isNil(0); //=> false - * R.isNil([]); //=> false - */ -module.exports = _curry1(function isNil(x) { return x == null; }); diff --git a/node_modules/ramda/src/join.js b/node_modules/ramda/src/join.js deleted file mode 100644 index 2d4dce5..0000000 --- a/node_modules/ramda/src/join.js +++ /dev/null @@ -1,23 +0,0 @@ -var invoker = require('./invoker'); - - -/** - * Returns a string made by inserting the `separator` between each element and - * concatenating all the elements into a single string. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig String -> [a] -> String - * @param {Number|String} separator The string used to separate the elements. - * @param {Array} xs The elements to join into a string. - * @return {String} str The string made by concatenating `xs` with `separator`. - * @see R.split - * @example - * - * var spacer = R.join(' '); - * spacer(['a', 2, 3.4]); //=> 'a 2 3.4' - * R.join('|', [1, 2, 3]); //=> '1|2|3' - */ -module.exports = invoker(1, 'join'); diff --git a/node_modules/ramda/src/juxt.js b/node_modules/ramda/src/juxt.js deleted file mode 100644 index f11e049..0000000 --- a/node_modules/ramda/src/juxt.js +++ /dev/null @@ -1,24 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var converge = require('./converge'); - - -/** - * juxt applies a list of functions to a list of values. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Function - * @sig [(a, b, ..., m) -> n] -> ((a, b, ..., m) -> [n]) - * @param {Array} fns An array of functions - * @return {Function} A function that returns a list of values after applying each of the original `fns` to its parameters. - * @see R.applySpec - * @example - * - * var getRange = R.juxt([Math.min, Math.max]); - * getRange(3, 4, 9, -3); //=> [-3, 9] - * @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)] - */ -module.exports = _curry1(function juxt(fns) { - return converge(function() { return Array.prototype.slice.call(arguments, 0); }, fns); -}); diff --git a/node_modules/ramda/src/keys.js b/node_modules/ramda/src/keys.js deleted file mode 100644 index 55b0393..0000000 --- a/node_modules/ramda/src/keys.js +++ /dev/null @@ -1,74 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _has = require('./internal/_has'); -var _isArguments = require('./internal/_isArguments'); - - -/** - * Returns a list containing the names of all the enumerable own properties of - * the supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own properties. - * @see R.keysIn, R.values - * @example - * - * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] - */ -module.exports = (function() { - // cover IE < 9 keys issues - var hasEnumBug = !({toString: null}).propertyIsEnumerable('toString'); - var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', - 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; - // Safari bug - var hasArgsEnumBug = (function() { - 'use strict'; - return arguments.propertyIsEnumerable('length'); - }()); - - var contains = function contains(list, item) { - var idx = 0; - while (idx < list.length) { - if (list[idx] === item) { - return true; - } - idx += 1; - } - return false; - }; - - return typeof Object.keys === 'function' && !hasArgsEnumBug ? - _curry1(function keys(obj) { - return Object(obj) !== obj ? [] : Object.keys(obj); - }) : - _curry1(function keys(obj) { - if (Object(obj) !== obj) { - return []; - } - var prop, nIdx; - var ks = []; - var checkArgsLength = hasArgsEnumBug && _isArguments(obj); - for (prop in obj) { - if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) { - ks[ks.length] = prop; - } - } - if (hasEnumBug) { - nIdx = nonEnumerableProps.length - 1; - while (nIdx >= 0) { - prop = nonEnumerableProps[nIdx]; - if (_has(prop, obj) && !contains(ks, prop)) { - ks[ks.length] = prop; - } - nIdx -= 1; - } - } - return ks; - }); -}()); diff --git a/node_modules/ramda/src/keysIn.js b/node_modules/ramda/src/keysIn.js deleted file mode 100644 index 5e56b39..0000000 --- a/node_modules/ramda/src/keysIn.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Returns a list containing the names of all the properties of the supplied - * object, including prototype properties. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own and prototype properties. - * @see R.keys, R.valuesIn - * @example - * - * var F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * var f = new F(); - * R.keysIn(f); //=> ['x', 'y'] - */ -module.exports = _curry1(function keysIn(obj) { - var prop; - var ks = []; - for (prop in obj) { - ks[ks.length] = prop; - } - return ks; -}); diff --git a/node_modules/ramda/src/last.js b/node_modules/ramda/src/last.js deleted file mode 100644 index d30d857..0000000 --- a/node_modules/ramda/src/last.js +++ /dev/null @@ -1,24 +0,0 @@ -var nth = require('./nth'); - - -/** - * Returns the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig [a] -> a | Undefined - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.init, R.head, R.tail - * @example - * - * R.last(['fi', 'fo', 'fum']); //=> 'fum' - * R.last([]); //=> undefined - * - * R.last('abc'); //=> 'c' - * R.last(''); //=> '' - */ -module.exports = nth(-1); diff --git a/node_modules/ramda/src/lastIndexOf.js b/node_modules/ramda/src/lastIndexOf.js deleted file mode 100644 index 5ca86e0..0000000 --- a/node_modules/ramda/src/lastIndexOf.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _isArray = require('./internal/_isArray'); -var equals = require('./equals'); - - -/** - * Returns the position of the last occurrence of an item in an array, or -1 if - * the item is not included in the array. [`R.equals`](#equals) is used to - * determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Number - * @param {*} target The item to find. - * @param {Array} xs The array to search in. - * @return {Number} the index of the target, or -1 if the target is not found. - * @see R.indexOf - * @example - * - * R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6 - * R.lastIndexOf(10, [1,2,3,4]); //=> -1 - */ -module.exports = _curry2(function lastIndexOf(target, xs) { - if (typeof xs.lastIndexOf === 'function' && !_isArray(xs)) { - return xs.lastIndexOf(target); - } else { - var idx = xs.length - 1; - while (idx >= 0) { - if (equals(xs[idx], target)) { - return idx; - } - idx -= 1; - } - return -1; - } -}); diff --git a/node_modules/ramda/src/length.js b/node_modules/ramda/src/length.js deleted file mode 100644 index e5ef7e5..0000000 --- a/node_modules/ramda/src/length.js +++ /dev/null @@ -1,22 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _isNumber = require('./internal/_isNumber'); - - -/** - * Returns the number of elements in the array by returning `list.length`. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [a] -> Number - * @param {Array} list The array to inspect. - * @return {Number} The length of the array. - * @example - * - * R.length([]); //=> 0 - * R.length([1, 2, 3]); //=> 3 - */ -module.exports = _curry1(function length(list) { - return list != null && _isNumber(list.length) ? list.length : NaN; -}); diff --git a/node_modules/ramda/src/lens.js b/node_modules/ramda/src/lens.js deleted file mode 100644 index 4995981..0000000 --- a/node_modules/ramda/src/lens.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var map = require('./map'); - - -/** - * Returns a lens for the given getter and setter functions. The getter "gets" - * the value of the focus; the setter "sets" the value of the focus. The setter - * should not mutate the data structure. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig (s -> a) -> ((a, s) -> s) -> Lens s a - * @param {Function} getter - * @param {Function} setter - * @return {Lens} - * @see R.view, R.set, R.over, R.lensIndex, R.lensProp - * @example - * - * var xLens = R.lens(R.prop('x'), R.assoc('x')); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} - */ -module.exports = _curry2(function lens(getter, setter) { - return function(toFunctorFn) { - return function(target) { - return map( - function(focus) { - return setter(focus, target); - }, - toFunctorFn(getter(target)) - ); - }; - }; -}); diff --git a/node_modules/ramda/src/lensIndex.js b/node_modules/ramda/src/lensIndex.js deleted file mode 100644 index 9f412e1..0000000 --- a/node_modules/ramda/src/lensIndex.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var lens = require('./lens'); -var nth = require('./nth'); -var update = require('./update'); - - -/** - * Returns a lens whose focus is the specified index. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Number -> Lens s a - * @param {Number} n - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * var headLens = R.lensIndex(0); - * - * R.view(headLens, ['a', 'b', 'c']); //=> 'a' - * R.set(headLens, 'x', ['a', 'b', 'c']); //=> ['x', 'b', 'c'] - * R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c'] - */ -module.exports = _curry1(function lensIndex(n) { - return lens(nth(n), update(n)); -}); diff --git a/node_modules/ramda/src/lensPath.js b/node_modules/ramda/src/lensPath.js deleted file mode 100644 index 013e1e3..0000000 --- a/node_modules/ramda/src/lensPath.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var assocPath = require('./assocPath'); -var lens = require('./lens'); -var path = require('./path'); - - -/** - * Returns a lens whose focus is the specified path. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @typedefn Idx = String | Int - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig [Idx] -> Lens s a - * @param {Array} path The path to use. - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * var xHeadYLens = R.lensPath(['x', 0, 'y']); - * - * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> 2 - * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} - * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} - */ -module.exports = _curry1(function lensPath(p) { - return lens(path(p), assocPath(p)); -}); diff --git a/node_modules/ramda/src/lensProp.js b/node_modules/ramda/src/lensProp.js deleted file mode 100644 index 4b854ac..0000000 --- a/node_modules/ramda/src/lensProp.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var assoc = require('./assoc'); -var lens = require('./lens'); -var prop = require('./prop'); - - -/** - * Returns a lens whose focus is the specified property. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig String -> Lens s a - * @param {String} k - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * var xLens = R.lensProp('x'); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} - */ -module.exports = _curry1(function lensProp(k) { - return lens(prop(k), assoc(k)); -}); diff --git a/node_modules/ramda/src/lift.js b/node_modules/ramda/src/lift.js deleted file mode 100644 index 9b372aa..0000000 --- a/node_modules/ramda/src/lift.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var liftN = require('./liftN'); - - -/** - * "lifts" a function of arity > 1 so that it may "map over" a list, Function or other - * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.liftN - * @example - * - * var madd3 = R.lift((a, b, c) => a + b + c); - * - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - * - * var madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); - * - * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] - */ -module.exports = _curry1(function lift(fn) { - return liftN(fn.length, fn); -}); diff --git a/node_modules/ramda/src/liftN.js b/node_modules/ramda/src/liftN.js deleted file mode 100644 index dfb6b50..0000000 --- a/node_modules/ramda/src/liftN.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _reduce = require('./internal/_reduce'); -var ap = require('./ap'); -var curryN = require('./curryN'); -var map = require('./map'); - - -/** - * "lifts" a function to be the specified arity, so that it may "map over" that - * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig Number -> (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.lift, R.ap - * @example - * - * var madd3 = R.liftN(3, (...args) => R.sum(args)); - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - */ -module.exports = _curry2(function liftN(arity, fn) { - var lifted = curryN(arity, fn); - return curryN(arity, function() { - return _reduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1)); - }); -}); diff --git a/node_modules/ramda/src/lt.js b/node_modules/ramda/src/lt.js deleted file mode 100644 index 115793e..0000000 --- a/node_modules/ramda/src/lt.js +++ /dev/null @@ -1,25 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns `true` if the first argument is less than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.gt - * @example - * - * R.lt(2, 1); //=> false - * R.lt(2, 2); //=> false - * R.lt(2, 3); //=> true - * R.lt('a', 'z'); //=> true - * R.lt('z', 'a'); //=> false - */ -module.exports = _curry2(function lt(a, b) { return a < b; }); diff --git a/node_modules/ramda/src/lte.js b/node_modules/ramda/src/lte.js deleted file mode 100644 index f02bd48..0000000 --- a/node_modules/ramda/src/lte.js +++ /dev/null @@ -1,25 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns `true` if the first argument is less than or equal to the second; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.gte - * @example - * - * R.lte(2, 1); //=> false - * R.lte(2, 2); //=> true - * R.lte(2, 3); //=> true - * R.lte('a', 'z'); //=> true - * R.lte('z', 'a'); //=> false - */ -module.exports = _curry2(function lte(a, b) { return a <= b; }); diff --git a/node_modules/ramda/src/map.js b/node_modules/ramda/src/map.js deleted file mode 100644 index 29442bd..0000000 --- a/node_modules/ramda/src/map.js +++ /dev/null @@ -1,59 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _map = require('./internal/_map'); -var _reduce = require('./internal/_reduce'); -var _xmap = require('./internal/_xmap'); -var curryN = require('./curryN'); -var keys = require('./keys'); - - -/** - * Takes a function and - * a [functor](https://github.com/fantasyland/fantasy-land#functor), - * applies the function to each of the functor's values, and returns - * a functor of the same shape. - * - * Ramda provides suitable `map` implementations for `Array` and `Object`, - * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`. - * - * Dispatches to the `map` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * Also treats functions as functors and will compose them together. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Functor f => (a -> b) -> f a -> f b - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {Array} list The list to be iterated over. - * @return {Array} The new list. - * @see R.transduce, R.addIndex - * @example - * - * var double = x => x * 2; - * - * R.map(double, [1, 2, 3]); //=> [2, 4, 6] - * - * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6} - * @symb R.map(f, [a, b]) = [f(a), f(b)] - * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) } - * @symb R.map(f, functor_o) = functor_o.map(f) - */ -module.exports = _curry2(_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) { - switch (Object.prototype.toString.call(functor)) { - case '[object Function]': - return curryN(functor.length, function() { - return fn.call(this, functor.apply(this, arguments)); - }); - case '[object Object]': - return _reduce(function(acc, key) { - acc[key] = fn(functor[key]); - return acc; - }, {}, keys(functor)); - default: - return _map(fn, functor); - } -})); diff --git a/node_modules/ramda/src/mapAccum.js b/node_modules/ramda/src/mapAccum.js deleted file mode 100644 index 2327d0b..0000000 --- a/node_modules/ramda/src/mapAccum.js +++ /dev/null @@ -1,49 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * The `mapAccum` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from left to right, and returning a final value of this - * accumulator together with the new list. - * - * The iterator function receives two arguments, *acc* and *value*, and should - * return a tuple *[acc, value]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y]) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.addIndex, R.mapAccumRight - * @example - * - * var digits = ['1', '2', '3', '4']; - * var appender = (a, b) => [a + b, a + b]; - * - * R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] - * @symb R.mapAccum(f, a, [b, c, d]) = [ - * f(f(f(a, b)[0], c)[0], d)[0], - * [ - * f(a, b)[1], - * f(f(a, b)[0], c)[1], - * f(f(f(a, b)[0], c)[0], d)[1] - * ] - * ] - */ -module.exports = _curry3(function mapAccum(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = []; - var tuple = [acc]; - while (idx < len) { - tuple = fn(tuple[0], list[idx]); - result[idx] = tuple[1]; - idx += 1; - } - return [tuple[0], result]; -}); diff --git a/node_modules/ramda/src/mapAccumRight.js b/node_modules/ramda/src/mapAccumRight.js deleted file mode 100644 index ed9fa24..0000000 --- a/node_modules/ramda/src/mapAccumRight.js +++ /dev/null @@ -1,51 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * The `mapAccumRight` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from right to left, and returning a final value of this - * accumulator together with the new list. - * - * Similar to [`mapAccum`](#mapAccum), except moves through the input list from - * the right to the left. - * - * The iterator function receives two arguments, *value* and *acc*, and should - * return a tuple *[value, acc]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (x-> acc -> (y, acc)) -> acc -> [x] -> ([y], acc) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.addIndex, R.mapAccum - * @example - * - * var digits = ['1', '2', '3', '4']; - * var append = (a, b) => [a + b, a + b]; - * - * R.mapAccumRight(append, 5, digits); //=> [['12345', '2345', '345', '45'], '12345'] - * @symb R.mapAccumRight(f, a, [b, c, d]) = [ - * [ - * f(b, f(c, f(d, a)[0])[0])[1], - * f(c, f(d, a)[0])[1], - * f(d, a)[1], - * ] - * f(b, f(c, f(d, a)[0])[0])[0], - * ] - */ -module.exports = _curry3(function mapAccumRight(fn, acc, list) { - var idx = list.length - 1; - var result = []; - var tuple = [acc]; - while (idx >= 0) { - tuple = fn(list[idx], tuple[0]); - result[idx] = tuple[1]; - idx -= 1; - } - return [result, tuple[0]]; -}); diff --git a/node_modules/ramda/src/mapObjIndexed.js b/node_modules/ramda/src/mapObjIndexed.js deleted file mode 100644 index 76118bb..0000000 --- a/node_modules/ramda/src/mapObjIndexed.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _reduce = require('./internal/_reduce'); -var keys = require('./keys'); - - -/** - * An Object-specific version of [`map`](#map). The function is applied to three - * arguments: *(value, key, obj)*. If only the value is significant, use - * [`map`](#map) instead. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig ((*, String, Object) -> *) -> Object -> Object - * @param {Function} fn - * @param {Object} obj - * @return {Object} - * @see R.map - * @example - * - * var values = { x: 1, y: 2, z: 3 }; - * var prependKeyAndDouble = (num, key, obj) => key + (num * 2); - * - * R.mapObjIndexed(prependKeyAndDouble, values); //=> { x: 'x2', y: 'y4', z: 'z6' } - */ -module.exports = _curry2(function mapObjIndexed(fn, obj) { - return _reduce(function(acc, key) { - acc[key] = fn(obj[key], key, obj); - return acc; - }, {}, keys(obj)); -}); diff --git a/node_modules/ramda/src/match.js b/node_modules/ramda/src/match.js deleted file mode 100644 index bedf6d8..0000000 --- a/node_modules/ramda/src/match.js +++ /dev/null @@ -1,27 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Tests a regular expression against a String. Note that this function will - * return an empty array when there are no matches. This differs from - * [`String.prototype.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) - * which returns `null` when there are no matches. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category String - * @sig RegExp -> String -> [String | Undefined] - * @param {RegExp} rx A regular expression. - * @param {String} str The string to match against - * @return {Array} The list of matches or empty array. - * @see R.test - * @example - * - * R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na'] - * R.match(/a/, 'b'); //=> [] - * R.match(/a/, null); //=> TypeError: null does not have a method named "match" - */ -module.exports = _curry2(function match(rx, str) { - return str.match(rx) || []; -}); diff --git a/node_modules/ramda/src/mathMod.js b/node_modules/ramda/src/mathMod.js deleted file mode 100644 index d85b7e3..0000000 --- a/node_modules/ramda/src/mathMod.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _isInteger = require('./internal/_isInteger'); - - -/** - * `mathMod` behaves like the modulo operator should mathematically, unlike the - * `%` operator (and by extension, [`R.modulo`](#modulo)). So while - * `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer - * arguments, and returns NaN when the modulus is zero or negative. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} m The dividend. - * @param {Number} p the modulus. - * @return {Number} The result of `b mod a`. - * @see R.modulo - * @example - * - * R.mathMod(-17, 5); //=> 3 - * R.mathMod(17, 5); //=> 2 - * R.mathMod(17, -5); //=> NaN - * R.mathMod(17, 0); //=> NaN - * R.mathMod(17.2, 5); //=> NaN - * R.mathMod(17, 5.3); //=> NaN - * - * var clock = R.mathMod(R.__, 12); - * clock(15); //=> 3 - * clock(24); //=> 0 - * - * var seventeenMod = R.mathMod(17); - * seventeenMod(3); //=> 2 - * seventeenMod(4); //=> 1 - * seventeenMod(10); //=> 7 - */ -module.exports = _curry2(function mathMod(m, p) { - if (!_isInteger(m)) { return NaN; } - if (!_isInteger(p) || p < 1) { return NaN; } - return ((m % p) + p) % p; -}); diff --git a/node_modules/ramda/src/max.js b/node_modules/ramda/src/max.js deleted file mode 100644 index da3bb14..0000000 --- a/node_modules/ramda/src/max.js +++ /dev/null @@ -1,21 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns the larger of its two arguments. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> a - * @param {*} a - * @param {*} b - * @return {*} - * @see R.maxBy, R.min - * @example - * - * R.max(789, 123); //=> 789 - * R.max('a', 'b'); //=> 'b' - */ -module.exports = _curry2(function max(a, b) { return b > a ? b : a; }); diff --git a/node_modules/ramda/src/maxBy.js b/node_modules/ramda/src/maxBy.js deleted file mode 100644 index 871854f..0000000 --- a/node_modules/ramda/src/maxBy.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Takes a function and two values, and returns whichever value produces the - * larger result when passed to the provided function. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Relation - * @sig Ord b => (a -> b) -> a -> a -> a - * @param {Function} f - * @param {*} a - * @param {*} b - * @return {*} - * @see R.max, R.minBy - * @example - * - * // square :: Number -> Number - * var square = n => n * n; - * - * R.maxBy(square, -3, 2); //=> -3 - * - * R.reduce(R.maxBy(square), 0, [3, -5, 4, 1, -2]); //=> -5 - * R.reduce(R.maxBy(square), 0, []); //=> 0 - */ -module.exports = _curry3(function maxBy(f, a, b) { - return f(b) > f(a) ? b : a; -}); diff --git a/node_modules/ramda/src/mean.js b/node_modules/ramda/src/mean.js deleted file mode 100644 index b15f9a8..0000000 --- a/node_modules/ramda/src/mean.js +++ /dev/null @@ -1,23 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var sum = require('./sum'); - - -/** - * Returns the mean of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.median - * @example - * - * R.mean([2, 7, 9]); //=> 6 - * R.mean([]); //=> NaN - */ -module.exports = _curry1(function mean(list) { - return sum(list) / list.length; -}); diff --git a/node_modules/ramda/src/median.js b/node_modules/ramda/src/median.js deleted file mode 100644 index 3a14260..0000000 --- a/node_modules/ramda/src/median.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var mean = require('./mean'); - - -/** - * Returns the median of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.mean - * @example - * - * R.median([2, 9, 7]); //=> 7 - * R.median([7, 2, 10, 9]); //=> 8 - * R.median([]); //=> NaN - */ -module.exports = _curry1(function median(list) { - var len = list.length; - if (len === 0) { - return NaN; - } - var width = 2 - len % 2; - var idx = (len - width) / 2; - return mean(Array.prototype.slice.call(list, 0).sort(function(a, b) { - return a < b ? -1 : a > b ? 1 : 0; - }).slice(idx, idx + width)); -}); diff --git a/node_modules/ramda/src/memoize.js b/node_modules/ramda/src/memoize.js deleted file mode 100644 index 0d45f36..0000000 --- a/node_modules/ramda/src/memoize.js +++ /dev/null @@ -1,34 +0,0 @@ -var memoizeWith = require('./memoizeWith'); -var toString = require('./toString'); - - -/** - * Creates a new function that, when invoked, caches the result of calling `fn` - * for a given argument set and returns the result. Subsequent calls to the - * memoized `fn` with the same argument set will not result in an additional - * call to `fn`; instead, the cached result for that set of arguments will be - * returned. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (*... -> a) -> (*... -> a) - * @param {Function} fn The function to memoize. - * @return {Function} Memoized version of `fn`. - * @see R.memoizeWith - * @example - * - * let count = 0; - * const factorial = R.memoize(n => { - * count += 1; - * return R.product(R.range(1, n + 1)); - * }); - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * count; //=> 1 - */ -module.exports = memoizeWith(function() { - return toString(arguments); -}); diff --git a/node_modules/ramda/src/memoizeWith.js b/node_modules/ramda/src/memoizeWith.js deleted file mode 100644 index 91205bd..0000000 --- a/node_modules/ramda/src/memoizeWith.js +++ /dev/null @@ -1,44 +0,0 @@ -var _arity = require('./internal/_arity'); -var _curry2 = require('./internal/_curry2'); -var _has = require('./internal/_has'); - - -/** - * A customisable version of [`R.memoize`](#memoize). `memoizeWith` takes an - * additional function that will be applied to a given argument set and used to - * create the cache key under which the results of the function to be memoized - * will be stored. Care must be taken when implementing key generation to avoid - * clashes that may overwrite previous entries erroneously. - * - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Function - * @sig (*... -> String) -> (*... -> a) -> (*... -> a) - * @param {Function} fn The function to generate the cache key. - * @param {Function} fn The function to memoize. - * @return {Function} Memoized version of `fn`. - * @see R.memoize - * @example - * - * let count = 0; - * const factorial = R.memoizeWith(R.identity, n => { - * count += 1; - * return R.product(R.range(1, n + 1)); - * }); - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * count; //=> 1 - */ -module.exports = _curry2(function memoizeWith(mFn, fn) { - var cache = {}; - return _arity(fn.length, function() { - var key = mFn.apply(this, arguments); - if (!_has(key, cache)) { - cache[key] = fn.apply(this, arguments); - } - return cache[key]; - }); -}); diff --git a/node_modules/ramda/src/merge.js b/node_modules/ramda/src/merge.js deleted file mode 100644 index b439673..0000000 --- a/node_modules/ramda/src/merge.js +++ /dev/null @@ -1,30 +0,0 @@ -var _assign = require('./internal/_assign'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepRight, R.mergeWith, R.mergeWithKey - * @example - * - * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * var resetToDefault = R.merge(R.__, {x: 0}); - * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} - * @symb R.merge({ x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: 5, z: 3 } - */ -module.exports = _curry2(function merge(l, r) { - return _assign({}, l, r); -}); diff --git a/node_modules/ramda/src/mergeAll.js b/node_modules/ramda/src/mergeAll.js deleted file mode 100644 index 6f156bd..0000000 --- a/node_modules/ramda/src/mergeAll.js +++ /dev/null @@ -1,24 +0,0 @@ -var _assign = require('./internal/_assign'); -var _curry1 = require('./internal/_curry1'); - - -/** - * Merges a list of objects together into one object. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig [{k: v}] -> {k: v} - * @param {Array} list An array of objects - * @return {Object} A merged object. - * @see R.reduce - * @example - * - * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3} - * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2} - * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 } - */ -module.exports = _curry1(function mergeAll(list) { - return _assign.apply(null, [{}].concat(list)); -}); diff --git a/node_modules/ramda/src/mergeDeepLeft.js b/node_modules/ramda/src/mergeDeepLeft.js deleted file mode 100644 index a4c5980..0000000 --- a/node_modules/ramda/src/mergeDeepLeft.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var mergeDeepWithKey = require('./mergeDeepWithKey'); - - -/** - * Creates a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects: - * - and both values are objects, the two values will be recursively merged - * - otherwise the value from the first object will be used. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig {a} -> {a} -> {a} - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, - * { age: 40, contact: { email: 'baa@example.com' }}); - * //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }} - */ -module.exports = _curry2(function mergeDeepLeft(lObj, rObj) { - return mergeDeepWithKey(function(k, lVal, rVal) { - return lVal; - }, lObj, rObj); -}); diff --git a/node_modules/ramda/src/mergeDeepRight.js b/node_modules/ramda/src/mergeDeepRight.js deleted file mode 100644 index e380355..0000000 --- a/node_modules/ramda/src/mergeDeepRight.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var mergeDeepWithKey = require('./mergeDeepWithKey'); - - -/** - * Creates a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects: - * - and both values are objects, the two values will be recursively merged - * - otherwise the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig {a} -> {a} -> {a} - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, - * { age: 40, contact: { email: 'baa@example.com' }}); - * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }} - */ -module.exports = _curry2(function mergeDeepRight(lObj, rObj) { - return mergeDeepWithKey(function(k, lVal, rVal) { - return rVal; - }, lObj, rObj); -}); diff --git a/node_modules/ramda/src/mergeDeepWith.js b/node_modules/ramda/src/mergeDeepWith.js deleted file mode 100644 index 322e3fe..0000000 --- a/node_modules/ramda/src/mergeDeepWith.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var mergeDeepWithKey = require('./mergeDeepWithKey'); - - -/** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to associated values using the - * resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig (a -> a -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWith, R.mergeDeep, R.mergeDeepWithKey - * @example - * - * R.mergeDeepWith(R.concat, - * { a: true, c: { values: [10, 20] }}, - * { b: true, c: { values: [15, 35] }}); - * //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }} - */ -module.exports = _curry3(function mergeDeepWith(fn, lObj, rObj) { - return mergeDeepWithKey(function(k, lVal, rVal) { - return fn(lVal, rVal); - }, lObj, rObj); -}); diff --git a/node_modules/ramda/src/mergeDeepWithKey.js b/node_modules/ramda/src/mergeDeepWithKey.js deleted file mode 100644 index db39c6a..0000000 --- a/node_modules/ramda/src/mergeDeepWithKey.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var _isObject = require('./internal/_isObject'); -var mergeWithKey = require('./mergeWithKey'); - - -/** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to the key and associated values - * using the resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig (String -> a -> a -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWithKey, R.mergeDeep, R.mergeDeepWith - * @example - * - * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r - * R.mergeDeepWithKey(concatValues, - * { a: true, c: { thing: 'foo', values: [10, 20] }}, - * { b: true, c: { thing: 'bar', values: [15, 35] }}); - * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }} - */ -module.exports = _curry3(function mergeDeepWithKey(fn, lObj, rObj) { - return mergeWithKey(function(k, lVal, rVal) { - if (_isObject(lVal) && _isObject(rVal)) { - return mergeDeepWithKey(fn, lVal, rVal); - } else { - return fn(k, lVal, rVal); - } - }, lObj, rObj); -}); diff --git a/node_modules/ramda/src/mergeWith.js b/node_modules/ramda/src/mergeWith.js deleted file mode 100644 index 1156d01..0000000 --- a/node_modules/ramda/src/mergeWith.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var mergeWithKey = require('./mergeWithKey'); - - -/** - * Creates a new object with the own properties of the two provided objects. If - * a key exists in both objects, the provided function is applied to the values - * associated with the key in each object, with the result being used as the - * value associated with the key in the returned object. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @sig (a -> a -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepWith, R.merge, R.mergeWithKey - * @example - * - * R.mergeWith(R.concat, - * { a: true, values: [10, 20] }, - * { b: true, values: [15, 35] }); - * //=> { a: true, b: true, values: [10, 20, 15, 35] } - */ -module.exports = _curry3(function mergeWith(fn, l, r) { - return mergeWithKey(function(_, _l, _r) { - return fn(_l, _r); - }, l, r); -}); diff --git a/node_modules/ramda/src/mergeWithKey.js b/node_modules/ramda/src/mergeWithKey.js deleted file mode 100644 index 75c44f6..0000000 --- a/node_modules/ramda/src/mergeWithKey.js +++ /dev/null @@ -1,47 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var _has = require('./internal/_has'); - - -/** - * Creates a new object with the own properties of the two provided objects. If - * a key exists in both objects, the provided function is applied to the key - * and the values associated with the key in each object, with the result being - * used as the value associated with the key in the returned object. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @sig (String -> a -> a -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepWithKey, R.merge, R.mergeWith - * @example - * - * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r - * R.mergeWithKey(concatValues, - * { a: true, thing: 'foo', values: [10, 20] }, - * { b: true, thing: 'bar', values: [15, 35] }); - * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] } - * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 } - */ -module.exports = _curry3(function mergeWithKey(fn, l, r) { - var result = {}; - var k; - - for (k in l) { - if (_has(k, l)) { - result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k]; - } - } - - for (k in r) { - if (_has(k, r) && !(_has(k, result))) { - result[k] = r[k]; - } - } - - return result; -}); diff --git a/node_modules/ramda/src/min.js b/node_modules/ramda/src/min.js deleted file mode 100644 index a39eb20..0000000 --- a/node_modules/ramda/src/min.js +++ /dev/null @@ -1,21 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns the smaller of its two arguments. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> a - * @param {*} a - * @param {*} b - * @return {*} - * @see R.minBy, R.max - * @example - * - * R.min(789, 123); //=> 123 - * R.min('a', 'b'); //=> 'a' - */ -module.exports = _curry2(function min(a, b) { return b < a ? b : a; }); diff --git a/node_modules/ramda/src/minBy.js b/node_modules/ramda/src/minBy.js deleted file mode 100644 index f45a3ba..0000000 --- a/node_modules/ramda/src/minBy.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Takes a function and two values, and returns whichever value produces the - * smaller result when passed to the provided function. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Relation - * @sig Ord b => (a -> b) -> a -> a -> a - * @param {Function} f - * @param {*} a - * @param {*} b - * @return {*} - * @see R.min, R.maxBy - * @example - * - * // square :: Number -> Number - * var square = n => n * n; - * - * R.minBy(square, -3, 2); //=> 2 - * - * R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1 - * R.reduce(R.minBy(square), Infinity, []); //=> Infinity - */ -module.exports = _curry3(function minBy(f, a, b) { - return f(b) < f(a) ? b : a; -}); diff --git a/node_modules/ramda/src/modulo.js b/node_modules/ramda/src/modulo.js deleted file mode 100644 index 9a3b58b..0000000 --- a/node_modules/ramda/src/modulo.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Divides the first parameter by the second and returns the remainder. Note - * that this function preserves the JavaScript-style behavior for modulo. For - * mathematical modulo see [`mathMod`](#mathMod). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The value to the divide. - * @param {Number} b The pseudo-modulus - * @return {Number} The result of `b % a`. - * @see R.mathMod - * @example - * - * R.modulo(17, 3); //=> 2 - * // JS behavior: - * R.modulo(-17, 3); //=> -2 - * R.modulo(17, -3); //=> 2 - * - * var isOdd = R.modulo(R.__, 2); - * isOdd(42); //=> 0 - * isOdd(21); //=> 1 - */ -module.exports = _curry2(function modulo(a, b) { return a % b; }); diff --git a/node_modules/ramda/src/multiply.js b/node_modules/ramda/src/multiply.js deleted file mode 100644 index 919a1be..0000000 --- a/node_modules/ramda/src/multiply.js +++ /dev/null @@ -1,24 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Multiplies two numbers. Equivalent to `a * b` but curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a * b`. - * @see R.divide - * @example - * - * var double = R.multiply(2); - * var triple = R.multiply(3); - * double(3); //=> 6 - * triple(4); //=> 12 - * R.multiply(2, 5); //=> 10 - */ -module.exports = _curry2(function multiply(a, b) { return a * b; }); diff --git a/node_modules/ramda/src/nAry.js b/node_modules/ramda/src/nAry.js deleted file mode 100644 index a7dce50..0000000 --- a/node_modules/ramda/src/nAry.js +++ /dev/null @@ -1,49 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly `n` parameters. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig Number -> (* -> a) -> (* -> a) - * @param {Number} n The desired arity of the new function. - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity `n`. - * @see R.binary, R.unary - * @example - * - * var takesTwoArgs = (a, b) => [a, b]; - * - * takesTwoArgs.length; //=> 2 - * takesTwoArgs(1, 2); //=> [1, 2] - * - * var takesOneArg = R.nAry(1, takesTwoArgs); - * takesOneArg.length; //=> 1 - * // Only `n` arguments are passed to the wrapped function - * takesOneArg(1, 2); //=> [1, undefined] - * @symb R.nAry(0, f)(a, b) = f() - * @symb R.nAry(1, f)(a, b) = f(a) - * @symb R.nAry(2, f)(a, b) = f(a, b) - */ -module.exports = _curry2(function nAry(n, fn) { - switch (n) { - case 0: return function() {return fn.call(this);}; - case 1: return function(a0) {return fn.call(this, a0);}; - case 2: return function(a0, a1) {return fn.call(this, a0, a1);}; - case 3: return function(a0, a1, a2) {return fn.call(this, a0, a1, a2);}; - case 4: return function(a0, a1, a2, a3) {return fn.call(this, a0, a1, a2, a3);}; - case 5: return function(a0, a1, a2, a3, a4) {return fn.call(this, a0, a1, a2, a3, a4);}; - case 6: return function(a0, a1, a2, a3, a4, a5) {return fn.call(this, a0, a1, a2, a3, a4, a5);}; - case 7: return function(a0, a1, a2, a3, a4, a5, a6) {return fn.call(this, a0, a1, a2, a3, a4, a5, a6);}; - case 8: return function(a0, a1, a2, a3, a4, a5, a6, a7) {return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7);}; - case 9: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8) {return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8);}; - case 10: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);}; - default: throw new Error('First argument to nAry must be a non-negative integer no greater than ten'); - } -}); diff --git a/node_modules/ramda/src/negate.js b/node_modules/ramda/src/negate.js deleted file mode 100644 index 9f3a6f2..0000000 --- a/node_modules/ramda/src/negate.js +++ /dev/null @@ -1,18 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Negates its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} - * @example - * - * R.negate(42); //=> -42 - */ -module.exports = _curry1(function negate(n) { return -n; }); diff --git a/node_modules/ramda/src/none.js b/node_modules/ramda/src/none.js deleted file mode 100644 index f17938c..0000000 --- a/node_modules/ramda/src/none.js +++ /dev/null @@ -1,30 +0,0 @@ -var _complement = require('./internal/_complement'); -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xany = require('./internal/_xany'); -var any = require('./any'); - - -/** - * Returns `true` if no elements of the list match the predicate, `false` - * otherwise. - * - * Dispatches to the `any` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. - * @see R.all, R.any - * @example - * - * var isEven = n => n % 2 === 0; - * - * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true - * R.none(isEven, [1, 3, 5, 7, 8, 11]); //=> false - */ -module.exports = _curry2(_complement(_dispatchable(['any'], _xany, any))); diff --git a/node_modules/ramda/src/not.js b/node_modules/ramda/src/not.js deleted file mode 100644 index a47b80e..0000000 --- a/node_modules/ramda/src/not.js +++ /dev/null @@ -1,25 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * A function that returns the `!` of its argument. It will return `true` when - * passed false-y value, and `false` when passed a truth-y one. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig * -> Boolean - * @param {*} a any value - * @return {Boolean} the logical inverse of passed argument. - * @see R.complement - * @example - * - * R.not(true); //=> false - * R.not(false); //=> true - * R.not(0); //=> true - * R.not(1); //=> false - */ -module.exports = _curry1(function not(a) { - return !a; -}); diff --git a/node_modules/ramda/src/nth.js b/node_modules/ramda/src/nth.js deleted file mode 100644 index c862f2b..0000000 --- a/node_modules/ramda/src/nth.js +++ /dev/null @@ -1,34 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _isString = require('./internal/_isString'); - - -/** - * Returns the nth element of the given list or string. If n is negative the - * element at index length + n is returned. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> a | Undefined - * @sig Number -> String -> String - * @param {Number} offset - * @param {*} list - * @return {*} - * @example - * - * var list = ['foo', 'bar', 'baz', 'quux']; - * R.nth(1, list); //=> 'bar' - * R.nth(-1, list); //=> 'quux' - * R.nth(-99, list); //=> undefined - * - * R.nth(2, 'abc'); //=> 'c' - * R.nth(3, 'abc'); //=> '' - * @symb R.nth(-1, [a, b, c]) = c - * @symb R.nth(0, [a, b, c]) = a - * @symb R.nth(1, [a, b, c]) = b - */ -module.exports = _curry2(function nth(offset, list) { - var idx = offset < 0 ? list.length + offset : offset; - return _isString(list) ? list.charAt(idx) : list[idx]; -}); diff --git a/node_modules/ramda/src/nthArg.js b/node_modules/ramda/src/nthArg.js deleted file mode 100644 index 6cf6785..0000000 --- a/node_modules/ramda/src/nthArg.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var curryN = require('./curryN'); -var nth = require('./nth'); - - -/** - * Returns a function which returns its nth argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig Number -> *... -> * - * @param {Number} n - * @return {Function} - * @example - * - * R.nthArg(1)('a', 'b', 'c'); //=> 'b' - * R.nthArg(-1)('a', 'b', 'c'); //=> 'c' - * @symb R.nthArg(-1)(a, b, c) = c - * @symb R.nthArg(0)(a, b, c) = a - * @symb R.nthArg(1)(a, b, c) = b - */ -module.exports = _curry1(function nthArg(n) { - var arity = n < 0 ? 1 : n + 1; - return curryN(arity, function() { - return nth(n, arguments); - }); -}); diff --git a/node_modules/ramda/src/o.js b/node_modules/ramda/src/o.js deleted file mode 100644 index a51e5dd..0000000 --- a/node_modules/ramda/src/o.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * `o` is a curried composition function that returns a unary function. - * Like [`compose`](#compose), `o` performs right-to-left function composition. - * Unlike [`compose`](#compose), the rightmost function passed to `o` will be - * invoked with only one argument. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Function - * @sig (b -> c) -> (a -> b) -> a -> c - * @param {Function} f - * @param {Function} g - * @return {Function} - * @see R.compose, R.pipe - * @example - * - * var classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + lastName - * var yellGreeting = R.o(R.toUpper, classyGreeting); - * yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND" - * - * R.o(R.multiply(10), R.add(10))(-4) //=> 60 - * - * @symb R.o(f, g, x) = f(g(x)) - */ -module.exports = _curry3(function o(f, g, x) { - return f(g(x)); -}); diff --git a/node_modules/ramda/src/objOf.js b/node_modules/ramda/src/objOf.js deleted file mode 100644 index 2081423..0000000 --- a/node_modules/ramda/src/objOf.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Creates an object containing a single key:value pair. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @sig String -> a -> {String:a} - * @param {String} key - * @param {*} val - * @return {Object} - * @see R.pair - * @example - * - * var matchPhrases = R.compose( - * R.objOf('must'), - * R.map(R.objOf('match_phrase')) - * ); - * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} - */ -module.exports = _curry2(function objOf(key, val) { - var obj = {}; - obj[key] = val; - return obj; -}); diff --git a/node_modules/ramda/src/of.js b/node_modules/ramda/src/of.js deleted file mode 100644 index 5927fb9..0000000 --- a/node_modules/ramda/src/of.js +++ /dev/null @@ -1,23 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _of = require('./internal/_of'); - - -/** - * Returns a singleton array containing the value provided. - * - * Note this `of` is different from the ES6 `of`; See - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> [a] - * @param {*} x any value - * @return {Array} An array wrapping `x`. - * @example - * - * R.of(null); //=> [null] - * R.of([42]); //=> [[42]] - */ -module.exports = _curry1(_of); diff --git a/node_modules/ramda/src/omit.js b/node_modules/ramda/src/omit.js deleted file mode 100644 index 9e9e76c..0000000 --- a/node_modules/ramda/src/omit.js +++ /dev/null @@ -1,29 +0,0 @@ -var _contains = require('./internal/_contains'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a partial copy of an object omitting the keys specified. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [String] -> {String: *} -> {String: *} - * @param {Array} names an array of String property names to omit from the new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with properties from `names` not on it. - * @see R.pick - * @example - * - * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} - */ -module.exports = _curry2(function omit(names, obj) { - var result = {}; - for (var prop in obj) { - if (!_contains(prop, names)) { - result[prop] = obj[prop]; - } - } - return result; -}); diff --git a/node_modules/ramda/src/once.js b/node_modules/ramda/src/once.js deleted file mode 100644 index 57b19d1..0000000 --- a/node_modules/ramda/src/once.js +++ /dev/null @@ -1,35 +0,0 @@ -var _arity = require('./internal/_arity'); -var _curry1 = require('./internal/_curry1'); - - -/** - * Accepts a function `fn` and returns a function that guards invocation of - * `fn` such that `fn` can only ever be called once, no matter how many times - * the returned function is invoked. The first value calculated is returned in - * subsequent invocations. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a... -> b) -> (a... -> b) - * @param {Function} fn The function to wrap in a call-only-once wrapper. - * @return {Function} The wrapped function. - * @example - * - * var addOneOnce = R.once(x => x + 1); - * addOneOnce(10); //=> 11 - * addOneOnce(addOneOnce(50)); //=> 11 - */ -module.exports = _curry1(function once(fn) { - var called = false; - var result; - return _arity(fn.length, function() { - if (called) { - return result; - } - called = true; - result = fn.apply(this, arguments); - return result; - }); -}); diff --git a/node_modules/ramda/src/or.js b/node_modules/ramda/src/or.js deleted file mode 100644 index 62e2b69..0000000 --- a/node_modules/ramda/src/or.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns `true` if one or both of its arguments are `true`. Returns `false` - * if both arguments are `false`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> b -> a | b - * @param {Any} a - * @param {Any} b - * @return {Any} the first argument if truthy, otherwise the second argument. - * @see R.either - * @example - * - * R.or(true, true); //=> true - * R.or(true, false); //=> true - * R.or(false, true); //=> true - * R.or(false, false); //=> false - */ -module.exports = _curry2(function or(a, b) { - return a || b; -}); diff --git a/node_modules/ramda/src/over.js b/node_modules/ramda/src/over.js deleted file mode 100644 index 9c9bda8..0000000 --- a/node_modules/ramda/src/over.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the result of applying the given function to - * the focused value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> (a -> a) -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * var headLens = R.lensIndex(0); - * - * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] - */ -module.exports = (function() { - // `Identity` is a functor that holds a single value, where `map` simply - // transforms the held value with the provided function. - var Identity = function(x) { - return {value: x, map: function(f) { return Identity(f(x)); }}; - }; - - return _curry3(function over(lens, f, x) { - // The value returned by the getter function is first transformed with `f`, - // then set as the value of an `Identity`. This is then mapped over with the - // setter function of the lens. - return lens(function(y) { return Identity(f(y)); })(x).value; - }); -}()); diff --git a/node_modules/ramda/src/pair.js b/node_modules/ramda/src/pair.js deleted file mode 100644 index 1fdefd3..0000000 --- a/node_modules/ramda/src/pair.js +++ /dev/null @@ -1,20 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category List - * @sig a -> b -> (a,b) - * @param {*} fst - * @param {*} snd - * @return {Array} - * @see R.objOf, R.of - * @example - * - * R.pair('foo', 'bar'); //=> ['foo', 'bar'] - */ -module.exports = _curry2(function pair(fst, snd) { return [fst, snd]; }); diff --git a/node_modules/ramda/src/partial.js b/node_modules/ramda/src/partial.js deleted file mode 100644 index 108dbaa..0000000 --- a/node_modules/ramda/src/partial.js +++ /dev/null @@ -1,33 +0,0 @@ -var _concat = require('./internal/_concat'); -var _createPartialApplicator = require('./internal/_createPartialApplicator'); - - -/** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided initially followed by the arguments provided to `g`. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partialRight - * @example - * - * var multiply2 = (a, b) => a * b; - * var double = R.partial(multiply2, [2]); - * double(2); //=> 4 - * - * var greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; - * - * var sayHello = R.partial(greet, ['Hello']); - * var sayHelloToMs = R.partial(sayHello, ['Ms.']); - * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) - */ -module.exports = _createPartialApplicator(_concat); diff --git a/node_modules/ramda/src/partialRight.js b/node_modules/ramda/src/partialRight.js deleted file mode 100644 index bade2ef..0000000 --- a/node_modules/ramda/src/partialRight.js +++ /dev/null @@ -1,30 +0,0 @@ -var _concat = require('./internal/_concat'); -var _createPartialApplicator = require('./internal/_createPartialApplicator'); -var flip = require('./flip'); - - -/** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided to `g` followed by the arguments provided initially. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partial - * @example - * - * var greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; - * - * var greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); - * - * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) - */ -module.exports = _createPartialApplicator(flip(_concat)); diff --git a/node_modules/ramda/src/partition.js b/node_modules/ramda/src/partition.js deleted file mode 100644 index f995305..0000000 --- a/node_modules/ramda/src/partition.js +++ /dev/null @@ -1,30 +0,0 @@ -var filter = require('./filter'); -var juxt = require('./juxt'); -var reject = require('./reject'); - - -/** - * Takes a predicate and a list or other `Filterable` object and returns the - * pair of filterable objects of the same type of elements which do and do not - * satisfy, the predicate, respectively. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> [f a, f a] - * @param {Function} pred A predicate to determine which side the element belongs to. - * @param {Array} filterable the list (or other filterable) to partition. - * @return {Array} An array, containing first the subset of elements that satisfy the - * predicate, and second the subset of elements that do not satisfy. - * @see R.filter, R.reject - * @example - * - * R.partition(R.contains('s'), ['sss', 'ttt', 'foo', 'bars']); - * // => [ [ 'sss', 'bars' ], [ 'ttt', 'foo' ] ] - * - * R.partition(R.contains('s'), { a: 'sss', b: 'ttt', foo: 'bars' }); - * // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' } ] - */ -module.exports = juxt([filter, reject]); diff --git a/node_modules/ramda/src/path.js b/node_modules/ramda/src/path.js deleted file mode 100644 index 2ff7301..0000000 --- a/node_modules/ramda/src/path.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Retrieve the value at a given path. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {a} -> a | Undefined - * @param {Array} path The path to use. - * @param {Object} obj The object to retrieve the nested property from. - * @return {*} The data at `path`. - * @see R.prop - * @example - * - * R.path(['a', 'b'], {a: {b: 2}}); //=> 2 - * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined - */ -module.exports = _curry2(function path(paths, obj) { - var val = obj; - var idx = 0; - while (idx < paths.length) { - if (val == null) { - return; - } - val = val[paths[idx]]; - idx += 1; - } - return val; -}); diff --git a/node_modules/ramda/src/pathEq.js b/node_modules/ramda/src/pathEq.js deleted file mode 100644 index 264566e..0000000 --- a/node_modules/ramda/src/pathEq.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var equals = require('./equals'); -var path = require('./path'); - - -/** - * Determines whether a nested path on an object has a specific value, in - * [`R.equals`](#equals) terms. Most likely used to filter a list. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Relation - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> Boolean - * @param {Array} path The path of the nested property to use - * @param {*} val The value to compare the nested property with - * @param {Object} obj The object to check the nested property in - * @return {Boolean} `true` if the value equals the nested object property, - * `false` otherwise. - * @example - * - * var user1 = { address: { zipCode: 90210 } }; - * var user2 = { address: { zipCode: 55555 } }; - * var user3 = { name: 'Bob' }; - * var users = [ user1, user2, user3 ]; - * var isFamous = R.pathEq(['address', 'zipCode'], 90210); - * R.filter(isFamous, users); //=> [ user1 ] - */ -module.exports = _curry3(function pathEq(_path, val, obj) { - return equals(path(_path, obj), val); -}); diff --git a/node_modules/ramda/src/pathOr.js b/node_modules/ramda/src/pathOr.js deleted file mode 100644 index a87f8a7..0000000 --- a/node_modules/ramda/src/pathOr.js +++ /dev/null @@ -1,27 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var defaultTo = require('./defaultTo'); -var path = require('./path'); - - -/** - * If the given, non-null object has a value at the given path, returns the - * value at that path. Otherwise returns the provided default value. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @typedefn Idx = String | Int - * @sig a -> [Idx] -> {a} -> a - * @param {*} d The default value. - * @param {Array} p The path to use. - * @param {Object} obj The object to retrieve the nested property from. - * @return {*} The data at `path` of the supplied object or the default value. - * @example - * - * R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2 - * R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A" - */ -module.exports = _curry3(function pathOr(d, p, obj) { - return defaultTo(d, path(p, obj)); -}); diff --git a/node_modules/ramda/src/pathSatisfies.js b/node_modules/ramda/src/pathSatisfies.js deleted file mode 100644 index 01788ab..0000000 --- a/node_modules/ramda/src/pathSatisfies.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var path = require('./path'); - - -/** - * Returns `true` if the specified object property at given path satisfies the - * given predicate; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Logic - * @typedefn Idx = String | Int - * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean - * @param {Function} pred - * @param {Array} propPath - * @param {*} obj - * @return {Boolean} - * @see R.propSatisfies, R.path - * @example - * - * R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true - */ -module.exports = _curry3(function pathSatisfies(pred, propPath, obj) { - return propPath.length > 0 && pred(path(propPath, obj)); -}); diff --git a/node_modules/ramda/src/pick.js b/node_modules/ramda/src/pick.js deleted file mode 100644 index 09c6d68..0000000 --- a/node_modules/ramda/src/pick.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a partial copy of an object containing only the keys specified. If - * the key does not exist, the property is ignored. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> {k: v} - * @param {Array} names an array of String property names to copy onto a new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties from `names` on it. - * @see R.omit, R.props - * @example - * - * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} - * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1} - */ -module.exports = _curry2(function pick(names, obj) { - var result = {}; - var idx = 0; - while (idx < names.length) { - if (names[idx] in obj) { - result[names[idx]] = obj[names[idx]]; - } - idx += 1; - } - return result; -}); diff --git a/node_modules/ramda/src/pickAll.js b/node_modules/ramda/src/pickAll.js deleted file mode 100644 index f4344c7..0000000 --- a/node_modules/ramda/src/pickAll.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Similar to `pick` except that this one includes a `key: undefined` pair for - * properties that don't exist. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> {k: v} - * @param {Array} names an array of String property names to copy onto a new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties from `names` on it. - * @see R.pick - * @example - * - * R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} - * R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined} - */ -module.exports = _curry2(function pickAll(names, obj) { - var result = {}; - var idx = 0; - var len = names.length; - while (idx < len) { - var name = names[idx]; - result[name] = obj[name]; - idx += 1; - } - return result; -}); diff --git a/node_modules/ramda/src/pickBy.js b/node_modules/ramda/src/pickBy.js deleted file mode 100644 index ec4db09..0000000 --- a/node_modules/ramda/src/pickBy.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a partial copy of an object containing only the keys that satisfy - * the supplied predicate. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @sig (v, k -> Boolean) -> {k: v} -> {k: v} - * @param {Function} pred A predicate to determine whether or not a key - * should be included on the output object. - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties that satisfy `pred` - * on it. - * @see R.pick, R.filter - * @example - * - * var isUpperCase = (val, key) => key.toUpperCase() === key; - * R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4} - */ -module.exports = _curry2(function pickBy(test, obj) { - var result = {}; - for (var prop in obj) { - if (test(obj[prop], prop, obj)) { - result[prop] = obj[prop]; - } - } - return result; -}); diff --git a/node_modules/ramda/src/pipe.js b/node_modules/ramda/src/pipe.js deleted file mode 100644 index 96ce35c..0000000 --- a/node_modules/ramda/src/pipe.js +++ /dev/null @@ -1,36 +0,0 @@ -var _arity = require('./internal/_arity'); -var _pipe = require('./internal/_pipe'); -var reduce = require('./reduce'); -var tail = require('./tail'); - - -/** - * Performs left-to-right function composition. The leftmost function may have - * any arity; the remaining functions must be unary. - * - * In some libraries this function is named `sequence`. - * - * **Note:** The result of pipe is not automatically curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z) - * @param {...Function} functions - * @return {Function} - * @see R.compose - * @example - * - * var f = R.pipe(Math.pow, R.negate, R.inc); - * - * f(3, 4); // -(3^4) + 1 - * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) - */ -module.exports = function pipe() { - if (arguments.length === 0) { - throw new Error('pipe requires at least one argument'); - } - return _arity(arguments[0].length, - reduce(_pipe, arguments[0], tail(arguments))); -}; diff --git a/node_modules/ramda/src/pipeK.js b/node_modules/ramda/src/pipeK.js deleted file mode 100644 index 4fb6fad..0000000 --- a/node_modules/ramda/src/pipeK.js +++ /dev/null @@ -1,43 +0,0 @@ -var composeK = require('./composeK'); -var reverse = require('./reverse'); - -/** - * Returns the left-to-right Kleisli composition of the provided functions, - * each of which must return a value of a type supported by [`chain`](#chain). - * - * `R.pipeK(f, g, h)` is equivalent to `R.pipe(R.chain(f), R.chain(g), R.chain(h))`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Function - * @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (a -> m z) - * @param {...Function} - * @return {Function} - * @see R.composeK - * @example - * - * // parseJson :: String -> Maybe * - * // get :: String -> Object -> Maybe * - * - * // getStateCode :: Maybe String -> Maybe String - * var getStateCode = R.pipeK( - * parseJson, - * get('user'), - * get('address'), - * get('state'), - * R.compose(Maybe.of, R.toUpper) - * ); - * - * getStateCode('{"user":{"address":{"state":"ny"}}}'); - * //=> Just('NY') - * getStateCode('[Invalid JSON]'); - * //=> Nothing() - * @symb R.pipeK(f, g, h)(a) = R.chain(h, R.chain(g, f(a))) - */ -module.exports = function pipeK() { - if (arguments.length === 0) { - throw new Error('pipeK requires at least one argument'); - } - return composeK.apply(this, reverse(arguments)); -}; diff --git a/node_modules/ramda/src/pipeP.js b/node_modules/ramda/src/pipeP.js deleted file mode 100644 index 1d3563b..0000000 --- a/node_modules/ramda/src/pipeP.js +++ /dev/null @@ -1,31 +0,0 @@ -var _arity = require('./internal/_arity'); -var _pipeP = require('./internal/_pipeP'); -var reduce = require('./reduce'); -var tail = require('./tail'); - - -/** - * Performs left-to-right composition of one or more Promise-returning - * functions. The leftmost function may have any arity; the remaining functions - * must be unary. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z) - * @param {...Function} functions - * @return {Function} - * @see R.composeP - * @example - * - * // followersForUser :: String -> Promise [User] - * var followersForUser = R.pipeP(db.getUserById, db.getFollowers); - */ -module.exports = function pipeP() { - if (arguments.length === 0) { - throw new Error('pipeP requires at least one argument'); - } - return _arity(arguments[0].length, - reduce(_pipeP, arguments[0], tail(arguments))); -}; diff --git a/node_modules/ramda/src/pluck.js b/node_modules/ramda/src/pluck.js deleted file mode 100644 index e295a95..0000000 --- a/node_modules/ramda/src/pluck.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var map = require('./map'); -var prop = require('./prop'); - - -/** - * Returns a new list by plucking the same named property off all objects in - * the list supplied. - * - * `pluck` will work on - * any [functor](https://github.com/fantasyland/fantasy-land#functor) in - * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Functor f => k -> f {k: v} -> f v - * @param {Number|String} key The key name to pluck off of each object. - * @param {Array} f The array or functor to consider. - * @return {Array} The list of values for the given key. - * @see R.props - * @example - * - * R.pluck('a')([{a: 1}, {a: 2}]); //=> [1, 2] - * R.pluck(0)([[1, 2], [3, 4]]); //=> [1, 3] - * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5} - * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] - * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] - */ -module.exports = _curry2(function pluck(p, list) { - return map(prop(p), list); -}); diff --git a/node_modules/ramda/src/prepend.js b/node_modules/ramda/src/prepend.js deleted file mode 100644 index 82c025e..0000000 --- a/node_modules/ramda/src/prepend.js +++ /dev/null @@ -1,24 +0,0 @@ -var _concat = require('./internal/_concat'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a new list with the given element at the front, followed by the - * contents of the list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} el The item to add to the head of the output list. - * @param {Array} list The array to add to the tail of the output list. - * @return {Array} A new array. - * @see R.append - * @example - * - * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum'] - */ -module.exports = _curry2(function prepend(el, list) { - return _concat([el], list); -}); diff --git a/node_modules/ramda/src/product.js b/node_modules/ramda/src/product.js deleted file mode 100644 index 69f30f2..0000000 --- a/node_modules/ramda/src/product.js +++ /dev/null @@ -1,20 +0,0 @@ -var multiply = require('./multiply'); -var reduce = require('./reduce'); - - -/** - * Multiplies together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The product of all the numbers in the list. - * @see R.reduce - * @example - * - * R.product([2,4,6,8,100,1]); //=> 38400 - */ -module.exports = reduce(multiply, 1); diff --git a/node_modules/ramda/src/project.js b/node_modules/ramda/src/project.js deleted file mode 100644 index 63b5c3a..0000000 --- a/node_modules/ramda/src/project.js +++ /dev/null @@ -1,26 +0,0 @@ -var _map = require('./internal/_map'); -var identity = require('./identity'); -var pickAll = require('./pickAll'); -var useWith = require('./useWith'); - - -/** - * Reasonable analog to SQL `select` statement. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @category Relation - * @sig [k] -> [{k: v}] -> [{k: v}] - * @param {Array} props The property names to project - * @param {Array} objs The objects to query - * @return {Array} An array of objects with just the `props` properties. - * @example - * - * var abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2}; - * var fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7}; - * var kids = [abby, fred]; - * R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] - */ -module.exports = useWith(_map, [pickAll, identity]); // passing `identity` gives correct arity diff --git a/node_modules/ramda/src/prop.js b/node_modules/ramda/src/prop.js deleted file mode 100644 index 3f1467a..0000000 --- a/node_modules/ramda/src/prop.js +++ /dev/null @@ -1,22 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a function that when supplied an object returns the indicated - * property of that object, if it exists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig s -> {s: a} -> a | Undefined - * @param {String} p The property name - * @param {Object} obj The object to query - * @return {*} The value at `obj.p`. - * @see R.path - * @example - * - * R.prop('x', {x: 100}); //=> 100 - * R.prop('x', {}); //=> undefined - */ -module.exports = _curry2(function prop(p, obj) { return obj[p]; }); diff --git a/node_modules/ramda/src/propEq.js b/node_modules/ramda/src/propEq.js deleted file mode 100644 index e8db929..0000000 --- a/node_modules/ramda/src/propEq.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var equals = require('./equals'); - - -/** - * Returns `true` if the specified object property is equal, in - * [`R.equals`](#equals) terms, to the given value; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig String -> a -> Object -> Boolean - * @param {String} name - * @param {*} val - * @param {*} obj - * @return {Boolean} - * @see R.equals, R.propSatisfies - * @example - * - * var abby = {name: 'Abby', age: 7, hair: 'blond'}; - * var fred = {name: 'Fred', age: 12, hair: 'brown'}; - * var rusty = {name: 'Rusty', age: 10, hair: 'brown'}; - * var alois = {name: 'Alois', age: 15, disposition: 'surly'}; - * var kids = [abby, fred, rusty, alois]; - * var hasBrownHair = R.propEq('hair', 'brown'); - * R.filter(hasBrownHair, kids); //=> [fred, rusty] - */ -module.exports = _curry3(function propEq(name, val, obj) { - return equals(val, obj[name]); -}); diff --git a/node_modules/ramda/src/propIs.js b/node_modules/ramda/src/propIs.js deleted file mode 100644 index 0e515a9..0000000 --- a/node_modules/ramda/src/propIs.js +++ /dev/null @@ -1,27 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var is = require('./is'); - - -/** - * Returns `true` if the specified object property is of the given type; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Type - * @sig Type -> String -> Object -> Boolean - * @param {Function} type - * @param {String} name - * @param {*} obj - * @return {Boolean} - * @see R.is, R.propSatisfies - * @example - * - * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true - * R.propIs(Number, 'x', {x: 'foo'}); //=> false - * R.propIs(Number, 'x', {}); //=> false - */ -module.exports = _curry3(function propIs(type, name, obj) { - return is(type, obj[name]); -}); diff --git a/node_modules/ramda/src/propOr.js b/node_modules/ramda/src/propOr.js deleted file mode 100644 index b91c5dc..0000000 --- a/node_modules/ramda/src/propOr.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var _has = require('./internal/_has'); - - -/** - * If the given, non-null object has an own property with the specified name, - * returns the value of that property. Otherwise returns the provided default - * value. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Object - * @sig a -> String -> Object -> a - * @param {*} val The default value. - * @param {String} p The name of the property to return. - * @param {Object} obj The object to query. - * @return {*} The value of given property of the supplied object or the default value. - * @example - * - * var alice = { - * name: 'ALICE', - * age: 101 - * }; - * var favorite = R.prop('favoriteLibrary'); - * var favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); - * - * favorite(alice); //=> undefined - * favoriteWithDefault(alice); //=> 'Ramda' - */ -module.exports = _curry3(function propOr(val, p, obj) { - return (obj != null && _has(p, obj)) ? obj[p] : val; -}); diff --git a/node_modules/ramda/src/propSatisfies.js b/node_modules/ramda/src/propSatisfies.js deleted file mode 100644 index 56fb5b3..0000000 --- a/node_modules/ramda/src/propSatisfies.js +++ /dev/null @@ -1,24 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Returns `true` if the specified object property satisfies the given - * predicate; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Logic - * @sig (a -> Boolean) -> String -> {String: a} -> Boolean - * @param {Function} pred - * @param {String} name - * @param {*} obj - * @return {Boolean} - * @see R.propEq, R.propIs - * @example - * - * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true - */ -module.exports = _curry3(function propSatisfies(pred, name, obj) { - return pred(obj[name]); -}); diff --git a/node_modules/ramda/src/props.js b/node_modules/ramda/src/props.js deleted file mode 100644 index ed588c6..0000000 --- a/node_modules/ramda/src/props.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Acts as multiple `prop`: array of keys in, array of values out. Preserves - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> [v] - * @param {Array} ps The property names to fetch - * @param {Object} obj The object to query - * @return {Array} The corresponding values or partially applied function. - * @example - * - * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] - * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] - * - * var fullName = R.compose(R.join(' '), R.props(['first', 'last'])); - * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' - */ -module.exports = _curry2(function props(ps, obj) { - var len = ps.length; - var out = []; - var idx = 0; - - while (idx < len) { - out[idx] = obj[ps[idx]]; - idx += 1; - } - - return out; -}); diff --git a/node_modules/ramda/src/range.js b/node_modules/ramda/src/range.js deleted file mode 100644 index 2343059..0000000 --- a/node_modules/ramda/src/range.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _isNumber = require('./internal/_isNumber'); - - -/** - * Returns a list of numbers from `from` (inclusive) to `to` (exclusive). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> Number -> [Number] - * @param {Number} from The first number in the list. - * @param {Number} to One more than the last number in the list. - * @return {Array} The list of numbers in tthe set `[a, b)`. - * @example - * - * R.range(1, 5); //=> [1, 2, 3, 4] - * R.range(50, 53); //=> [50, 51, 52] - */ -module.exports = _curry2(function range(from, to) { - if (!(_isNumber(from) && _isNumber(to))) { - throw new TypeError('Both arguments to range must be numbers'); - } - var result = []; - var n = from; - while (n < to) { - result.push(n); - n += 1; - } - return result; -}); diff --git a/node_modules/ramda/src/reduce.js b/node_modules/ramda/src/reduce.js deleted file mode 100644 index 56b03e3..0000000 --- a/node_modules/ramda/src/reduce.js +++ /dev/null @@ -1,51 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var _reduce = require('./internal/_reduce'); - - -/** - * Returns a single item by iterating through the list, successively calling - * the iterator function and passing it an accumulator value and the current - * value from the array, and then passing the result to the next call. - * - * The iterator function receives two values: *(acc, value)*. It may use - * [`R.reduced`](#reduced) to shortcut the iteration. - * - * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function - * is *(value, acc)*. - * - * Note: `R.reduce` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.reduce` method. For more details - * on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description - * - * Dispatches to the `reduce` method of the third argument, if present. When - * doing so, it is up to the user to handle the [`R.reduced`](#reduced) - * shortcuting, as this is not implemented by `reduce`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> a) -> a -> [b] -> a - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduced, R.addIndex, R.reduceRight - * @example - * - * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 - * - -10 - * / \ / \ - * - 4 -6 4 - * / \ / \ - * - 3 ==> -3 3 - * / \ / \ - * - 2 -1 2 - * / \ / \ - * 0 1 0 1 - * - * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) - */ -module.exports = _curry3(_reduce); diff --git a/node_modules/ramda/src/reduceBy.js b/node_modules/ramda/src/reduceBy.js deleted file mode 100644 index 0e54dde..0000000 --- a/node_modules/ramda/src/reduceBy.js +++ /dev/null @@ -1,59 +0,0 @@ -var _curryN = require('./internal/_curryN'); -var _dispatchable = require('./internal/_dispatchable'); -var _has = require('./internal/_has'); -var _reduce = require('./internal/_reduce'); -var _xreduceBy = require('./internal/_xreduceBy'); - - -/** - * Groups the elements of the list according to the result of calling - * the String-returning function `keyFn` on each element and reduces the elements - * of each group to a single value via the reducer function `valueFn`. - * - * This function is basically a more general [`groupBy`](#groupBy) function. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category List - * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a} - * @param {Function} valueFn The function that reduces the elements of each group to a single - * value. Receives two values, accumulator for a particular group and the current element. - * @param {*} acc The (initial) accumulator value for each group. - * @param {Function} keyFn The function that maps the list's element into a key. - * @param {Array} list The array to group. - * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of - * `valueFn` for elements which produced that key when passed to `keyFn`. - * @see R.groupBy, R.reduce - * @example - * - * var reduceToNamesBy = R.reduceBy((acc, student) => acc.concat(student.name), []); - * var namesByGrade = reduceToNamesBy(function(student) { - * var score = student.score; - * return score < 65 ? 'F' : - * score < 70 ? 'D' : - * score < 80 ? 'C' : - * score < 90 ? 'B' : 'A'; - * }); - * var students = [{name: 'Lucy', score: 92}, - * {name: 'Drew', score: 85}, - * // ... - * {name: 'Bart', score: 62}]; - * namesByGrade(students); - * // { - * // 'A': ['Lucy'], - * // 'B': ['Drew'] - * // // ..., - * // 'F': ['Bart'] - * // } - */ -module.exports = _curryN(4, [], _dispatchable([], _xreduceBy, - function reduceBy(valueFn, valueAcc, keyFn, list) { - return _reduce(function(acc, elt) { - var key = keyFn(elt); - acc[key] = valueFn(_has(key, acc) ? acc[key] : valueAcc, elt); - return acc; - }, {}, list); - })); diff --git a/node_modules/ramda/src/reduceRight.js b/node_modules/ramda/src/reduceRight.js deleted file mode 100644 index 70c8d2a..0000000 --- a/node_modules/ramda/src/reduceRight.js +++ /dev/null @@ -1,53 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Returns a single item by iterating through the list, successively calling - * the iterator function and passing it an accumulator value and the current - * value from the array, and then passing the result to the next call. - * - * Similar to [`reduce`](#reduce), except moves through the input list from the - * right to the left. - * - * The iterator function receives two values: *(value, acc)*, while the arguments' - * order of `reduce`'s iterator function is *(acc, value)*. - * - * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.reduceRight` method. For more details - * on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a, b -> b) -> b -> [a] -> b - * @param {Function} fn The iterator function. Receives two values, the current element from the array - * and the accumulator. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.addIndex - * @example - * - * R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 - * - -2 - * / \ / \ - * 1 - 1 3 - * / \ / \ - * 2 - ==> 2 -1 - * / \ / \ - * 3 - 3 4 - * / \ / \ - * 4 0 4 0 - * - * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) - */ -module.exports = _curry3(function reduceRight(fn, acc, list) { - var idx = list.length - 1; - while (idx >= 0) { - acc = fn(list[idx], acc); - idx -= 1; - } - return acc; -}); diff --git a/node_modules/ramda/src/reduceWhile.js b/node_modules/ramda/src/reduceWhile.js deleted file mode 100644 index 4e01898..0000000 --- a/node_modules/ramda/src/reduceWhile.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curryN = require('./internal/_curryN'); -var _reduce = require('./internal/_reduce'); -var _reduced = require('./internal/_reduced'); - - -/** - * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating - * through the list, successively calling the iterator function. `reduceWhile` - * also takes a predicate that is evaluated before each step. If the predicate - * returns `false`, it "short-circuits" the iteration and returns the current - * value of the accumulator. - * - * @func - * @memberOf R - * @since v0.22.0 - * @category List - * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a - * @param {Function} pred The predicate. It is passed the accumulator and the - * current element. - * @param {Function} fn The iterator function. Receives two values, the - * accumulator and the current element. - * @param {*} a The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.reduced - * @example - * - * var isOdd = (acc, x) => x % 2 === 1; - * var xs = [1, 3, 5, 60, 777, 800]; - * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9 - * - * var ys = [2, 4, 6] - * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111 - */ -module.exports = _curryN(4, [], function _reduceWhile(pred, fn, a, list) { - return _reduce(function(acc, x) { - return pred(acc, x) ? fn(acc, x) : _reduced(acc); - }, a, list); -}); diff --git a/node_modules/ramda/src/reduced.js b/node_modules/ramda/src/reduced.js deleted file mode 100644 index a0db65a..0000000 --- a/node_modules/ramda/src/reduced.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _reduced = require('./internal/_reduced'); - -/** - * Returns a value wrapped to indicate that it is the final value of the reduce - * and transduce functions. The returned value should be considered a black - * box: the internal structure is not guaranteed to be stable. - * - * Note: this optimization is unavailable to functions not explicitly listed - * above. For instance, it is not currently supported by - * [`reduceRight`](#reduceRight). - * - * @func - * @memberOf R - * @since v0.15.0 - * @category List - * @sig a -> * - * @param {*} x The final value of the reduce. - * @return {*} The wrapped value. - * @see R.reduce, R.transduce - * @example - * - * R.reduce( - * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item), - * [], - * [1, 2, 3, 4, 5]) // [1, 2, 3] - */ - -module.exports = _curry1(_reduced); diff --git a/node_modules/ramda/src/reject.js b/node_modules/ramda/src/reject.js deleted file mode 100644 index 2410dff..0000000 --- a/node_modules/ramda/src/reject.js +++ /dev/null @@ -1,32 +0,0 @@ -var _complement = require('./internal/_complement'); -var _curry2 = require('./internal/_curry2'); -var filter = require('./filter'); - - -/** - * The complement of [`filter`](#filter). - * - * Acts as a transducer if a transformer is given in list position. Filterable - * objects include plain objects or any object that has a filter method such - * as `Array`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} - * @see R.filter, R.transduce, R.addIndex - * @example - * - * var isOdd = (n) => n % 2 === 1; - * - * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] - * - * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ -module.exports = _curry2(function reject(pred, filterable) { - return filter(_complement(pred), filterable); -}); diff --git a/node_modules/ramda/src/remove.js b/node_modules/ramda/src/remove.js deleted file mode 100644 index 815682d..0000000 --- a/node_modules/ramda/src/remove.js +++ /dev/null @@ -1,27 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Removes the sub-list of `list` starting at index `start` and containing - * `count` elements. _Note that this is not destructive_: it returns a copy of - * the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.2.2 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @param {Number} start The position to start removing elements - * @param {Number} count The number of elements to remove - * @param {Array} list The list to remove from - * @return {Array} A new Array with `count` elements from `start` removed. - * @example - * - * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8] - */ -module.exports = _curry3(function remove(start, count, list) { - var result = Array.prototype.slice.call(list, 0); - result.splice(start, count); - return result; -}); diff --git a/node_modules/ramda/src/repeat.js b/node_modules/ramda/src/repeat.js deleted file mode 100644 index d33d560..0000000 --- a/node_modules/ramda/src/repeat.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var always = require('./always'); -var times = require('./times'); - - -/** - * Returns a fixed list of size `n` containing a specified identical value. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig a -> n -> [a] - * @param {*} value The value to repeat. - * @param {Number} n The desired size of the output list. - * @return {Array} A new array containing `n` `value`s. - * @see R.times - * @example - * - * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi'] - * - * var obj = {}; - * var repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}] - * repeatedObjs[0] === repeatedObjs[1]; //=> true - * @symb R.repeat(a, 0) = [] - * @symb R.repeat(a, 1) = [a] - * @symb R.repeat(a, 2) = [a, a] - */ -module.exports = _curry2(function repeat(value, n) { - return times(always(value), n); -}); diff --git a/node_modules/ramda/src/replace.js b/node_modules/ramda/src/replace.js deleted file mode 100644 index 1cfdfd3..0000000 --- a/node_modules/ramda/src/replace.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Replace a substring or regex match in a string with a replacement. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category String - * @sig RegExp|String -> String -> String -> String - * @param {RegExp|String} pattern A regular expression or a substring to match. - * @param {String} replacement The string to replace the matches with. - * @param {String} str The String to do the search and replacement in. - * @return {String} The result. - * @example - * - * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo' - * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo' - * - * // Use the "g" (global) flag to replace all occurrences: - * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar' - */ -module.exports = _curry3(function replace(regex, replacement, str) { - return str.replace(regex, replacement); -}); diff --git a/node_modules/ramda/src/reverse.js b/node_modules/ramda/src/reverse.js deleted file mode 100644 index f3105ce..0000000 --- a/node_modules/ramda/src/reverse.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _isString = require('./internal/_isString'); - - -/** - * Returns a new list or string with the elements or characters in reverse - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {Array|String} list - * @return {Array|String} - * @example - * - * R.reverse([1, 2, 3]); //=> [3, 2, 1] - * R.reverse([1, 2]); //=> [2, 1] - * R.reverse([1]); //=> [1] - * R.reverse([]); //=> [] - * - * R.reverse('abc'); //=> 'cba' - * R.reverse('ab'); //=> 'ba' - * R.reverse('a'); //=> 'a' - * R.reverse(''); //=> '' - */ -module.exports = _curry1(function reverse(list) { - return _isString(list) ? list.split('').reverse().join('') : - Array.prototype.slice.call(list, 0).reverse(); -}); diff --git a/node_modules/ramda/src/scan.js b/node_modules/ramda/src/scan.js deleted file mode 100644 index 5eb901b..0000000 --- a/node_modules/ramda/src/scan.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Scan is similar to [`reduce`](#reduce), but returns a list of successively - * reduced values from the left - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (a,b -> a) -> a -> [b] -> [a] - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {Array} A list of all intermediately reduced values. - * @see R.reduce - * @example - * - * var numbers = [1, 2, 3, 4]; - * var factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24] - * @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)] - */ -module.exports = _curry3(function scan(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = [acc]; - while (idx < len) { - acc = fn(acc, list[idx]); - result[idx + 1] = acc; - idx += 1; - } - return result; -}); diff --git a/node_modules/ramda/src/sequence.js b/node_modules/ramda/src/sequence.js deleted file mode 100644 index 2f9cfca..0000000 --- a/node_modules/ramda/src/sequence.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var ap = require('./ap'); -var map = require('./map'); -var prepend = require('./prepend'); -var reduceRight = require('./reduceRight'); - - -/** - * Transforms a [Traversable](https://github.com/fantasyland/fantasy-land#traversable) - * of [Applicative](https://github.com/fantasyland/fantasy-land#applicative) into an - * Applicative of Traversable. - * - * Dispatches to the `sequence` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (Applicative f, Traversable t) => (a -> f a) -> t (f a) -> f (t a) - * @param {Function} of - * @param {*} traversable - * @return {*} - * @see R.traverse - * @example - * - * R.sequence(Maybe.of, [Just(1), Just(2), Just(3)]); //=> Just([1, 2, 3]) - * R.sequence(Maybe.of, [Just(1), Just(2), Nothing()]); //=> Nothing() - * - * R.sequence(R.of, Just([1, 2, 3])); //=> [Just(1), Just(2), Just(3)] - * R.sequence(R.of, Nothing()); //=> [Nothing()] - */ -module.exports = _curry2(function sequence(of, traversable) { - return typeof traversable.sequence === 'function' ? - traversable.sequence(of) : - reduceRight(function(x, acc) { return ap(map(prepend, x), acc); }, - of([]), - traversable); -}); diff --git a/node_modules/ramda/src/set.js b/node_modules/ramda/src/set.js deleted file mode 100644 index a83efe9..0000000 --- a/node_modules/ramda/src/set.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var always = require('./always'); -var over = require('./over'); - - -/** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the given value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> a -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * var xLens = R.lensProp('x'); - * - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2} - */ -module.exports = _curry3(function set(lens, v, x) { - return over(lens, always(v), x); -}); diff --git a/node_modules/ramda/src/slice.js b/node_modules/ramda/src/slice.js deleted file mode 100644 index 16f85b4..0000000 --- a/node_modules/ramda/src/slice.js +++ /dev/null @@ -1,31 +0,0 @@ -var _checkForMethod = require('./internal/_checkForMethod'); -var _curry3 = require('./internal/_curry3'); - - -/** - * Returns the elements of the given list or string (or object with a `slice` - * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). - * - * Dispatches to the `slice` method of the third argument, if present. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @sig Number -> Number -> String -> String - * @param {Number} fromIndex The start index (inclusive). - * @param {Number} toIndex The end index (exclusive). - * @param {*} list - * @return {*} - * @example - * - * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] - * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] - * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] - * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] - * R.slice(0, 3, 'ramda'); //=> 'ram' - */ -module.exports = _curry3(_checkForMethod('slice', function slice(fromIndex, toIndex, list) { - return Array.prototype.slice.call(list, fromIndex, toIndex); -})); diff --git a/node_modules/ramda/src/sort.js b/node_modules/ramda/src/sort.js deleted file mode 100644 index 1132fc8..0000000 --- a/node_modules/ramda/src/sort.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a copy of the list, sorted according to the comparator function, - * which should accept two values at a time and return a negative number if the - * first value is smaller, a positive number if it's larger, and zero if they - * are equal. Please note that this is a **copy** of the list. It does not - * modify the original. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a,a -> Number) -> [a] -> [a] - * @param {Function} comparator A sorting function :: a -> b -> Int - * @param {Array} list The list to sort - * @return {Array} a new array with its elements sorted by the comparator function. - * @example - * - * var diff = function(a, b) { return a - b; }; - * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7] - */ -module.exports = _curry2(function sort(comparator, list) { - return Array.prototype.slice.call(list, 0).sort(comparator); -}); diff --git a/node_modules/ramda/src/sortBy.js b/node_modules/ramda/src/sortBy.js deleted file mode 100644 index 7351e3b..0000000 --- a/node_modules/ramda/src/sortBy.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Sorts the list according to the supplied function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord b => (a -> b) -> [a] -> [a] - * @param {Function} fn - * @param {Array} list The list to sort. - * @return {Array} A new list sorted by the keys generated by `fn`. - * @example - * - * var sortByFirstItem = R.sortBy(R.prop(0)); - * var sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name'))); - * var pairs = [[-1, 1], [-2, 2], [-3, 3]]; - * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]] - * var alice = { - * name: 'ALICE', - * age: 101 - * }; - * var bob = { - * name: 'Bob', - * age: -10 - * }; - * var clara = { - * name: 'clara', - * age: 314.159 - * }; - * var people = [clara, bob, alice]; - * sortByNameCaseInsensitive(people); //=> [alice, bob, clara] - */ -module.exports = _curry2(function sortBy(fn, list) { - return Array.prototype.slice.call(list, 0).sort(function(a, b) { - var aa = fn(a); - var bb = fn(b); - return aa < bb ? -1 : aa > bb ? 1 : 0; - }); -}); diff --git a/node_modules/ramda/src/sortWith.js b/node_modules/ramda/src/sortWith.js deleted file mode 100644 index 3dac50c..0000000 --- a/node_modules/ramda/src/sortWith.js +++ /dev/null @@ -1,46 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Sorts a list according to a list of comparators. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Relation - * @sig [a -> a -> Number] -> [a] -> [a] - * @param {Array} functions A list of comparator functions. - * @param {Array} list The list to sort. - * @return {Array} A new list sorted according to the comarator functions. - * @example - * - * var alice = { - * name: 'alice', - * age: 40 - * }; - * var bob = { - * name: 'bob', - * age: 30 - * }; - * var clara = { - * name: 'clara', - * age: 40 - * }; - * var people = [clara, bob, alice]; - * var ageNameSort = R.sortWith([ - * R.descend(R.prop('age')), - * R.ascend(R.prop('name')) - * ]); - * ageNameSort(people); //=> [alice, clara, bob] - */ -module.exports = _curry2(function sortWith(fns, list) { - return Array.prototype.slice.call(list, 0).sort(function(a, b) { - var result = 0; - var i = 0; - while (result === 0 && i < fns.length) { - result = fns[i](a, b); - i += 1; - } - return result; - }); -}); diff --git a/node_modules/ramda/src/split.js b/node_modules/ramda/src/split.js deleted file mode 100644 index 70c4318..0000000 --- a/node_modules/ramda/src/split.js +++ /dev/null @@ -1,24 +0,0 @@ -var invoker = require('./invoker'); - - -/** - * Splits a string into an array of strings based on the given - * separator. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category String - * @sig (String | RegExp) -> String -> [String] - * @param {String|RegExp} sep The pattern. - * @param {String} str The string to separate into an array. - * @return {Array} The array of strings from `str` separated by `str`. - * @see R.join - * @example - * - * var pathComponents = R.split('/'); - * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node'] - * - * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd'] - */ -module.exports = invoker(1, 'split'); diff --git a/node_modules/ramda/src/splitAt.js b/node_modules/ramda/src/splitAt.js deleted file mode 100644 index 9176e18..0000000 --- a/node_modules/ramda/src/splitAt.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var length = require('./length'); -var slice = require('./slice'); - - -/** - * Splits a given list or string at a given index. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig Number -> [a] -> [[a], [a]] - * @sig Number -> String -> [String, String] - * @param {Number} index The index where the array/string is split. - * @param {Array|String} array The array/string to be split. - * @return {Array} - * @example - * - * R.splitAt(1, [1, 2, 3]); //=> [[1], [2, 3]] - * R.splitAt(5, 'hello world'); //=> ['hello', ' world'] - * R.splitAt(-1, 'foobar'); //=> ['fooba', 'r'] - */ -module.exports = _curry2(function splitAt(index, array) { - return [slice(0, index, array), slice(index, length(array), array)]; -}); diff --git a/node_modules/ramda/src/splitEvery.js b/node_modules/ramda/src/splitEvery.js deleted file mode 100644 index 0f0d8f9..0000000 --- a/node_modules/ramda/src/splitEvery.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var slice = require('./slice'); - - -/** - * Splits a collection into slices of the specified length. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [[a]] - * @sig Number -> String -> [String] - * @param {Number} n - * @param {Array} list - * @return {Array} - * @example - * - * R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]] - * R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz'] - */ -module.exports = _curry2(function splitEvery(n, list) { - if (n <= 0) { - throw new Error('First argument to splitEvery must be a positive integer'); - } - var result = []; - var idx = 0; - while (idx < list.length) { - result.push(slice(idx, idx += n, list)); - } - return result; -}); diff --git a/node_modules/ramda/src/splitWhen.js b/node_modules/ramda/src/splitWhen.js deleted file mode 100644 index 4255251..0000000 --- a/node_modules/ramda/src/splitWhen.js +++ /dev/null @@ -1,34 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Takes a list and a predicate and returns a pair of lists with the following properties: - * - * - the result of concatenating the two output lists is equivalent to the input list; - * - none of the elements of the first output list satisfies the predicate; and - * - if the second output list is non-empty, its first element satisfies the predicate. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [[a], [a]] - * @param {Function} pred The predicate that determines where the array is split. - * @param {Array} list The array to be split. - * @return {Array} - * @example - * - * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] - */ -module.exports = _curry2(function splitWhen(pred, list) { - var idx = 0; - var len = list.length; - var prefix = []; - - while (idx < len && !pred(list[idx])) { - prefix.push(list[idx]); - idx += 1; - } - - return [prefix, Array.prototype.slice.call(list, idx)]; -}); diff --git a/node_modules/ramda/src/startsWith.js b/node_modules/ramda/src/startsWith.js deleted file mode 100644 index 59a065d..0000000 --- a/node_modules/ramda/src/startsWith.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var equals = require('./equals'); -var take = require('./take'); - -/** - * Checks if a list starts with the provided values - * - * @func - * @memberOf R - * @since v0.24.0 - * @category List - * @sig [a] -> Boolean - * @sig String -> Boolean - * @param {*} prefix - * @param {*} list - * @return {Boolean} - * @example - * - * R.startsWith('a', 'abc') //=> true - * R.startsWith('b', 'abc') //=> false - * R.startsWith(['a'], ['a', 'b', 'c']) //=> true - * R.startsWith(['b'], ['a', 'b', 'c']) //=> false - */ -module.exports = _curry2(function(prefix, list) { - return equals(take(prefix.length, list), prefix); -}); diff --git a/node_modules/ramda/src/subtract.js b/node_modules/ramda/src/subtract.js deleted file mode 100644 index 8ee1201..0000000 --- a/node_modules/ramda/src/subtract.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Subtracts its second argument from its first argument. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a - b`. - * @see R.add - * @example - * - * R.subtract(10, 8); //=> 2 - * - * var minus5 = R.subtract(R.__, 5); - * minus5(17); //=> 12 - * - * var complementaryAngle = R.subtract(90); - * complementaryAngle(30); //=> 60 - * complementaryAngle(72); //=> 18 - */ -module.exports = _curry2(function subtract(a, b) { - return Number(a) - Number(b); -}); diff --git a/node_modules/ramda/src/sum.js b/node_modules/ramda/src/sum.js deleted file mode 100644 index 309d8e6..0000000 --- a/node_modules/ramda/src/sum.js +++ /dev/null @@ -1,20 +0,0 @@ -var add = require('./add'); -var reduce = require('./reduce'); - - -/** - * Adds together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The sum of all the numbers in the list. - * @see R.reduce - * @example - * - * R.sum([2,4,6,8,100,1]); //=> 121 - */ -module.exports = reduce(add, 0); diff --git a/node_modules/ramda/src/symmetricDifference.js b/node_modules/ramda/src/symmetricDifference.js deleted file mode 100644 index 28ba217..0000000 --- a/node_modules/ramda/src/symmetricDifference.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var concat = require('./concat'); -var difference = require('./difference'); - - -/** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifferenceWith, R.difference, R.differenceWith - * @example - * - * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] - * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] - */ -module.exports = _curry2(function symmetricDifference(list1, list2) { - return concat(difference(list1, list2), difference(list2, list1)); -}); diff --git a/node_modules/ramda/src/symmetricDifferenceWith.js b/node_modules/ramda/src/symmetricDifferenceWith.js deleted file mode 100644 index 077898a..0000000 --- a/node_modules/ramda/src/symmetricDifferenceWith.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var concat = require('./concat'); -var differenceWith = require('./differenceWith'); - - -/** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. Duplication is determined according to the value - * returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifference, R.difference, R.differenceWith - * @example - * - * var eqA = R.eqBy(R.prop('a')); - * var l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; - * var l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; - * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] - */ -module.exports = _curry3(function symmetricDifferenceWith(pred, list1, list2) { - return concat(differenceWith(pred, list1, list2), differenceWith(pred, list2, list1)); -}); diff --git a/node_modules/ramda/src/tail.js b/node_modules/ramda/src/tail.js deleted file mode 100644 index d43b05c..0000000 --- a/node_modules/ramda/src/tail.js +++ /dev/null @@ -1,33 +0,0 @@ -var _checkForMethod = require('./internal/_checkForMethod'); -var _curry1 = require('./internal/_curry1'); -var slice = require('./slice'); - - -/** - * Returns all but the first element of the given list or string (or object - * with a `tail` method). - * - * Dispatches to the `slice` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.head, R.init, R.last - * @example - * - * R.tail([1, 2, 3]); //=> [2, 3] - * R.tail([1, 2]); //=> [2] - * R.tail([1]); //=> [] - * R.tail([]); //=> [] - * - * R.tail('abc'); //=> 'bc' - * R.tail('ab'); //=> 'b' - * R.tail('a'); //=> '' - * R.tail(''); //=> '' - */ -module.exports = _curry1(_checkForMethod('tail', slice(1, Infinity))); diff --git a/node_modules/ramda/src/take.js b/node_modules/ramda/src/take.js deleted file mode 100644 index 38427f3..0000000 --- a/node_modules/ramda/src/take.js +++ /dev/null @@ -1,52 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xtake = require('./internal/_xtake'); -var slice = require('./slice'); - - -/** - * Returns the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `take` method). - * - * Dispatches to the `take` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} - * @see R.drop - * @example - * - * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(3, 'ramda'); //=> 'ram' - * - * var personnel = [ - * 'Dave Brubeck', - * 'Paul Desmond', - * 'Eugene Wright', - * 'Joe Morello', - * 'Gerry Mulligan', - * 'Bob Bates', - * 'Joe Dodge', - * 'Ron Crotty' - * ]; - * - * var takeFive = R.take(5); - * takeFive(personnel); - * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] - * @symb R.take(-1, [a, b]) = [a, b] - * @symb R.take(0, [a, b]) = [] - * @symb R.take(1, [a, b]) = [a] - * @symb R.take(2, [a, b]) = [a, b] - */ -module.exports = _curry2(_dispatchable(['take'], _xtake, function take(n, xs) { - return slice(0, n < 0 ? Infinity : n, xs); -})); diff --git a/node_modules/ramda/src/takeLast.js b/node_modules/ramda/src/takeLast.js deleted file mode 100644 index ebf403f..0000000 --- a/node_modules/ramda/src/takeLast.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var drop = require('./drop'); - - -/** - * Returns a new list containing the last `n` elements of the given list. - * If `n > list.length`, returns a list of `list.length` elements. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements to return. - * @param {Array} xs The collection to consider. - * @return {Array} - * @see R.dropLast - * @example - * - * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(3, 'ramda'); //=> 'mda' - */ -module.exports = _curry2(function takeLast(n, xs) { - return drop(n >= 0 ? xs.length - n : 0, xs); -}); diff --git a/node_modules/ramda/src/takeLastWhile.js b/node_modules/ramda/src/takeLastWhile.js deleted file mode 100644 index 1ae618c..0000000 --- a/node_modules/ramda/src/takeLastWhile.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a new list containing the last `n` elements of a given list, passing - * each value to the supplied predicate function, and terminating when the - * predicate function returns `false`. Excludes the element that caused the - * predicate function to fail. The predicate function is passed one argument: - * *(value)*. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @param {Function} fn The function called per iteration. - * @param {Array} list The collection to iterate over. - * @return {Array} A new array. - * @see R.dropLastWhile, R.addIndex - * @example - * - * var isNotOne = x => x !== 1; - * - * R.takeLastWhile(isNotOne, [1, 2, 3, 4]); //=> [2, 3, 4] - */ -module.exports = _curry2(function takeLastWhile(fn, list) { - var idx = list.length - 1; - while (idx >= 0 && fn(list[idx])) { - idx -= 1; - } - return Array.prototype.slice.call(list, idx + 1); -}); diff --git a/node_modules/ramda/src/takeWhile.js b/node_modules/ramda/src/takeWhile.js deleted file mode 100644 index 471cb03..0000000 --- a/node_modules/ramda/src/takeWhile.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _dispatchable = require('./internal/_dispatchable'); -var _xtakeWhile = require('./internal/_xtakeWhile'); - - -/** - * Returns a new list containing the first `n` elements of a given list, - * passing each value to the supplied predicate function, and terminating when - * the predicate function returns `false`. Excludes the element that caused the - * predicate function to fail. The predicate function is passed one argument: - * *(value)*. - * - * Dispatches to the `takeWhile` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @param {Function} fn The function called per iteration. - * @param {Array} list The collection to iterate over. - * @return {Array} A new array. - * @see R.dropWhile, R.transduce, R.addIndex - * @example - * - * var isNotFour = x => x !== 4; - * - * R.takeWhile(isNotFour, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3] - */ -module.exports = _curry2(_dispatchable(['takeWhile'], _xtakeWhile, function takeWhile(fn, list) { - var idx = 0; - var len = list.length; - while (idx < len && fn(list[idx])) { - idx += 1; - } - return Array.prototype.slice.call(list, 0, idx); -})); diff --git a/node_modules/ramda/src/tap.js b/node_modules/ramda/src/tap.js deleted file mode 100644 index 69e22c3..0000000 --- a/node_modules/ramda/src/tap.js +++ /dev/null @@ -1,25 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Runs the given function with the supplied object, then returns the object. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a -> *) -> a -> a - * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. - * @param {*} x - * @return {*} `x`. - * @example - * - * var sayX = x => console.log('x is ' + x); - * R.tap(sayX, 100); //=> 100 - * // logs 'x is 100' - * @symb R.tap(f, a) = a - */ -module.exports = _curry2(function tap(fn, x) { - fn(x); - return x; -}); diff --git a/node_modules/ramda/src/test.js b/node_modules/ramda/src/test.js deleted file mode 100644 index ae78540..0000000 --- a/node_modules/ramda/src/test.js +++ /dev/null @@ -1,29 +0,0 @@ -var _cloneRegExp = require('./internal/_cloneRegExp'); -var _curry2 = require('./internal/_curry2'); -var _isRegExp = require('./internal/_isRegExp'); -var toString = require('./toString'); - - -/** - * Determines whether a given string matches a given regular expression. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category String - * @sig RegExp -> String -> Boolean - * @param {RegExp} pattern - * @param {String} str - * @return {Boolean} - * @see R.match - * @example - * - * R.test(/^x/, 'xyz'); //=> true - * R.test(/^y/, 'xyz'); //=> false - */ -module.exports = _curry2(function test(pattern, str) { - if (!_isRegExp(pattern)) { - throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + toString(pattern)); - } - return _cloneRegExp(pattern).test(str); -}); diff --git a/node_modules/ramda/src/times.js b/node_modules/ramda/src/times.js deleted file mode 100644 index 49af254..0000000 --- a/node_modules/ramda/src/times.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Calls an input function `n` times, returning an array containing the results - * of those function calls. - * - * `fn` is passed one argument: The current value of `n`, which begins at `0` - * and is gradually incremented to `n - 1`. - * - * @func - * @memberOf R - * @since v0.2.3 - * @category List - * @sig (Number -> a) -> Number -> [a] - * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. - * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. - * @return {Array} An array containing the return values of all calls to `fn`. - * @see R.repeat - * @example - * - * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] - * @symb R.times(f, 0) = [] - * @symb R.times(f, 1) = [f(0)] - * @symb R.times(f, 2) = [f(0), f(1)] - */ -module.exports = _curry2(function times(fn, n) { - var len = Number(n); - var idx = 0; - var list; - - if (len < 0 || isNaN(len)) { - throw new RangeError('n must be a non-negative number'); - } - list = new Array(len); - while (idx < len) { - list[idx] = fn(idx); - idx += 1; - } - return list; -}); diff --git a/node_modules/ramda/src/toLower.js b/node_modules/ramda/src/toLower.js deleted file mode 100644 index eede0fe..0000000 --- a/node_modules/ramda/src/toLower.js +++ /dev/null @@ -1,19 +0,0 @@ -var invoker = require('./invoker'); - - -/** - * The lower case version of a string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category String - * @sig String -> String - * @param {String} str The string to lower case. - * @return {String} The lower case version of `str`. - * @see R.toUpper - * @example - * - * R.toLower('XYZ'); //=> 'xyz' - */ -module.exports = invoker(0, 'toLowerCase'); diff --git a/node_modules/ramda/src/toPairs.js b/node_modules/ramda/src/toPairs.js deleted file mode 100644 index 033228d..0000000 --- a/node_modules/ramda/src/toPairs.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _has = require('./internal/_has'); - - -/** - * Converts an object into an array of key, value arrays. Only the object's - * own properties are used. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Object - * @sig {String: *} -> [[String,*]] - * @param {Object} obj The object to extract from - * @return {Array} An array of key, value arrays from the object's own properties. - * @see R.fromPairs - * @example - * - * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]] - */ -module.exports = _curry1(function toPairs(obj) { - var pairs = []; - for (var prop in obj) { - if (_has(prop, obj)) { - pairs[pairs.length] = [prop, obj[prop]]; - } - } - return pairs; -}); diff --git a/node_modules/ramda/src/toPairsIn.js b/node_modules/ramda/src/toPairsIn.js deleted file mode 100644 index 3f1b2eb..0000000 --- a/node_modules/ramda/src/toPairsIn.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Converts an object into an array of key, value arrays. The object's own - * properties and prototype properties are used. Note that the order of the - * output array is not guaranteed to be consistent across different JS - * platforms. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Object - * @sig {String: *} -> [[String,*]] - * @param {Object} obj The object to extract from - * @return {Array} An array of key, value arrays from the object's own - * and prototype properties. - * @example - * - * var F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * var f = new F(); - * R.toPairsIn(f); //=> [['x','X'], ['y','Y']] - */ -module.exports = _curry1(function toPairsIn(obj) { - var pairs = []; - for (var prop in obj) { - pairs[pairs.length] = [prop, obj[prop]]; - } - return pairs; -}); diff --git a/node_modules/ramda/src/toString.js b/node_modules/ramda/src/toString.js deleted file mode 100644 index e9aa904..0000000 --- a/node_modules/ramda/src/toString.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var _toString = require('./internal/_toString'); - - -/** - * Returns the string representation of the given value. `eval`'ing the output - * should result in a value equivalent to the input value. Many of the built-in - * `toString` methods do not satisfy this requirement. - * - * If the given value is an `[object Object]` with a `toString` method other - * than `Object.prototype.toString`, this method is invoked with no arguments - * to produce the return value. This means user-defined constructor functions - * can provide a suitable `toString` method. For example: - * - * function Point(x, y) { - * this.x = x; - * this.y = y; - * } - * - * Point.prototype.toString = function() { - * return 'new Point(' + this.x + ', ' + this.y + ')'; - * }; - * - * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)' - * - * @func - * @memberOf R - * @since v0.14.0 - * @category String - * @sig * -> String - * @param {*} val - * @return {String} - * @example - * - * R.toString(42); //=> '42' - * R.toString('abc'); //=> '"abc"' - * R.toString([1, 2, 3]); //=> '[1, 2, 3]' - * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}' - * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")' - */ -module.exports = _curry1(function toString(val) { return _toString(val, []); }); diff --git a/node_modules/ramda/src/toUpper.js b/node_modules/ramda/src/toUpper.js deleted file mode 100644 index a72f4f2..0000000 --- a/node_modules/ramda/src/toUpper.js +++ /dev/null @@ -1,19 +0,0 @@ -var invoker = require('./invoker'); - - -/** - * The upper case version of a string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category String - * @sig String -> String - * @param {String} str The string to upper case. - * @return {String} The upper case version of `str`. - * @see R.toLower - * @example - * - * R.toUpper('abc'); //=> 'ABC' - */ -module.exports = invoker(0, 'toUpperCase'); diff --git a/node_modules/ramda/src/transduce.js b/node_modules/ramda/src/transduce.js deleted file mode 100644 index b1ee300..0000000 --- a/node_modules/ramda/src/transduce.js +++ /dev/null @@ -1,55 +0,0 @@ -var _reduce = require('./internal/_reduce'); -var _xwrap = require('./internal/_xwrap'); -var curryN = require('./curryN'); - - -/** - * Initializes a transducer using supplied iterator function. Returns a single - * item by iterating through the list, successively calling the transformed - * iterator function and passing it an accumulator value and the current value - * from the array, and then passing the result to the next call. - * - * The iterator function receives two values: *(acc, value)*. It will be - * wrapped as a transformer to initialize the transducer. A transformer can be - * passed directly in place of an iterator function. In both cases, iteration - * may be stopped early with the [`R.reduced`](#reduced) function. - * - * A transducer is a function that accepts a transformer and returns a - * transformer and can be composed directly. - * - * A transformer is an an object that provides a 2-arity reducing iterator - * function, step, 0-arity initial value function, init, and 1-arity result - * extraction function, result. The step function is used as the iterator - * function in reduce. The result function is used to convert the final - * accumulator into the return type and in most cases is - * [`R.identity`](#identity). The init function can be used to provide an - * initial accumulator, but is ignored by transduce. - * - * The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig (c -> c) -> ((a, b) -> a) -> a -> [b] -> a - * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array. Wrapped as transformer, if necessary, and used to - * initialize the transducer - * @param {*} acc The initial accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.reduced, R.into - * @example - * - * var numbers = [1, 2, 3, 4]; - * var transducer = R.compose(R.map(R.add(1)), R.take(2)); - * R.transduce(transducer, R.flip(R.append), [], numbers); //=> [2, 3] - * - * var isOdd = (x) => x % 2 === 1; - * var firstOddTransducer = R.compose(R.filter(isOdd), R.take(1)); - * R.transduce(firstOddTransducer, R.flip(R.append), [], R.range(0, 100)); //=> [1] - */ -module.exports = curryN(4, function transduce(xf, fn, acc, list) { - return _reduce(xf(typeof fn === 'function' ? _xwrap(fn) : fn), acc, list); -}); diff --git a/node_modules/ramda/src/transpose.js b/node_modules/ramda/src/transpose.js deleted file mode 100644 index ca2ad6e..0000000 --- a/node_modules/ramda/src/transpose.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Transposes the rows and columns of a 2D list. - * When passed a list of `n` lists of length `x`, - * returns a list of `x` lists of length `n`. - * - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [[a]] -> [[a]] - * @param {Array} list A 2D list - * @return {Array} A 2D list - * @example - * - * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']] - * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']] - * - * // If some of the rows are shorter than the following rows, their elements are skipped: - * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] - * @symb R.transpose([[a], [b], [c]]) = [a, b, c] - * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]] - * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]] - */ -module.exports = _curry1(function transpose(outerlist) { - var i = 0; - var result = []; - while (i < outerlist.length) { - var innerlist = outerlist[i]; - var j = 0; - while (j < innerlist.length) { - if (typeof result[j] === 'undefined') { - result[j] = []; - } - result[j].push(innerlist[j]); - j += 1; - } - i += 1; - } - return result; -}); diff --git a/node_modules/ramda/src/traverse.js b/node_modules/ramda/src/traverse.js deleted file mode 100644 index 9ab6c74..0000000 --- a/node_modules/ramda/src/traverse.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var map = require('./map'); -var sequence = require('./sequence'); - - -/** - * Maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning - * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable), - * then uses [`sequence`](#sequence) to transform the resulting Traversable of Applicative - * into an Applicative of Traversable. - * - * Dispatches to the `sequence` method of the third argument, if present. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (Applicative f, Traversable t) => (a -> f a) -> (a -> f b) -> t a -> f (t b) - * @param {Function} of - * @param {Function} f - * @param {*} traversable - * @return {*} - * @see R.sequence - * @example - * - * // Returns `Nothing` if the given divisor is `0` - * safeDiv = n => d => d === 0 ? Nothing() : Just(n / d) - * - * R.traverse(Maybe.of, safeDiv(10), [2, 4, 5]); //=> Just([5, 2.5, 2]) - * R.traverse(Maybe.of, safeDiv(10), [2, 0, 5]); //=> Nothing - */ -module.exports = _curry3(function traverse(of, f, traversable) { - return typeof traversable['fantasy-land/traverse'] === 'function' ? - traversable['fantasy-land/traverse'](f, of) : - sequence(of, map(f, traversable)); -}); diff --git a/node_modules/ramda/src/trim.js b/node_modules/ramda/src/trim.js deleted file mode 100644 index fb9e5f3..0000000 --- a/node_modules/ramda/src/trim.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Removes (strips) whitespace from both ends of the string. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category String - * @sig String -> String - * @param {String} str The string to trim. - * @return {String} Trimmed version of `str`. - * @example - * - * R.trim(' xyz '); //=> 'xyz' - * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z'] - */ -module.exports = (function() { - var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + - '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + - '\u2029\uFEFF'; - var zeroWidth = '\u200b'; - var hasProtoTrim = (typeof String.prototype.trim === 'function'); - if (!hasProtoTrim || (ws.trim() || !zeroWidth.trim())) { - return _curry1(function trim(str) { - var beginRx = new RegExp('^[' + ws + '][' + ws + ']*'); - var endRx = new RegExp('[' + ws + '][' + ws + ']*$'); - return str.replace(beginRx, '').replace(endRx, ''); - }); - } else { - return _curry1(function trim(str) { - return str.trim(); - }); - } -}()); diff --git a/node_modules/ramda/src/tryCatch.js b/node_modules/ramda/src/tryCatch.js deleted file mode 100644 index 799603c..0000000 --- a/node_modules/ramda/src/tryCatch.js +++ /dev/null @@ -1,35 +0,0 @@ -var _arity = require('./internal/_arity'); -var _concat = require('./internal/_concat'); -var _curry2 = require('./internal/_curry2'); - - -/** - * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned - * function evaluates the `tryer`; if it does not throw, it simply returns the - * result. If the `tryer` *does* throw, the returned function evaluates the - * `catcher` function and returns its result. Note that for effective - * composition with this function, both the `tryer` and `catcher` functions - * must return the same type of results. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Function - * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) - * @param {Function} tryer The function that may throw. - * @param {Function} catcher The function that will be evaluated if `tryer` throws. - * @return {Function} A new function that will catch exceptions and send then to the catcher. - * @example - * - * R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true - * R.tryCatch(R.prop('x'), R.F)(null); //=> false - */ -module.exports = _curry2(function _tryCatch(tryer, catcher) { - return _arity(tryer.length, function() { - try { - return tryer.apply(this, arguments); - } catch (e) { - return catcher.apply(this, _concat([e], arguments)); - } - }); -}); diff --git a/node_modules/ramda/src/type.js b/node_modules/ramda/src/type.js deleted file mode 100644 index b16855c..0000000 --- a/node_modules/ramda/src/type.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Gives a single-word string description of the (native) type of a value, - * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not - * attempt to distinguish user Object types any further, reporting them all as - * 'Object'. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Type - * @sig (* -> {*}) -> String - * @param {*} val The value to test - * @return {String} - * @example - * - * R.type({}); //=> "Object" - * R.type(1); //=> "Number" - * R.type(false); //=> "Boolean" - * R.type('s'); //=> "String" - * R.type(null); //=> "Null" - * R.type([]); //=> "Array" - * R.type(/[A-z]/); //=> "RegExp" - * R.type(() => {}); //=> "Function" - */ -module.exports = _curry1(function type(val) { - return val === null ? 'Null' : - val === undefined ? 'Undefined' : - Object.prototype.toString.call(val).slice(8, -1); -}); diff --git a/node_modules/ramda/src/unapply.js b/node_modules/ramda/src/unapply.js deleted file mode 100644 index b988cbc..0000000 --- a/node_modules/ramda/src/unapply.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Takes a function `fn`, which takes a single array argument, and returns a - * function which: - * - * - takes any number of positional arguments; - * - passes these arguments to `fn` as an array; and - * - returns the result. - * - * In other words, `R.unapply` derives a variadic function from a function which - * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Function - * @sig ([*...] -> a) -> (*... -> a) - * @param {Function} fn - * @return {Function} - * @see R.apply - * @example - * - * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' - * @symb R.unapply(f)(a, b) = f([a, b]) - */ -module.exports = _curry1(function unapply(fn) { - return function() { - return fn(Array.prototype.slice.call(arguments, 0)); - }; -}); diff --git a/node_modules/ramda/src/unary.js b/node_modules/ramda/src/unary.js deleted file mode 100644 index b21c6d0..0000000 --- a/node_modules/ramda/src/unary.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var nAry = require('./nAry'); - - -/** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 1 parameter. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> b) -> (a -> b) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 1. - * @see R.binary, R.nAry - * @example - * - * var takesTwoArgs = function(a, b) { - * return [a, b]; - * }; - * takesTwoArgs.length; //=> 2 - * takesTwoArgs(1, 2); //=> [1, 2] - * - * var takesOneArg = R.unary(takesTwoArgs); - * takesOneArg.length; //=> 1 - * // Only 1 argument is passed to the wrapped function - * takesOneArg(1, 2); //=> [1, undefined] - * @symb R.unary(f)(a, b, c) = f(a) - */ -module.exports = _curry1(function unary(fn) { - return nAry(1, fn); -}); diff --git a/node_modules/ramda/src/uncurryN.js b/node_modules/ramda/src/uncurryN.js deleted file mode 100644 index 8611e4f..0000000 --- a/node_modules/ramda/src/uncurryN.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var curryN = require('./curryN'); - - -/** - * Returns a function of arity `n` from a (manually) curried function. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Function - * @sig Number -> (a -> b) -> (a -> c) - * @param {Number} length The arity for the returned function. - * @param {Function} fn The function to uncurry. - * @return {Function} A new function. - * @see R.curry - * @example - * - * var addFour = a => b => c => d => a + b + c + d; - * - * var uncurriedAddFour = R.uncurryN(4, addFour); - * uncurriedAddFour(1, 2, 3, 4); //=> 10 - */ -module.exports = _curry2(function uncurryN(depth, fn) { - return curryN(depth, function() { - var currentDepth = 1; - var value = fn; - var idx = 0; - var endIdx; - while (currentDepth <= depth && typeof value === 'function') { - endIdx = currentDepth === depth ? arguments.length : idx + value.length; - value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx)); - currentDepth += 1; - idx = endIdx; - } - return value; - }); -}); diff --git a/node_modules/ramda/src/unfold.js b/node_modules/ramda/src/unfold.js deleted file mode 100644 index d3af149..0000000 --- a/node_modules/ramda/src/unfold.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Builds a list from a seed value. Accepts an iterator function, which returns - * either false to stop iteration or an array of length 2 containing the value - * to add to the resulting list and the seed to be used in the next call to the - * iterator function. - * - * The iterator function receives one argument: *(seed)*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (a -> [b]) -> * -> [b] - * @param {Function} fn The iterator function. receives one argument, `seed`, and returns - * either false to quit iteration or an array of length two to proceed. The element - * at index 0 of this array will be added to the resulting array, and the element - * at index 1 will be passed to the next call to `fn`. - * @param {*} seed The seed value. - * @return {Array} The final list. - * @example - * - * var f = n => n > 50 ? false : [-n, n + 10]; - * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] - * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] - */ -module.exports = _curry2(function unfold(fn, seed) { - var pair = fn(seed); - var result = []; - while (pair && pair.length) { - result[result.length] = pair[0]; - pair = fn(pair[1]); - } - return result; -}); diff --git a/node_modules/ramda/src/union.js b/node_modules/ramda/src/union.js deleted file mode 100644 index 669298f..0000000 --- a/node_modules/ramda/src/union.js +++ /dev/null @@ -1,24 +0,0 @@ -var _concat = require('./internal/_concat'); -var _curry2 = require('./internal/_curry2'); -var compose = require('./compose'); -var uniq = require('./uniq'); - - -/** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} as The first list. - * @param {Array} bs The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @example - * - * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4] - */ -module.exports = _curry2(compose(uniq, _concat)); diff --git a/node_modules/ramda/src/unionWith.js b/node_modules/ramda/src/unionWith.js deleted file mode 100644 index 6d9254d..0000000 --- a/node_modules/ramda/src/unionWith.js +++ /dev/null @@ -1,30 +0,0 @@ -var _concat = require('./internal/_concat'); -var _curry3 = require('./internal/_curry3'); -var uniqWith = require('./uniqWith'); - - -/** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. Duplication is determined according to the value returned by - * applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig (a -> a -> Boolean) -> [*] -> [*] -> [*] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @see R.union - * @example - * - * var l1 = [{a: 1}, {a: 2}]; - * var l2 = [{a: 1}, {a: 4}]; - * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] - */ -module.exports = _curry3(function unionWith(pred, list1, list2) { - return uniqWith(pred, _concat(list1, list2)); -}); diff --git a/node_modules/ramda/src/uniq.js b/node_modules/ramda/src/uniq.js deleted file mode 100644 index 1501a86..0000000 --- a/node_modules/ramda/src/uniq.js +++ /dev/null @@ -1,22 +0,0 @@ -var identity = require('./identity'); -var uniqBy = require('./uniqBy'); - - -/** - * Returns a new list containing only one copy of each element in the original - * list. [`R.equals`](#equals) is used to determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniq([1, 1, 2, 1]); //=> [1, 2] - * R.uniq([1, '1']); //=> [1, '1'] - * R.uniq([[42], [42]]); //=> [[42]] - */ -module.exports = uniqBy(identity); diff --git a/node_modules/ramda/src/uniqBy.js b/node_modules/ramda/src/uniqBy.js deleted file mode 100644 index 1ada181..0000000 --- a/node_modules/ramda/src/uniqBy.js +++ /dev/null @@ -1,38 +0,0 @@ -var _Set = require('./internal/_Set'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a new list containing only one copy of each element in the original - * list, based upon the value returned by applying the supplied function to - * each list element. Prefers the first item if the supplied function produces - * the same value on two items. [`R.equals`](#equals) is used for comparison. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> b) -> [a] -> [a] - * @param {Function} fn A function used to produce a value to use during comparisons. - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10] - */ -module.exports = _curry2(function uniqBy(fn, list) { - var set = new _Set(); - var result = []; - var idx = 0; - var appliedItem, item; - - while (idx < list.length) { - item = list[idx]; - appliedItem = fn(item); - if (set.add(appliedItem)) { - result.push(item); - } - idx += 1; - } - return result; -}); diff --git a/node_modules/ramda/src/uniqWith.js b/node_modules/ramda/src/uniqWith.js deleted file mode 100644 index 8553e72..0000000 --- a/node_modules/ramda/src/uniqWith.js +++ /dev/null @@ -1,40 +0,0 @@ -var _containsWith = require('./internal/_containsWith'); -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a new list containing only one copy of each element in the original - * list, based upon the value returned by applying the supplied predicate to - * two list elements. Prefers the first item if two items compare equal based - * on the predicate. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category List - * @sig (a, a -> Boolean) -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * var strEq = R.eqBy(String); - * R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2] - * R.uniqWith(strEq)([{}, {}]); //=> [{}] - * R.uniqWith(strEq)([1, '1', 1]); //=> [1] - * R.uniqWith(strEq)(['1', 1, 1]); //=> ['1'] - */ -module.exports = _curry2(function uniqWith(pred, list) { - var idx = 0; - var len = list.length; - var result = []; - var item; - while (idx < len) { - item = list[idx]; - if (!_containsWith(pred, item, result)) { - result[result.length] = item; - } - idx += 1; - } - return result; -}); diff --git a/node_modules/ramda/src/unless.js b/node_modules/ramda/src/unless.js deleted file mode 100644 index 0676611..0000000 --- a/node_modules/ramda/src/unless.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is not satisfied, the function will return the result of - * calling the `whenFalseFn` function with the same argument. If the predicate - * is satisfied, the argument is returned as is. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenFalseFn A function to invoke when the `pred` evaluates - * to a falsy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenFalseFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenFalseFn`. - * @see R.ifElse, R.when - * @example - * - * let safeInc = R.unless(R.isNil, R.inc); - * safeInc(null); //=> null - * safeInc(1); //=> 2 - */ -module.exports = _curry3(function unless(pred, whenFalseFn, x) { - return pred(x) ? x : whenFalseFn(x); -}); diff --git a/node_modules/ramda/src/unnest.js b/node_modules/ramda/src/unnest.js deleted file mode 100644 index 6562d0a..0000000 --- a/node_modules/ramda/src/unnest.js +++ /dev/null @@ -1,22 +0,0 @@ -var _identity = require('./internal/_identity'); -var chain = require('./chain'); - - -/** - * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from - * any [Chain](https://github.com/fantasyland/fantasy-land#chain). - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig Chain c => c (c a) -> c a - * @param {*} list - * @return {*} - * @see R.flatten, R.chain - * @example - * - * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]] - * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6] - */ -module.exports = chain(_identity); diff --git a/node_modules/ramda/src/until.js b/node_modules/ramda/src/until.js deleted file mode 100644 index 8c09c93..0000000 --- a/node_modules/ramda/src/until.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Takes a predicate, a transformation function, and an initial value, - * and returns a value of the same type as the initial value. - * It does so by applying the transformation until the predicate is satisfied, - * at which point it returns the satisfactory value. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} fn The iterator function - * @param {*} init Initial value - * @return {*} Final value that satisfies predicate - * @example - * - * R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128 - */ -module.exports = _curry3(function until(pred, fn, init) { - var val = init; - while (!pred(val)) { - val = fn(val); - } - return val; -}); diff --git a/node_modules/ramda/src/update.js b/node_modules/ramda/src/update.js deleted file mode 100644 index 4678265..0000000 --- a/node_modules/ramda/src/update.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry3 = require('./internal/_curry3'); -var adjust = require('./adjust'); -var always = require('./always'); - - -/** - * Returns a new copy of the array with the element at the provided index - * replaced with the given value. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig Number -> a -> [a] -> [a] - * @param {Number} idx The index to update. - * @param {*} x The value to exist at the given index of the returned array. - * @param {Array|Arguments} list The source array-like object to be updated. - * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`. - * @see R.adjust - * @example - * - * R.update(1, 11, [0, 1, 2]); //=> [0, 11, 2] - * R.update(1)(11)([0, 1, 2]); //=> [0, 11, 2] - * @symb R.update(-1, a, [b, c]) = [b, a] - * @symb R.update(0, a, [b, c]) = [a, c] - * @symb R.update(1, a, [b, c]) = [b, a] - */ -module.exports = _curry3(function update(idx, x, list) { - return adjust(always(x), idx, list); -}); diff --git a/node_modules/ramda/src/useWith.js b/node_modules/ramda/src/useWith.js deleted file mode 100644 index c256704..0000000 --- a/node_modules/ramda/src/useWith.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var curryN = require('./curryN'); - - -/** - * Accepts a function `fn` and a list of transformer functions and returns a - * new curried function. When the new function is invoked, it calls the - * function `fn` with parameters consisting of the result of calling each - * supplied handler on successive arguments to the new function. - * - * If more arguments are passed to the returned function than transformer - * functions, those arguments are passed directly to `fn` as additional - * parameters. If you expect additional arguments that don't need to be - * transformed, although you can ignore them, it's best to pass an identity - * function so that the new function reports the correct arity. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (x1 -> x2 -> ... -> z) -> [(a -> x1), (b -> x2), ...] -> (a -> b -> ... -> z) - * @param {Function} fn The function to wrap. - * @param {Array} transformers A list of transformer functions - * @return {Function} The wrapped function. - * @see R.converge - * @example - * - * R.useWith(Math.pow, [R.identity, R.identity])(3, 4); //=> 81 - * R.useWith(Math.pow, [R.identity, R.identity])(3)(4); //=> 81 - * R.useWith(Math.pow, [R.dec, R.inc])(3, 4); //=> 32 - * R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32 - * @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b)) - */ -module.exports = _curry2(function useWith(fn, transformers) { - return curryN(transformers.length, function() { - var args = []; - var idx = 0; - while (idx < transformers.length) { - args.push(transformers[idx].call(this, arguments[idx])); - idx += 1; - } - return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length))); - }); -}); diff --git a/node_modules/ramda/src/values.js b/node_modules/ramda/src/values.js deleted file mode 100644 index 519f7e6..0000000 --- a/node_modules/ramda/src/values.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry1 = require('./internal/_curry1'); -var keys = require('./keys'); - - -/** - * Returns a list of all the enumerable own properties of the supplied object. - * Note that the order of the output array is not guaranteed across different - * JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [v] - * @param {Object} obj The object to extract values from - * @return {Array} An array of the values of the object's own properties. - * @see R.valuesIn, R.keys - * @example - * - * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3] - */ -module.exports = _curry1(function values(obj) { - var props = keys(obj); - var len = props.length; - var vals = []; - var idx = 0; - while (idx < len) { - vals[idx] = obj[props[idx]]; - idx += 1; - } - return vals; -}); diff --git a/node_modules/ramda/src/valuesIn.js b/node_modules/ramda/src/valuesIn.js deleted file mode 100644 index 6a0abe9..0000000 --- a/node_modules/ramda/src/valuesIn.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry1 = require('./internal/_curry1'); - - -/** - * Returns a list of all the properties, including prototype properties, of the - * supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @sig {k: v} -> [v] - * @param {Object} obj The object to extract values from - * @return {Array} An array of the values of the object's own and prototype properties. - * @see R.values, R.keysIn - * @example - * - * var F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * var f = new F(); - * R.valuesIn(f); //=> ['X', 'Y'] - */ -module.exports = _curry1(function valuesIn(obj) { - var prop; - var vs = []; - for (prop in obj) { - vs[vs.length] = obj[prop]; - } - return vs; -}); diff --git a/node_modules/ramda/src/view.js b/node_modules/ramda/src/view.js deleted file mode 100644 index fc020e9..0000000 --- a/node_modules/ramda/src/view.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Returns a "view" of the given data structure, determined by the given lens. - * The lens's focus determines which portion of the data structure is visible. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> s -> a - * @param {Lens} lens - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * var xLens = R.lensProp('x'); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.view(xLens, {x: 4, y: 2}); //=> 4 - */ -module.exports = (function() { - // `Const` is a functor that effectively ignores the function given to `map`. - var Const = function(x) { - return {value: x, 'fantasy-land/map': function() { return this; }}; - }; - - return _curry2(function view(lens, x) { - // Using `Const` effectively ignores the setter function of the `lens`, - // leaving the value returned by the getter function unmodified. - return lens(Const)(x).value; - }); -}()); diff --git a/node_modules/ramda/src/when.js b/node_modules/ramda/src/when.js deleted file mode 100644 index 2b53f2c..0000000 --- a/node_modules/ramda/src/when.js +++ /dev/null @@ -1,34 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is satisfied, the function will return the result of calling - * the `whenTrueFn` function with the same argument. If the predicate is not - * satisfied, the argument is returned as is. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenTrueFn A function to invoke when the `condition` - * evaluates to a truthy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenTrueFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`. - * @see R.ifElse, R.unless - * @example - * - * // truncate :: String -> String - * var truncate = R.when( - * R.propSatisfies(R.gt(R.__, 10), 'length'), - * R.pipe(R.take(10), R.append('…'), R.join('')) - * ); - * truncate('12345'); //=> '12345' - * truncate('0123456789ABC'); //=> '0123456789…' - */ -module.exports = _curry3(function when(pred, whenTrueFn, x) { - return pred(x) ? whenTrueFn(x) : x; -}); diff --git a/node_modules/ramda/src/where.js b/node_modules/ramda/src/where.js deleted file mode 100644 index 707ef09..0000000 --- a/node_modules/ramda/src/where.js +++ /dev/null @@ -1,46 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var _has = require('./internal/_has'); - - -/** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec. Each of the spec's own properties must be a predicate function. - * Each predicate is applied to the value of the corresponding property of the - * test object. `where` returns true if all the predicates return true, false - * otherwise. - * - * `where` is well suited to declaratively expressing constraints for other - * functions such as [`filter`](#filter) and [`find`](#find). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Object - * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @example - * - * // pred :: Object -> Boolean - * var pred = R.where({ - * a: R.equals('foo'), - * b: R.complement(R.equals('bar')), - * x: R.gt(R.__, 10), - * y: R.lt(R.__, 20) - * }); - * - * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true - * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false - */ -module.exports = _curry2(function where(spec, testObj) { - for (var prop in spec) { - if (_has(prop, spec) && !spec[prop](testObj[prop])) { - return false; - } - } - return true; -}); diff --git a/node_modules/ramda/src/whereEq.js b/node_modules/ramda/src/whereEq.js deleted file mode 100644 index 7b3bc80..0000000 --- a/node_modules/ramda/src/whereEq.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry2 = require('./internal/_curry2'); -var equals = require('./equals'); -var map = require('./map'); -var where = require('./where'); - - -/** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec, false otherwise. An object satisfies the spec if, for each of the - * spec's own properties, accessing that property of the object gives the same - * value (in [`R.equals`](#equals) terms) as accessing that property of the - * spec. - * - * `whereEq` is a specialization of [`where`](#where). - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @sig {String: *} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @see R.where - * @example - * - * // pred :: Object -> Boolean - * var pred = R.whereEq({a: 1, b: 2}); - * - * pred({a: 1}); //=> false - * pred({a: 1, b: 2}); //=> true - * pred({a: 1, b: 2, c: 3}); //=> true - * pred({a: 1, b: 1}); //=> false - */ -module.exports = _curry2(function whereEq(spec, testObj) { - return where(map(equals, spec), testObj); -}); diff --git a/node_modules/ramda/src/without.js b/node_modules/ramda/src/without.js deleted file mode 100644 index d7f9d1e..0000000 --- a/node_modules/ramda/src/without.js +++ /dev/null @@ -1,28 +0,0 @@ -var _contains = require('./internal/_contains'); -var _curry2 = require('./internal/_curry2'); -var flip = require('./flip'); -var reject = require('./reject'); - - -/** - * Returns a new list without values in the first argument. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [a] -> [a] -> [a] - * @param {Array} list1 The values to be removed from `list2`. - * @param {Array} list2 The array to remove values from. - * @return {Array} The new array without values in `list1`. - * @see R.transduce, R.difference - * @example - * - * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] - */ -module.exports = _curry2(function(xs, list) { - return reject(flip(_contains)(xs), list); -}); diff --git a/node_modules/ramda/src/xprod.js b/node_modules/ramda/src/xprod.js deleted file mode 100644 index 569a834..0000000 --- a/node_modules/ramda/src/xprod.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Creates a new list out of the two supplied by creating each possible pair - * from the lists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] -> [[a,b]] - * @param {Array} as The first list. - * @param {Array} bs The second list. - * @return {Array} The list made by combining each possible pair from - * `as` and `bs` into pairs (`[a, b]`). - * @example - * - * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] - * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]] - */ -module.exports = _curry2(function xprod(a, b) { // = xprodWith(prepend); (takes about 3 times as long...) - var idx = 0; - var ilen = a.length; - var j; - var jlen = b.length; - var result = []; - while (idx < ilen) { - j = 0; - while (j < jlen) { - result[result.length] = [a[idx], b[j]]; - j += 1; - } - idx += 1; - } - return result; -}); diff --git a/node_modules/ramda/src/zip.js b/node_modules/ramda/src/zip.js deleted file mode 100644 index 299c1ef..0000000 --- a/node_modules/ramda/src/zip.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Creates a new list out of the two supplied by pairing up equally-positioned - * items from both lists. The returned list is truncated to the length of the - * shorter of the two input lists. - * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] -> [[a,b]] - * @param {Array} list1 The first array to consider. - * @param {Array} list2 The second array to consider. - * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`. - * @example - * - * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] - * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] - */ -module.exports = _curry2(function zip(a, b) { - var rv = []; - var idx = 0; - var len = Math.min(a.length, b.length); - while (idx < len) { - rv[idx] = [a[idx], b[idx]]; - idx += 1; - } - return rv; -}); diff --git a/node_modules/ramda/src/zipObj.js b/node_modules/ramda/src/zipObj.js deleted file mode 100644 index b604282..0000000 --- a/node_modules/ramda/src/zipObj.js +++ /dev/null @@ -1,30 +0,0 @@ -var _curry2 = require('./internal/_curry2'); - - -/** - * Creates a new object out of a list of keys and a list of values. - * Key/value pairing is truncated to the length of the shorter of the two lists. - * Note: `zipObj` is equivalent to `pipe(zipWith(pair), fromPairs)`. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [String] -> [*] -> {String: *} - * @param {Array} keys The array that will be properties on the output object. - * @param {Array} values The list of values on the output object. - * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`. - * @example - * - * R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3} - */ -module.exports = _curry2(function zipObj(keys, values) { - var idx = 0; - var len = Math.min(keys.length, values.length); - var out = {}; - while (idx < len) { - out[keys[idx]] = values[idx]; - idx += 1; - } - return out; -}); diff --git a/node_modules/ramda/src/zipWith.js b/node_modules/ramda/src/zipWith.js deleted file mode 100644 index b8f786c..0000000 --- a/node_modules/ramda/src/zipWith.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry3 = require('./internal/_curry3'); - - -/** - * Creates a new list out of the two supplied by applying the function to each - * equally-positioned pair in the lists. The returned list is truncated to the - * length of the shorter of the two input lists. - * - * @function - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a,b -> c) -> [a] -> [b] -> [c] - * @param {Function} fn The function used to combine the two elements into one value. - * @param {Array} list1 The first array to consider. - * @param {Array} list2 The second array to consider. - * @return {Array} The list made by combining same-indexed elements of `list1` and `list2` - * using `fn`. - * @example - * - * var f = (x, y) => { - * // ... - * }; - * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']); - * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')] - * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)] - */ -module.exports = _curry3(function zipWith(fn, a, b) { - var rv = []; - var idx = 0; - var len = Math.min(a.length, b.length); - while (idx < len) { - rv[idx] = fn(a[idx], b[idx]); - idx += 1; - } - return rv; -}); diff --git a/node_modules/ramdasauce/README.md b/node_modules/ramdasauce/README.md deleted file mode 100644 index 639ecd5..0000000 --- a/node_modules/ramdasauce/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Ramdasauce - -Adds a few utilities based on the delicious [Ramda](http://ramdajs.com/) library. - -[![npm module](https://badge.fury.io/js/ramdasauce.svg)](https://www.npmjs.org/package/ramdasauce) - - -# Installing - -`npm i ramdasauce --save` - -* Depends on `ramda 0.24.+`. -* Targets ES5. -* Built with ES6. - -# Usage - -Here's the quick list of functions and a simple example. - -```js -import RS from 'ramdasauce' - -// --- Conversions --- -RS.toDate(1e12) // a Number to a date Object -RS.toNumber('5') // a String to a Number - -// --- Object Shenanigans --- -const x = {a: 1, b: 2, c: {x: [5, 6]}} -RS.mapKeys(R.toUpper, x) // transforms the keys of an object by the function -RS.dotPath('c.x.0', x) // fetches a value from a nested object by a string path - -// --- Generating Things --- -RS.rangeStep(2, 2, 10) // generates a range of numbers with a step - -// --- Finding Things --- -RS.findByProp('id', 'a', [{id: 'a', id: 'b'}]) // finds an object by propEq -RS.findIndexByProp('id', 'a', [{id: 'a', id: 'b'}]) // finds the index of an object by propEq - -// --- Predicates --- -RS.isUndefined(qwerty) // check if something is undefined -RS.isNotNil(null) // check if something is not null or undefined -RS.isNilOrEmpty(null) // checks if something is null, undefined or R.isEmpty -RS.isWithin(1, 2, 2) // is the 3rd parameter within the range of 1st through 2nd? -RS.isNotWithin(1, 2, 100) // is the 3rd parameter not within the range of 1st through 2nd? -RS.eqLength([1,2,3], 'abc') // tests 2 things to see if their length properties are the same -``` - -# Prior Art - -Most of these functions were lifted from stuff I wrote in real projects. - -(*leans in and whispers*) - -I did look at these tho: - -* https://github.com/Cottin/ramda-extras -* https://github.com/mediasuitenz/ramda-extended -* https://github.com/ramda/ramda/wiki/Cookbook -* https://github.com/seancannon/prettycats - - -# Philosophy - -These helper functions target that sweet spot between: - -> Not right for `ramda` core. - -and - -> Would never be used outside your app. - -Functions being added here *must* be used in an app. Preferable more than once. - -I hope this library won't turn into something like this: - -```js -RS.portmanteau('functor', 'wrecked') -RS.yearsForAnimalInAsianCalendars('monkey') -``` - - -# Feedback - -Do you have any common `ramda` patterns you use frequently? Drop some issues or PRs in! - - -# Release Notes - -### 2.0.0 - May 29, 2017 -* DEPRECATIONS: `startsWith` and `endsWith` are flagged for removal in 3.0.0 (ramda has these now) -* DEPRECATIONS: `random` and `sample` are flagged for removal in 3.0.0 (impure functions) -* DEPRECATIONS: `log` and `trace` are flagged for removal in 3.0.0 (impure debug functions) -* Upgrades to ramda@24.0.0 -* updates build process for much smaller bundle sizes - -### 1.2.0 - February 6, 2017 -* Updates `isWithin` to play nice with Webpack - @hubciorz (#7) -* Bumped dependencies - @skellock (#8) - -### 1.1.1 - August 17th, 2016 -* Bumped dependencies - [@skellock](https://github.com/skellock) ([#5](https://github.com/skellock/ramdasauce/pull/5)) - -### 1.1.0 - June 16th, 2016 -* Adds findByProp & findIndexByProp - [@kevinvangelder](https://github.com/kevinvangelder) -* Fixes test environment - [@skellock](https://github.com/skellock) [@kevinvangelder](https://github.com/kevinvangelder) -* Bumped dependencies - -### 1.0.0 - April 3rd, 2016 -* Initial Release diff --git a/node_modules/ramdasauce/dist/ramdasauce.js b/node_modules/ramdasauce/dist/ramdasauce.js deleted file mode 100644 index 51ad293..0000000 --- a/node_modules/ramdasauce/dist/ramdasauce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function _interopDefault(r){return r&&"object"==typeof r&&"default"in r?r.default:r}var curry=_interopDefault(require("ramda/src/curry")),cond=_interopDefault(require("ramda/src/cond")),isNil=_interopDefault(require("ramda/src/isNil")),identity=_interopDefault(require("ramda/src/identity")),is=_interopDefault(require("ramda/src/is")),T=_interopDefault(require("ramda/src/T")),gte=_interopDefault(require("ramda/src/gte")),complement=_interopDefault(require("ramda/src/complement")),eqProps=_interopDefault(require("ramda/src/eqProps")),isEmpty=_interopDefault(require("ramda/src/isEmpty")),anyPass=_interopDefault(require("ramda/src/anyPass")),pipe=_interopDefault(require("ramda/src/pipe")),toPairs=_interopDefault(require("ramda/src/toPairs")),map=_interopDefault(require("ramda/src/map")),adjust=_interopDefault(require("ramda/src/adjust")),fromPairs=_interopDefault(require("ramda/src/fromPairs")),range=_interopDefault(require("ramda/src/range")),split=_interopDefault(require("ramda/src/split")),path=_interopDefault(require("ramda/src/path")),newStartsWith=_interopDefault(require("ramda/src/startsWith")),newEndsWith=_interopDefault(require("ramda/src/endsWith")),find=_interopDefault(require("ramda/src/find")),propEq=_interopDefault(require("ramda/src/propEq")),findIndex=_interopDefault(require("ramda/src/findIndex")),log=function(r){return console.log(r),r},trace=curry(function(r,e){return console.log(r),e}),toNumber=cond([[isNil,identity],[is(Number),identity],[T,function(r){return Number(r)}]]),toDate=function(r){return cond([[isNil,identity],[is(Object),identity],[T,function(r){return new Date(r)}]])(r)},isWithin=curry(function(r,e,t){var i=is(Number);return i(r)&&i(e)&&i(t)&>e(t,r)&>e(e,t)}),isNotWithin=complement(isWithin),eqLength=eqProps("length"),random=function(r,e){return Math.floor(Math.random()*(e-r+1))+r},sample=function(r){if(isNil(r)||isEmpty(r))return null;var e=r.length-1;return r[random(0,e)]},isNilOrEmpty=anyPass([isNil,isEmpty]),isNotNil=complement(isNil),isUndefined=function(r){return void 0===r},mapKeys=curry(function(r,e){return pipe(toPairs,map(adjust(r,0)),fromPairs)(e)}),rangeStep=curry(function(r,e,t){return 0===r?null:r>0&&te?null:map(function(t){return e+r*t},range(0,1+(t-e)/r>>>0))}),dotPath=curry(function(r,e){return path(split(".",r),e)}),startsWith=curry(function(r,e){return newStartsWith(r,e)}),endsWith=curry(function(r,e){return newEndsWith(r,e)}),findByProp=curry(function(r,e,t){return find(propEq(r,e))(t)}),findIndexByProp=curry(function(r,e,t){return findIndex(propEq(r,e))(t)}),Ramdasauce={log:log,trace:trace,toNumber:toNumber,toDate:toDate,isWithin:isWithin,isNotWithin:isNotWithin,eqLength:eqLength,random:random,sample:sample,isNilOrEmpty:isNilOrEmpty,isNotNil:isNotNil,isUndefined:isUndefined,mapKeys:mapKeys,rangeStep:rangeStep,dotPath:dotPath,startsWith:startsWith,endsWith:endsWith,findByProp:findByProp,findIndexByProp:findIndexByProp};module.exports=Ramdasauce,module.exports=Ramdasauce; diff --git a/node_modules/ramdasauce/package.json b/node_modules/ramdasauce/package.json deleted file mode 100644 index 7d613ff..0000000 --- a/node_modules/ramdasauce/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "author": "Steve Kellock ", - "ava": { - "require": [ - "babel-register" - ] - }, - "dependencies": { - "ramda": "^0.24.1" - }, - "description": "Utilities for Ramda.", - "devDependencies": { - "ava": "^0.21.0", - "babel-core": "^6.25.0", - "babel-eslint": "^7.2.3", - "babel-preset-es2015": "^6.13.2", - "babel-preset-es2015-rollup": "^3.0.0", - "np": "^2.16.0", - "nyc": "^11.1.0", - "rollup": "^0.47.2", - "rollup-plugin-babel": "^3.0.1", - "rollup-plugin-filesize": "^1.4.2", - "rollup-plugin-ramda": "^1.0.5", - "rollup-plugin-uglify": "^2.0.1", - "standard": "^10.0.3" - }, - "files": [ - "dist/index.js" - ], - "keywords": [ - "ramda", - "sauce", - "utilities" - ], - "license": "MIT", - "main": "./dist/ramdasauce.js", - "name": "ramdasauce", - "repository": { - "type": "git", - "url": "https://github.com/skellock/ramdasauce.git" - }, - "scripts": { - "build": "rm -rf dist && BABEL_ENV=production rollup -c", - "coverage": "nyc ava", - "lint": "standard lib/* test/* rollup.config.js", - "test": "ava" - }, - "standard": { - "parser": "babel-eslint" - }, - "version": "2.1.0" -} diff --git a/node_modules/redux-persist/LICENSE b/node_modules/redux-persist/LICENSE deleted file mode 100644 index 4c472db..0000000 --- a/node_modules/redux-persist/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Zack Story - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/redux-persist/README.md b/node_modules/redux-persist/README.md deleted file mode 100644 index 5f11e64..0000000 --- a/node_modules/redux-persist/README.md +++ /dev/null @@ -1,202 +0,0 @@ -# Redux Persist - -Persist and rehydrate a redux store. - -[![build status](https://img.shields.io/travis/rt2zz/redux-persist/master.svg?style=flat-square)](https://travis-ci.org/rt2zz/redux-persist) [![npm version](https://img.shields.io/npm/v/redux-persist.svg?style=flat-square)](https://www.npmjs.com/package/redux-persist) [![npm downloads](https://img.shields.io/npm/dm/redux-persist.svg?style=flat-square)](https://www.npmjs.com/package/redux-persist) - -Redux Persist takes your redux state object and saves it to persisted storage. On app launch, it retrieves this persisted state and saves it back to redux. - -**Note:** These instructions are for redux-persist v5. For a list of breaking changes between v4 and v5, see our [migration guide](./docs/MigrationGuide-v5.md). -[v4](https://github.com/rt2zz/redux-persist/tree/v4.8.2) will be supported for the forseeable future, and if it works well for your use case you are encouraged to stay on v4. - -## Quickstart -`npm install --save redux-persist` -\- OR - -`yarn add redux-persist` - -##### Implementation -Basic implementation involves adding `persistReducer` and `persistStore` to your setup. **IMPORTANT** Every app needs to decide how many levels of state they want to "merge". The default is 1 level. Please read through the [state reconciler docs](#state-reconciler) for more information. - -```js -// configureStore.js - -import { createStore } from 'redux' -import { persistStore, persistReducer } from 'redux-persist' -import storage from 'redux-persist/lib/storage' - -import rootReducer from './reducers' - -const persistConfig = { - key: 'root', - storage: storage, -} - -const persistedReducer = persistReducer(persistConfig, rootReducer) - -export default () => { - let store = createStore(persistedReducer) - let persistor = persistStore(store) - return { store, persistor } -} -``` - -If you are using react, wrap your root component with [PersistGate](./docs/PersistGate.md). This delays the rendering of your app's UI until your persisted state has been retrieved and saved to redux. - -```js -import React from 'react' -import { Provider } from 'react-redux' -import { PersistGate } from 'redux-persist/lib/integration/react' - -import configureStore from './store/configureStore' -let { store, persistor } = configureStore() - -// import your necessary custom components. -import { RootComponent } from './components' - -const App = () => { - return ( - - - - - - ); -}; - -export default App -``` - -**NOTE** loading is set to null for simplicity, but in practice should be any react instance, e.g. `loading={}` - -## State Reconciler -State reconcilers define how incoming persisted state is merged in with existing default state. It is critical to choose the right state reconciler for your state shape. There are three options that ship out of the box, lets look at how each operates: - -1. hardSet (`import hardSet from 'redux-persist/lib/stateReconciler/hardSet'`) -This will hard set incoming state. This can be desirable in some cases where persistReducer is nested deeper in your reducer tree, or if you do not rely on initialState in your reducer. - - **INCOMING STATE**: `{ foo: incomingFoo }` - - **INITIAL STATE**: `{ foo: initialFoo, bar: initialBar }` - - **RECONCILED STATE**: `{ foo: incomingFoo }` // note bar has been dropped -2. autoMergeLevel1 (default) -This will auto merge one level deep. Auto merge means if the some piece of substate was modified by your reducer during the REHYDRATE action, it will skip this piece of state. Level 1 means it will shallow merge 1 level deep. - - **INCOMING STATE**: `{ foo: incomingFoo }` - - **INITIAL STATE**: `{ foo: initialFoo, bar: initialBar }` - - **RECONCILED STATE**: `{ foo: incomingFoo, bar: initialBar }` -3. autoMergeLevel2 -This acts just like autoMergeLevel1, except it shallow merges two levels - - **INCOMING STATE**: `{ foo: incomingFoo }` - - **INITIAL STATE**: `{ foo: initialFoo, bar: initialBar }` - - **RECONCILED STATE**: `{ foo: mergedFoo, bar: initialBar }` - -#### Example -```js -import autoMergeLevel2 from 'redux-persist/lib/stateReconciler/hardSet' - -const persistConfig = { - key: 'root', - storage, - stateReconciler: hardSet, -} -``` - -## Blacklist & Whitelist -By Example: -```js -// BLACKLIST -const persistConfig = { - key: 'root', - storage: storage, - blacklist: ['navigation'] // navigation will not be persisted -}; - -// WHITELIST -const persistConfig = { - key: 'root', - storage: storage, - whitelist: ['navigation'] // only navigation will be persisted -}; -``` - -#### Nested Blacklist / Whitelist -The blacklist and whitelist only work one level deep. However persisted reducers can be nested.For example, if you want to blacklist `state.auth.somethingTemporary`: -```js -import { combineReducers } from 'redux' -import { persistReducer } from 'redux-persist' -import storage from 'redux-persist/lib/storage' - -import { authReducer, otherReducer } from './reducers' - -const rootPersistConfig = { - key: 'root', - storage: storage, - blacklist: ['auth'] -} - -const authPersistConfig = { - key: 'auth', - storage: storage, - blacklist: ['somethingTemporary'] -} - -const rootReducer = combineReducers({ - auth: persistReducer(authPersistConfig, authReducer), - other: otherReducer, -}) - -export default persistReducer(rootPersistConfig, rootReducer) -``` - -## Migrations -`persistReducer` has a general purpose "migrate" config which will be called after getting stored state but before actually reconciling with the reducer. It can be any function which takes state as an argument and returns a promise to return a new state object. - -Redux Persist ships with `createMigrate`, which helps create a synchronous migration for moving from any version of stored state to the current state version. [[Additional information]](./docs/migrations.md) - -## Transforms - -Transforms allow you to customize the state object that gets persisted and rehydrated. - -There are several libraries that tackle some of the common implementations for transforms. -- [immutable](https://github.com/rt2zz/redux-persist-transform-immutable) - support immutable reducers -- [compress](https://github.com/rt2zz/redux-persist-transform-compress) - compress your serialized state with lz-string -- [encrypt](https://github.com/maxdeviant/redux-persist-transform-encrypt) - encrypt your serialized state with AES -- [filter](https://github.com/edy/redux-persist-transform-filter) - store or load a subset of your state -- [filter-immutable](https://github.com/actra-development/redux-persist-transform-filter-immutable) - store or load a subset of your state with support for immutablejs -- [expire](https://github.com/gabceb/redux-persist-transform-expire) - expire a specific subset of your state based on a property - -When the state object gets persisted, it first gets serialized with `JSON.stringify()`. If parts of your state object are not mappable to JSON objects, the serialization process may transform these parts of your state in unexpected ways. For example, the javascript [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) type does not exist in JSON. When you try to serialize a Set via `JSON.stringify()`, it gets converted to an empty object. Probably not what you want. - -Below is a Transform that successfully persists a Set property, which simply converts it to an array and back. In this way, the Set gets converted to an Array, which is a recognized data structure in JSON. When pulled out of the persisted store, the array gets converted back to a Set before being saved to the redux store. - -```js -const myTransform = createTransform( - // transform state on its way to being serialized and persisted. - (inboundState, key) => { - // convert mySet to an Array. - return { ...inboundState, mySet: [...inboundState.mySet] }; - }, - // transform state being rehydrated - (outboundState, key) => { - // convert mySet back to a Set. - return { ...outboundState, mySet: new Set(outboundState.mySet) }; - }, - // define which reducers this transform gets called for. - { whitelist: ['someReducer'] } -); -``` - -The createTransform function takes three parameters. -1. A function that gets called right before state is persisted. -2. A function that gets called right before state is rehydrated. -3. A config object. - -## Storage Engines -- **localStorage** `import storage from 'redux-persist/lib/storage'` -- **sessionStorage** `import sessionStorage from 'redux-persist/lib/storage/session'` -- **AsyncStorage** react-native `import storage from 'redux-persist/lib/storage'` -- **[localForage](https://github.com/mozilla/localForage)** recommended for web -- **[electron storage](https://github.com/psperber/redux-persist-electron-storage)** Electron support via [electron store](https://github.com/sindresorhus/electron-store) -- **[redux-persist-filesystem-storage](https://github.com/robwalkerco/redux-persist-filesystem-storage)** react-native, to mitigate storage size limitations in android ([#199](https://github.com/rt2zz/redux-persist/issues/199), [#284](https://github.com/rt2zz/redux-persist/issues/284)) -- **[redux-persist-node-storage](https://github.com/pellejacobs/redux-persist-node-storage)** for use in nodejs environments. -- **[redux-persist-sensitive-storage](https://github.com/CodingZeal/redux-persist-sensitive-storage)** react-native, for sensitive information (uses [react-native-sensitive-storage](https://github.com/mCodex/react-native-sensitive-info)). -- **[redux-persist-fs-storage](https://github.com/leethree/redux-persist-fs-storage)** react-native-fs engine -- **[redux-persist-cookie-storage](https://github.com/abersager/redux-persist-cookie-storage)** Cookie storage engine, works in browser and Node.js, for universal / isomorphic apps -- **custom** any conforming storage api implementing the following methods: `setItem` `getItem` `removeItem`. (**NB**: These methods must support promises) diff --git a/node_modules/redux-persist/es/constants.js b/node_modules/redux-persist/es/constants.js deleted file mode 100644 index 4302a37..0000000 --- a/node_modules/redux-persist/es/constants.js +++ /dev/null @@ -1,8 +0,0 @@ -export var KEY_PREFIX = 'persist:'; -export var FLUSH = 'persist/FLUSH'; -export var REHYDRATE = 'persist/REHYDRATE'; -export var PAUSE = 'persist/PAUSE'; -export var PERSIST = 'persist/PERSIST'; -export var PURGE = 'persist/PURGE'; -export var REGISTER = 'persist/REGISTER'; -export var DEFAULT_VERSION = -1; \ No newline at end of file diff --git a/node_modules/redux-persist/es/constants.js.flow b/node_modules/redux-persist/es/constants.js.flow deleted file mode 100644 index 009705f..0000000 --- a/node_modules/redux-persist/es/constants.js.flow +++ /dev/null @@ -1,10 +0,0 @@ -// @flow - -export const KEY_PREFIX = 'persist:' -export const FLUSH = 'persist/FLUSH' -export const REHYDRATE = 'persist/REHYDRATE' -export const PAUSE = 'persist/PAUSE' -export const PERSIST = 'persist/PERSIST' -export const PURGE = 'persist/PURGE' -export const REGISTER = 'persist/REGISTER' -export const DEFAULT_VERSION = -1 diff --git a/node_modules/redux-persist/es/createMigrate.js b/node_modules/redux-persist/es/createMigrate.js deleted file mode 100644 index e26eee9..0000000 --- a/node_modules/redux-persist/es/createMigrate.js +++ /dev/null @@ -1,42 +0,0 @@ -import { DEFAULT_VERSION } from './constants'; - -export default function createMigrate(migrations, config) { - var _ref = config || {}, - debug = _ref.debug; - - return function (state, currentVersion) { - if (!state) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist: no inbound state, skipping migration'); - return Promise.resolve(undefined); - } - - var inboundVersion = state._persist && state._persist.version !== undefined ? state._persist.version : DEFAULT_VERSION; - if (inboundVersion === currentVersion) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist: versions match, noop migration'); - return Promise.resolve(state); - } - if (inboundVersion > currentVersion) { - if (process.env.NODE_ENV !== 'production') console.error('redux-persist: downgrading version is not supported'); - return Promise.resolve(state); - } - - var migrationKeys = Object.keys(migrations).map(function (ver) { - return parseInt(ver); - }).filter(function (key) { - return currentVersion >= key && key > inboundVersion; - }).sort(function (a, b) { - return a - b; - }); - - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist: migrationKeys', migrationKeys); - try { - var migratedState = migrationKeys.reduce(function (state, versionKey) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist: running migration for versionKey', versionKey); - return migrations[versionKey](state); - }, state); - return Promise.resolve(migratedState); - } catch (err) { - return Promise.reject(err); - } - }; -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/createMigrate.js.flow b/node_modules/redux-persist/es/createMigrate.js.flow deleted file mode 100644 index 5426c46..0000000 --- a/node_modules/redux-persist/es/createMigrate.js.flow +++ /dev/null @@ -1,58 +0,0 @@ -// @flow - -import { DEFAULT_VERSION } from './constants' - -import type { PersistedState, MigrationManifest } from './types' - -export default function createMigrate( - migrations: MigrationManifest, - config?: { debug: boolean } -) { - let { debug } = config || {} - return function( - state: PersistedState, - currentVersion: number - ): Promise { - if (!state) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log('redux-persist: no inbound state, skipping migration') - return Promise.resolve(undefined) - } - - let inboundVersion: number = - state._persist && state._persist.version !== undefined - ? state._persist.version - : DEFAULT_VERSION - if (inboundVersion === currentVersion) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log('redux-persist: versions match, noop migration') - return Promise.resolve(state) - } - if (inboundVersion > currentVersion) { - if (process.env.NODE_ENV !== 'production') - console.error('redux-persist: downgrading version is not supported') - return Promise.resolve(state) - } - - let migrationKeys = Object.keys(migrations) - .map(ver => parseInt(ver)) - .filter(key => currentVersion >= key && key > inboundVersion) - .sort((a, b) => a - b) - - if (process.env.NODE_ENV !== 'production' && debug) - console.log('redux-persist: migrationKeys', migrationKeys) - try { - let migratedState = migrationKeys.reduce((state, versionKey) => { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - 'redux-persist: running migration for versionKey', - versionKey - ) - return migrations[versionKey](state) - }, state) - return Promise.resolve(migratedState) - } catch (err) { - return Promise.reject(err) - } - } -} diff --git a/node_modules/redux-persist/es/createPersistoid.js b/node_modules/redux-persist/es/createPersistoid.js deleted file mode 100644 index 071a13a..0000000 --- a/node_modules/redux-persist/es/createPersistoid.js +++ /dev/null @@ -1,102 +0,0 @@ -import { KEY_PREFIX, REHYDRATE } from './constants'; - -export default function createPersistoid(config) { - // defaults - var blacklist = config.blacklist || null; - var whitelist = config.whitelist || null; - var transforms = config.transforms || []; - var throttle = config.throttle || 0; - var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : KEY_PREFIX) + config.key; - var storage = config.storage; - var serialize = config.serialize === false ? function (x) { - return x; - } : defaultSerialize; - - // initialize stateful values - var lastState = {}; - var stagedState = {}; - var keysToProcess = []; - var timeIterator = null; - var writePromise = null; - - var update = function update(state) { - // add any changed keys to the queue - Object.keys(state).forEach(function (key) { - var subState = state[key]; - if (!passWhitelistBlacklist(key)) return; // is keyspace ignored? noop - if (lastState[key] === state[key]) return; // value unchanged? noop - if (keysToProcess.indexOf(key) !== -1) return; // is key already queued? noop - keysToProcess.push(key); // add key to queue - }); - - // start the time iterator if not running (read: throttle) - if (timeIterator === null) { - timeIterator = setInterval(processNextKey, throttle); - } - - lastState = state; - }; - - function processNextKey() { - if (keysToProcess.length === 0) { - if (timeIterator) clearInterval(timeIterator); - timeIterator = null; - return; - } - - var key = keysToProcess.shift(); - var endState = transforms.reduce(function (subState, transformer) { - return transformer.in(subState, key); - }, lastState[key]); - if (typeof endState !== 'undefined') stagedWrite(key, endState); - } - - function stagedWrite(key, endState) { - try { - stagedState[key] = serialize(endState); - } catch (err) { - console.error('redux-persist/createPersistoid: error serializing state', err); - } - if (keysToProcess.length === 0) { - // cleanup any removed keys just before write. - Object.keys(stagedState).forEach(function (key) { - if (lastState[key] === undefined) { - delete stagedState[key]; - } - }); - - writePromise = storage.setItem(storageKey, serialize(stagedState)).catch(onWriteFail); - } - } - - function passWhitelistBlacklist(key) { - if (whitelist && whitelist.indexOf(key) === -1 && key !== '_persist') return false; - if (blacklist && blacklist.indexOf(key) !== -1) return false; - return true; - } - - function onWriteFail(err) { - // @TODO add fail handlers (typically storage full) - if (err && process.env.NODE_ENV !== 'production') { - console.error('Error storing data', err); - } - } - - var flush = function flush() { - while (keysToProcess.length !== 0) { - processNextKey(); - } - return writePromise || Promise.resolve(); - }; - - // return `persistoid` - return { - update: update, - flush: flush - }; -} - -// @NOTE in the future this may be exposed via config -function defaultSerialize(data) { - return JSON.stringify(data); -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/createPersistoid.js.flow b/node_modules/redux-persist/es/createPersistoid.js.flow deleted file mode 100644 index 16dfe85..0000000 --- a/node_modules/redux-persist/es/createPersistoid.js.flow +++ /dev/null @@ -1,111 +0,0 @@ -// @flow - -import { KEY_PREFIX, REHYDRATE } from './constants' - -import type { Persistoid, PersistConfig, Transform } from './types' - -export default function createPersistoid(config: PersistConfig): Persistoid { - // defaults - const blacklist: ?Array = config.blacklist || null - const whitelist: ?Array = config.whitelist || null - const transforms = config.transforms || [] - const throttle = config.throttle || 0 - const storageKey = `${config.keyPrefix !== undefined - ? config.keyPrefix - : KEY_PREFIX}${config.key}` - const storage = config.storage - const serialize = config.serialize === false ? x => x : defaultSerialize - - // initialize stateful values - let lastState = {} - let stagedState = {} - let keysToProcess = [] - let timeIterator: ?number = null - let writePromise = null - - const update = (state: Object) => { - // add any changed keys to the queue - Object.keys(state).forEach(key => { - let subState = state[key] - if (!passWhitelistBlacklist(key)) return // is keyspace ignored? noop - if (lastState[key] === state[key]) return // value unchanged? noop - if (keysToProcess.indexOf(key) !== -1) return // is key already queued? noop - keysToProcess.push(key) // add key to queue - }) - - // start the time iterator if not running (read: throttle) - if (timeIterator === null) { - timeIterator = setInterval(processNextKey, throttle) - } - - lastState = state - } - - function processNextKey() { - if (keysToProcess.length === 0) { - if (timeIterator) clearInterval(timeIterator) - timeIterator = null - return - } - - let key = keysToProcess.shift() - let endState = transforms.reduce((subState, transformer) => { - return transformer.in(subState, key) - }, lastState[key]) - if (typeof endState !== 'undefined') stagedWrite(key, endState) - } - - function stagedWrite(key: string, endState: any) { - try { - stagedState[key] = serialize(endState) - } catch (err) { - console.error( - 'redux-persist/createPersistoid: error serializing state', - err - ) - } - if (keysToProcess.length === 0) { - // cleanup any removed keys just before write. - Object.keys(stagedState).forEach(key => { - if (lastState[key] === undefined) { - delete stagedState[key] - } - }) - - writePromise = storage - .setItem(storageKey, serialize(stagedState)) - .catch(onWriteFail) - } - } - - function passWhitelistBlacklist(key) { - if (whitelist && whitelist.indexOf(key) === -1 && key !== '_persist') return false - if (blacklist && blacklist.indexOf(key) !== -1) return false - return true - } - - function onWriteFail(err) { - // @TODO add fail handlers (typically storage full) - if (err && process.env.NODE_ENV !== 'production') { - console.error('Error storing data', err) - } - } - - const flush = () => { - while (keysToProcess.length !== 0) { - processNextKey() - } - return writePromise || Promise.resolve() - } - - // return `persistoid` - return { - update, - flush, - } -} - -// @NOTE in the future this may be exposed via config -function defaultSerialize(data) { - return JSON.stringify(data) -} diff --git a/node_modules/redux-persist/es/createTransform.js b/node_modules/redux-persist/es/createTransform.js deleted file mode 100644 index 2f5cc67..0000000 --- a/node_modules/redux-persist/es/createTransform.js +++ /dev/null @@ -1,27 +0,0 @@ - - -export default function createTransform( -// @NOTE inbound: transform state coming from redux on its way to being serialized and stored -inbound, -// @NOTE outbound: transform state coming from storage, on its way to be rehydrated into redux -outbound) { - var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - var whitelist = config.whitelist || null; - var blacklist = config.blacklist || null; - - function whitelistBlacklistCheck(key) { - if (whitelist && whitelist.indexOf(key) === -1) return true; - if (blacklist && blacklist.indexOf(key) !== -1) return true; - return false; - } - - return { - in: function _in(state, key) { - return !whitelistBlacklistCheck(key) && inbound ? inbound(state, key) : state; - }, - out: function out(state, key) { - return !whitelistBlacklistCheck(key) && outbound ? outbound(state, key) : state; - } - }; -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/createTransform.js.flow b/node_modules/redux-persist/es/createTransform.js.flow deleted file mode 100644 index 3da5a15..0000000 --- a/node_modules/redux-persist/es/createTransform.js.flow +++ /dev/null @@ -1,30 +0,0 @@ -// @flow - -type TransformConfig = { - whitelist?: Array, - blacklist?: Array, -} - -export default function createTransform( - // @NOTE inbound: transform state coming from redux on its way to being serialized and stored - inbound: ?Function, - // @NOTE outbound: transform state coming from storage, on its way to be rehydrated into redux - outbound: ?Function, - config: TransformConfig = {} -) { - let whitelist = config.whitelist || null - let blacklist = config.blacklist || null - - function whitelistBlacklistCheck(key) { - if (whitelist && whitelist.indexOf(key) === -1) return true - if (blacklist && blacklist.indexOf(key) !== -1) return true - return false - } - - return { - in: (state: Object, key: string) => - !whitelistBlacklistCheck(key) && inbound ? inbound(state, key) : state, - out: (state: Object, key: string) => - !whitelistBlacklistCheck(key) && outbound ? outbound(state, key) : state, - } -} diff --git a/node_modules/redux-persist/es/getStoredState.js b/node_modules/redux-persist/es/getStoredState.js deleted file mode 100644 index 768e9d8..0000000 --- a/node_modules/redux-persist/es/getStoredState.js +++ /dev/null @@ -1,34 +0,0 @@ - - -import { KEY_PREFIX } from './constants'; - -export default function getStoredState(config) { - var transforms = config.transforms || []; - var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : KEY_PREFIX) + config.key; - var storage = config.storage; - var debug = config.debug; - var deserialize = config.serialize === false ? function (x) { - return x; - } : defaultDeserialize; - return storage.getItem(storageKey).then(function (serialized) { - if (!serialized) return undefined;else { - try { - var state = {}; - var rawState = deserialize(serialized); - Object.keys(rawState).forEach(function (key) { - state[key] = transforms.reduceRight(function (subState, transformer) { - return transformer.out(subState, key); - }, deserialize(rawState[key])); - }); - return state; - } catch (err) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist/getStoredState: Error restoring data ' + serialized, err); - throw err; - } - } - }); -} - -function defaultDeserialize(serial) { - return JSON.parse(serial); -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/getStoredState.js.flow b/node_modules/redux-persist/es/getStoredState.js.flow deleted file mode 100644 index f98b348..0000000 --- a/node_modules/redux-persist/es/getStoredState.js.flow +++ /dev/null @@ -1,43 +0,0 @@ -// @flow - -import type { PersistConfig } from './types' - -import { KEY_PREFIX } from './constants' - -export default function getStoredState( - config: PersistConfig -): Promise { - const transforms = config.transforms || [] - const storageKey = `${config.keyPrefix !== undefined - ? config.keyPrefix - : KEY_PREFIX}${config.key}` - const storage = config.storage - const debug = config.debug - const deserialize = config.serialize === false ? x => x : defaultDeserialize - return storage.getItem(storageKey).then(serialized => { - if (!serialized) return undefined - else { - try { - let state = {} - let rawState = deserialize(serialized) - Object.keys(rawState).forEach(key => { - state[key] = transforms.reduceRight((subState, transformer) => { - return transformer.out(subState, key) - }, deserialize(rawState[key])) - }) - return state - } catch (err) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - `redux-persist/getStoredState: Error restoring data ${serialized}`, - err - ) - throw err - } - } - }) -} - -function defaultDeserialize(serial) { - return JSON.parse(serial) -} diff --git a/node_modules/redux-persist/es/index.js b/node_modules/redux-persist/es/index.js deleted file mode 100644 index a998926..0000000 --- a/node_modules/redux-persist/es/index.js +++ /dev/null @@ -1,10 +0,0 @@ -export { default as persistReducer } from './persistReducer'; -export { default as persistCombineReducers } from './persistCombineReducers'; -export { default as persistStore } from './persistStore'; -export { default as createMigrate } from './createMigrate'; -export { default as createTransform } from './createTransform'; -export { default as getStoredState } from './getStoredState'; -export { default as createPersistoid } from './createPersistoid'; -export { default as purgeStoredState } from './purgeStoredState'; - -export * from './constants'; \ No newline at end of file diff --git a/node_modules/redux-persist/es/index.js.flow b/node_modules/redux-persist/es/index.js.flow deleted file mode 100644 index 0d9c048..0000000 --- a/node_modules/redux-persist/es/index.js.flow +++ /dev/null @@ -1,12 +0,0 @@ -// @flow - -export { default as persistReducer } from './persistReducer' -export { default as persistCombineReducers } from './persistCombineReducers' -export { default as persistStore } from './persistStore' -export { default as createMigrate } from './createMigrate' -export { default as createTransform } from './createTransform' -export { default as getStoredState } from './getStoredState' -export { default as createPersistoid } from './createPersistoid' -export { default as purgeStoredState } from './purgeStoredState' - -export * from './constants' diff --git a/node_modules/redux-persist/es/integration/getStoredStateMigrateV4.js b/node_modules/redux-persist/es/integration/getStoredStateMigrateV4.js deleted file mode 100644 index 2af4524..0000000 --- a/node_modules/redux-persist/es/integration/getStoredStateMigrateV4.js +++ /dev/null @@ -1,160 +0,0 @@ -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -import getStoredStateV5 from '../getStoredState'; - -export default function getStoredState(v4Config) { - return function (v5Config) { - return getStoredStateV5(v5Config).then(function (state) { - if (state) return state;else return getStoredStateV4(v4Config); - }); - }; -} - -var KEY_PREFIX = 'reduxPersist:'; - -function hasLocalStorage() { - if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== 'object' || !('localStorage' in window)) { - return false; - } - - try { - var _storage = window.localStorage; - var testKey = 'redux-persist localStorage test'; - _storage.setItem(testKey, 'test'); - _storage.getItem(testKey); - _storage.removeItem(testKey); - } catch (e) { - if (process.env.NODE_ENV !== 'production') console.warn('redux-persist localStorage test failed, persistence will be disabled.'); - return false; - } - return true; -} - -var noop = function noop() { - /* noop */return null; -}; -var noStorage = { - getItem: noop, - setItem: noop, - removeItem: noop, - getAllKeys: noop -}; -var createAsyncLocalStorage = function createAsyncLocalStorage() { - if (!hasLocalStorage()) return noStorage; - var localStorage = window.localStorage; - return { - getAllKeys: function getAllKeys(cb) { - try { - var keys = []; - for (var i = 0; i < localStorage.length; i++) { - keys.push(localStorage.key(i)); - } - cb(null, keys); - } catch (e) { - cb(e); - } - }, - getItem: function getItem(key, cb) { - try { - var s = localStorage.getItem(key); - cb(null, s); - } catch (e) { - cb(e); - } - }, - setItem: function setItem(key, string, cb) { - try { - localStorage.setItem(key, string); - cb(null); - } catch (e) { - cb(e); - } - }, - removeItem: function removeItem(key, cb) { - try { - localStorage.removeItem(key); - cb && cb(null); - } catch (e) { - cb(e); - } - } - }; -}; - -function getStoredStateV4(v4Config) { - return new Promise(function (resolve, reject) { - var storage = v4Config.storage || createAsyncLocalStorage(); - var deserializer = v4Config.serialize === false ? function (data) { - return data; - } : function (serial) { - return JSON.parse(serial); - }; - var blacklist = v4Config.blacklist || []; - var whitelist = v4Config.whitelist || false; - var transforms = v4Config.transforms || []; - var keyPrefix = v4Config.keyPrefix !== undefined ? v4Config.keyPrefix : KEY_PREFIX; - - // fallback getAllKeys to `keys` if present (LocalForage compatability) - if (storage.keys && !storage.getAllKeys) storage = _extends({}, storage, { getAllKeys: storage.keys }); - - var restoredState = {}; - var completionCount = 0; - - storage.getAllKeys(function (err) { - var allKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - - if (err) { - if (process.env.NODE_ENV !== 'production') console.warn('redux-persist/getStoredState: Error in storage.getAllKeys'); - return reject(err); - } - - var persistKeys = allKeys.filter(function (key) { - return key.indexOf(keyPrefix) === 0; - }).map(function (key) { - return key.slice(keyPrefix.length); - }); - var keysToRestore = persistKeys.filter(passWhitelistBlacklist); - - var restoreCount = keysToRestore.length; - if (restoreCount === 0) resolve(undefined); - keysToRestore.forEach(function (key) { - storage.getItem(createStorageKey(key), function (err, serialized) { - if (err && process.env.NODE_ENV !== 'production') console.warn('redux-persist/getStoredState: Error restoring data for key:', key, err);else restoredState[key] = rehydrate(key, serialized); - completionCount += 1; - if (completionCount === restoreCount) resolve(restoredState); - }); - }); - }); - - function rehydrate(key, serialized) { - var state = null; - - try { - var data = serialized ? deserializer(serialized) : undefined; - state = transforms.reduceRight(function (subState, transformer) { - return transformer.out(subState, key); - }, data); - } catch (err) { - if (process.env.NODE_ENV !== 'production') console.warn('redux-persist/getStoredState: Error restoring data for key:', key, err); - } - - return state; - } - - function passWhitelistBlacklist(key) { - if (whitelist && whitelist.indexOf(key) === -1) return false; - if (blacklist.indexOf(key) !== -1) return false; - return true; - } - - function createStorageKey(key) { - return '' + keyPrefix + key; - } - }); -} - -function defaultDeserializer(serial) { - return JSON.parse(serial); -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/integration/getStoredStateMigrateV4.js.flow b/node_modules/redux-persist/es/integration/getStoredStateMigrateV4.js.flow deleted file mode 100644 index 03ea063..0000000 --- a/node_modules/redux-persist/es/integration/getStoredStateMigrateV4.js.flow +++ /dev/null @@ -1,183 +0,0 @@ -// @flow - -import getStoredStateV5 from '../getStoredState' - -import type { PersistConfig, Transform } from '../types' - -type V4Config = { - storage?: Object, - keyPrefix?: string, - transforms?: Array, - blacklist?: Array, - whitelist?: Array, -} - -export default function getStoredState(v4Config: V4Config) { - return function(v5Config: PersistConfig) { - return getStoredStateV5(v5Config).then(state => { - if (state) return state - else return getStoredStateV4(v4Config) - }) - } -} - -const KEY_PREFIX = 'reduxPersist:' - -function hasLocalStorage() { - if (typeof window !== 'object' || !('localStorage' in window)) { - return false - } - - try { - let storage = window.localStorage - const testKey = `redux-persist localStorage test` - storage.setItem(testKey, 'test') - storage.getItem(testKey) - storage.removeItem(testKey) - } catch (e) { - if (process.env.NODE_ENV !== 'production') - console.warn( - `redux-persist localStorage test failed, persistence will be disabled.` - ) - return false - } - return true -} - -let noop = (...args: any) => { - /* noop */ return null -} -const noStorage = { - getItem: noop, - setItem: noop, - removeItem: noop, - getAllKeys: noop, -} -const createAsyncLocalStorage = () => { - if (!hasLocalStorage()) return noStorage - let localStorage = window.localStorage - return { - getAllKeys: function(cb) { - try { - var keys = [] - for (var i = 0; i < localStorage.length; i++) { - keys.push(localStorage.key(i)) - } - cb(null, keys) - } catch (e) { - cb(e) - } - }, - getItem(key, cb) { - try { - var s = localStorage.getItem(key) - cb(null, s) - } catch (e) { - cb(e) - } - }, - setItem(key, string, cb) { - try { - localStorage.setItem(key, string) - cb(null) - } catch (e) { - cb(e) - } - }, - removeItem(key, cb) { - try { - localStorage.removeItem(key) - cb && cb(null) - } catch (e) { - cb(e) - } - }, - } -} - -function getStoredStateV4(v4Config: V4Config) { - return new Promise((resolve, reject) => { - let storage = v4Config.storage || createAsyncLocalStorage() - const deserializer = - v4Config.serialize === false - ? data => data - : (serial: string) => JSON.parse(serial) - const blacklist = v4Config.blacklist || [] - const whitelist = v4Config.whitelist || false - const transforms = v4Config.transforms || [] - const keyPrefix = - v4Config.keyPrefix !== undefined ? v4Config.keyPrefix : KEY_PREFIX - - // fallback getAllKeys to `keys` if present (LocalForage compatability) - if (storage.keys && !storage.getAllKeys) - storage = { ...storage, getAllKeys: storage.keys } - - let restoredState = {} - let completionCount = 0 - - storage.getAllKeys((err, allKeys = []) => { - if (err) { - if (process.env.NODE_ENV !== 'production') - console.warn( - 'redux-persist/getStoredState: Error in storage.getAllKeys' - ) - return reject(err) - } - - let persistKeys = allKeys - .filter(key => key.indexOf(keyPrefix) === 0) - .map(key => key.slice(keyPrefix.length)) - let keysToRestore = persistKeys.filter(passWhitelistBlacklist) - - let restoreCount = keysToRestore.length - if (restoreCount === 0) resolve(undefined) - keysToRestore.forEach(key => { - storage.getItem(createStorageKey(key), (err, serialized) => { - if (err && process.env.NODE_ENV !== 'production') - console.warn( - 'redux-persist/getStoredState: Error restoring data for key:', - key, - err - ) - else restoredState[key] = rehydrate(key, serialized) - completionCount += 1 - if (completionCount === restoreCount) resolve(restoredState) - }) - }) - }) - - function rehydrate(key: string, serialized: ?string) { - let state = null - - try { - let data = serialized ? deserializer(serialized) : undefined - state = transforms.reduceRight((subState, transformer) => { - return transformer.out(subState, key) - }, data) - } catch (err) { - if (process.env.NODE_ENV !== 'production') - console.warn( - 'redux-persist/getStoredState: Error restoring data for key:', - key, - err - ) - } - - return state - } - - function passWhitelistBlacklist(key) { - if (whitelist && whitelist.indexOf(key) === -1) return false - if (blacklist.indexOf(key) !== -1) return false - return true - } - - function createStorageKey(key) { - return `${keyPrefix}${key}` - } - }) -} - -function defaultDeserializer(serial: string) { - return JSON.parse(serial) -} diff --git a/node_modules/redux-persist/es/integration/react.js b/node_modules/redux-persist/es/integration/react.js deleted file mode 100644 index ef86417..0000000 --- a/node_modules/redux-persist/es/integration/react.js +++ /dev/null @@ -1,72 +0,0 @@ -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -import React, { PureComponent } from 'react'; // eslint-disable-line import/no-unresolved -// eslint-disable-line import/no-unresolved - - -export var PersistGate = function (_PureComponent) { - _inherits(PersistGate, _PureComponent); - - function PersistGate() { - var _ref; - - var _temp, _this, _ret; - - _classCallCheck(this, PersistGate); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = PersistGate.__proto__ || Object.getPrototypeOf(PersistGate)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - bootstrapped: false - }, _this.handlePersistorState = function () { - var persistor = _this.props.persistor; - - var _persistor$getState = persistor.getState(), - bootstrapped = _persistor$getState.bootstrapped; - - if (bootstrapped) { - if (_this.props.onBeforeLift) { - Promise.resolve(_this.props.onBeforeLift()).then(function () { - return _this.setState({ bootstrapped: true }); - }).catch(function () { - return _this.setState({ bootstrapped: true }); - }); - } else { - _this.setState({ bootstrapped: true }); - } - _this._unsubscribe && _this._unsubscribe(); - } - }, _temp), _possibleConstructorReturn(_this, _ret); - } - - _createClass(PersistGate, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this._unsubscribe = this.props.persistor.subscribe(this.handlePersistorState); - this.handlePersistorState(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this._unsubscribe && this._unsubscribe(); - } - }, { - key: 'render', - value: function render() { - return this.state.bootstrapped ? this.props.children : this.props.loading; - } - }]); - - return PersistGate; -}(PureComponent); -PersistGate.defaultProps = { - loading: null -}; \ No newline at end of file diff --git a/node_modules/redux-persist/es/integration/react.js.flow b/node_modules/redux-persist/es/integration/react.js.flow deleted file mode 100644 index 6a34894..0000000 --- a/node_modules/redux-persist/es/integration/react.js.flow +++ /dev/null @@ -1,56 +0,0 @@ -// @flow -import React, { PureComponent } from 'react' // eslint-disable-line import/no-unresolved -import type { Node } from 'react' // eslint-disable-line import/no-unresolved -import type { Persistor } from '../types' - -type Props = { - onBeforeLift?: Function, - children?: Node, - loading?: Node, - persistor: Persistor, -} - -type State = { - bootstrapped: boolean, -} - -export class PersistGate extends PureComponent { - static defaultProps = { - loading: null, - } - - state = { - bootstrapped: false, - } - _unsubscribe: ?Function - - componentDidMount() { - this._unsubscribe = this.props.persistor.subscribe( - this.handlePersistorState - ) - this.handlePersistorState() - } - - handlePersistorState = () => { - const { persistor } = this.props - let { bootstrapped } = persistor.getState() - if (bootstrapped) { - if (this.props.onBeforeLift) { - Promise.resolve(this.props.onBeforeLift()) - .then(() => this.setState({ bootstrapped: true })) - .catch(() => this.setState({ bootstrapped: true })) - } else { - this.setState({ bootstrapped: true }) - } - this._unsubscribe && this._unsubscribe() - } - } - - componentWillUnmount() { - this._unsubscribe && this._unsubscribe() - } - - render() { - return this.state.bootstrapped ? this.props.children : this.props.loading - } -} diff --git a/node_modules/redux-persist/es/persistCombineReducers.js b/node_modules/redux-persist/es/persistCombineReducers.js deleted file mode 100644 index a92b9f1..0000000 --- a/node_modules/redux-persist/es/persistCombineReducers.js +++ /dev/null @@ -1,9 +0,0 @@ -import { combineReducers } from 'redux'; -import persistReducer from './persistReducer'; -import autoMergeLevel2 from './stateReconciler/autoMergeLevel2'; - -// combineReducers + persistReducer with stateReconciler defaulted to autoMergeLevel2 -export default function persistCombineReducers(config, reducers) { - config.stateReconciler = config.stateReconciler === undefined ? autoMergeLevel2 : config.stateReconciler; - return persistReducer(config, combineReducers(reducers)); -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/persistCombineReducers.js.flow b/node_modules/redux-persist/es/persistCombineReducers.js.flow deleted file mode 100644 index 3db95ea..0000000 --- a/node_modules/redux-persist/es/persistCombineReducers.js.flow +++ /dev/null @@ -1,22 +0,0 @@ -// @flow - -import { combineReducers } from 'redux' -import persistReducer from './persistReducer' -import autoMergeLevel2 from './stateReconciler/autoMergeLevel2' - -import type { PersistConfig } from './types' - -type Reducers = { - [key: string]: Function, -} - -type Reducer = (state: Object, action: Object) => Object - -// combineReducers + persistReducer with stateReconciler defaulted to autoMergeLevel2 -export default function persistCombineReducers( - config: PersistConfig, - reducers: Reducers -): Reducer { - config.stateReconciler = config.stateReconciler === undefined ? autoMergeLevel2 : config.stateReconciler - return persistReducer(config, combineReducers(reducers)) -} diff --git a/node_modules/redux-persist/es/persistReducer.js b/node_modules/redux-persist/es/persistReducer.js deleted file mode 100644 index 2d7f372..0000000 --- a/node_modules/redux-persist/es/persistReducer.js +++ /dev/null @@ -1,110 +0,0 @@ -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -import { FLUSH, PAUSE, PERSIST, PURGE, REHYDRATE, DEFAULT_VERSION } from './constants'; - -import autoMergeLevel1 from './stateReconciler/autoMergeLevel1'; -import createPersistoid from './createPersistoid'; -import defaultGetStoredState from './getStoredState'; -import purgeStoredState from './purgeStoredState'; - -/* - @TODO add validation / handling for: - - persisting a reducer which has nested _persist - - handling actions that fire before reydrate is called -*/ -export default function persistReducer(config, baseReducer) { - if (process.env.NODE_ENV !== 'production') { - if (!config) throw new Error('config is required for persistReducer'); - if (!config.key) throw new Error('key is required in persistor config'); - if (!config.storage) throw new Error("redux-persist: config.storage is required. Try using one of the provided storage engines `import storageLocal from 'redux-persist/es/storage/local'"); - } - - var version = config.version !== undefined ? config.version : DEFAULT_VERSION; - var debug = config.debug || false; - var stateReconciler = config.stateReconciler === undefined ? autoMergeLevel1 : config.stateReconciler; - var getStoredState = config.getStoredState || defaultGetStoredState; - var _persistoid = null; - var _purge = false; - var _paused = true; - - return function (state, action) { - var _ref = state || {}, - _persist = _ref._persist, - rest = _objectWithoutProperties(_ref, ['_persist']); - - var restState = rest; - - if (action.type === PERSIST) { - // @NOTE PERSIST resumes if paused. - _paused = false; - - // @NOTE only ever create persistoid once, ensure we call it at least once, even if _persist has already been set - if (!_persistoid) _persistoid = createPersistoid(config); - - // @NOTE PERSIST can be called multiple times, noop after the first - if (_persist) return state; - if (typeof action.rehydrate !== 'function' || typeof action.register !== 'function') throw new Error('redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.'); - - action.register(config.key); - - getStoredState(config).then(function (restoredState) { - var migrate = config.migrate || function (s, v) { - return Promise.resolve(s); - }; - migrate(restoredState, version).then(function (migratedState) { - action.rehydrate(config.key, migratedState); - }, function (migrateErr) { - if (process.env.NODE_ENV !== 'production' && migrateErr) console.error('redux-persist: migration error', migrateErr); - action.rehydrate(config.key, undefined, migrateErr); - }); - }, function (err) { - action.rehydrate(config.key, undefined, err); - }); - - return _extends({}, baseReducer(restState, action), { - _persist: { version: version, rehydrated: false } - }); - } else if (action.type === PURGE) { - _purge = true; - action.result(purgeStoredState(config)); - return _extends({}, baseReducer(restState, action), { - _persist: _persist - }); - } else if (action.type === FLUSH) { - action.result(_persistoid && _persistoid.flush()); - return _extends({}, baseReducer(restState, action), { - _persist: _persist - }); - } else if (action.type === PAUSE) { - _paused = true; - } else if (action.type === REHYDRATE) { - // noop on restState if purging - if (_purge) return _extends({}, restState, { - _persist: _extends({}, _persist, { rehydrated: true }) - - // @NOTE if key does not match, will continue to default else below - });if (action.key === config.key) { - var reducedState = baseReducer(restState, action); - var inboundState = action.payload; - var reconciledRest = stateReconciler !== false ? stateReconciler(inboundState, state, reducedState, config) : reducedState; - - return _extends({}, reconciledRest, { - _persist: _extends({}, _persist, { rehydrated: true }) - }); - } - } - - // if we have not already handled PERSIST, straight passthrough - if (!_persist) return baseReducer(state, action); - - // otherwise, pull off _persist, run the reducer, and update the persistoid - // @TODO more performant workaround for combineReducers warning - var newState = _extends({}, baseReducer(restState, action), { - _persist: _persist - // update the persistoid only if we are already rehydrated and are not paused - });_persist.rehydrated && _persistoid && !_paused && _persistoid.update(newState); - return newState; - }; -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/persistReducer.js.flow b/node_modules/redux-persist/es/persistReducer.js.flow deleted file mode 100644 index 681a80f..0000000 --- a/node_modules/redux-persist/es/persistReducer.js.flow +++ /dev/null @@ -1,155 +0,0 @@ -// @flow -import { - FLUSH, - PAUSE, - PERSIST, - PURGE, - REHYDRATE, - DEFAULT_VERSION, -} from './constants' - -import type { - PersistConfig, - MigrationManifest, - PersistState, - Persistoid, -} from './types' - -import autoMergeLevel1 from './stateReconciler/autoMergeLevel1' -import createPersistoid from './createPersistoid' -import defaultGetStoredState from './getStoredState' -import purgeStoredState from './purgeStoredState' - -type PersistPartial = { _persist: PersistState } -/* - @TODO add validation / handling for: - - persisting a reducer which has nested _persist - - handling actions that fire before reydrate is called -*/ -export default function persistReducer( - config: PersistConfig, - baseReducer: (State | void, Action) => State -): (State, Action) => State & PersistPartial { - if (process.env.NODE_ENV !== 'production') { - if (!config) throw new Error('config is required for persistReducer') - if (!config.key) throw new Error('key is required in persistor config') - if (!config.storage) - throw new Error( - "redux-persist: config.storage is required. Try using one of the provided storage engines `import storageLocal from 'redux-persist/es/storage/local'" - ) - } - - const version = - config.version !== undefined ? config.version : DEFAULT_VERSION - const debug = config.debug || false - const stateReconciler = - config.stateReconciler === undefined - ? autoMergeLevel1 - : config.stateReconciler - const getStoredState = config.getStoredState || defaultGetStoredState - let _persistoid = null - let _purge = false - let _paused = true - - return (state: State, action: Action) => { - let { _persist, ...rest } = state || {} - let restState: State = rest - - if (action.type === PERSIST) { - // @NOTE PERSIST resumes if paused. - _paused = false - - // @NOTE only ever create persistoid once, ensure we call it at least once, even if _persist has already been set - if (!_persistoid) _persistoid = createPersistoid(config) - - // @NOTE PERSIST can be called multiple times, noop after the first - if (_persist) return state - if ( - typeof action.rehydrate !== 'function' || - typeof action.register !== 'function' - ) - throw new Error( - 'redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.' - ) - - action.register(config.key) - - getStoredState(config).then( - restoredState => { - const migrate = config.migrate || ((s, v) => Promise.resolve(s)) - migrate(restoredState, version).then( - migratedState => { - action.rehydrate(config.key, migratedState) - }, - migrateErr => { - if (process.env.NODE_ENV !== 'production' && migrateErr) - console.error('redux-persist: migration error', migrateErr) - action.rehydrate(config.key, undefined, migrateErr) - } - ) - }, - err => { - action.rehydrate(config.key, undefined, err) - } - ) - - return { - ...baseReducer(restState, action), - _persist: { version, rehydrated: false }, - } - } else if (action.type === PURGE) { - _purge = true - action.result(purgeStoredState(config)) - return { - ...baseReducer(restState, action), - _persist, - } - } else if (action.type === FLUSH) { - action.result(_persistoid && _persistoid.flush()) - return { - ...baseReducer(restState, action), - _persist, - } - } else if (action.type === PAUSE) { - _paused = true - } else if (action.type === REHYDRATE) { - // noop on restState if purging - if (_purge) - return { - ...restState, - _persist: { ..._persist, rehydrated: true }, - } - - // @NOTE if key does not match, will continue to default else below - if (action.key === config.key) { - let reducedState = baseReducer(restState, action) - let inboundState = action.payload - let reconciledRest: State = - stateReconciler !== false - ? stateReconciler(inboundState, state, reducedState, config) - : reducedState - - return { - ...reconciledRest, - _persist: { ..._persist, rehydrated: true }, - } - } - } - - // if we have not already handled PERSIST, straight passthrough - if (!_persist) return baseReducer(state, action) - - // otherwise, pull off _persist, run the reducer, and update the persistoid - // @TODO more performant workaround for combineReducers warning - let newState = { - ...baseReducer(restState, action), - _persist, - } - // update the persistoid only if we are already rehydrated and are not paused - _persist.rehydrated && - _persistoid && - !_paused && - _persistoid.update(newState) - return newState - } -} diff --git a/node_modules/redux-persist/es/persistStore.js b/node_modules/redux-persist/es/persistStore.js deleted file mode 100644 index e93f414..0000000 --- a/node_modules/redux-persist/es/persistStore.js +++ /dev/null @@ -1,102 +0,0 @@ -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -import { createStore } from 'redux'; - -import persistReducer from './persistReducer'; -import { FLUSH, PAUSE, PERSIST, PURGE, REGISTER, REHYDRATE } from './constants'; - -var initialState = { - registry: [], - bootstrapped: false -}; - -var persistorReducer = function persistorReducer() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - case REGISTER: - return _extends({}, state, { registry: [].concat(_toConsumableArray(state.registry), [action.key]) }); - case REHYDRATE: - var firstIndex = state.registry.indexOf(action.key); - var registry = [].concat(_toConsumableArray(state.registry)); - registry.splice(firstIndex, 1); - return _extends({}, state, { registry: registry, bootstrapped: registry.length === 0 }); - default: - return state; - } -}; - -export default function persistStore(store, persistorOptions, cb) { - var options = persistorOptions || {}; - - // help catch incorrect usage of passing PersistConfig in as PersistorOptions - if (process.env.NODE_ENV !== 'production') { - var bannedKeys = ['blacklist', 'whitelist', 'transforms', 'storage', 'keyPrefix', 'migrate']; - bannedKeys.forEach(function (k) { - if (!!options[k]) console.error('redux-persist: invalid option passed to persistStore: "' + k + '". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.'); - }); - } - var boostrappedCb = cb || false; - var persistor = createStore(persistorReducer, undefined, options.enhancer); - - persistor.purge = function () { - var results = []; - store.dispatch({ - type: PURGE, - result: function result(purgeResult) { - results.push(purgeResult); - } - }); - return Promise.all(results); - }; - - persistor.flush = function () { - var results = []; - store.dispatch({ - type: FLUSH, - result: function result(flushResult) { - results.push(flushResult); - } - }); - return Promise.all(results); - }; - - persistor.pause = function () { - store.dispatch({ - type: PAUSE - }); - }; - - var register = function register(key) { - persistor.dispatch({ - type: REGISTER, - key: key - }); - }; - - var rehydrate = function rehydrate(key, payload, err) { - var rehydrateAction = { - type: REHYDRATE, - payload: payload, - err: err, - key: key - // dispatch to `store` to rehydrate and `persistor` to track result - };store.dispatch(rehydrateAction); - persistor.dispatch(rehydrateAction); - if (boostrappedCb && persistor.getState().bootstrapped) { - boostrappedCb(); - boostrappedCb = false; - } - }; - - persistor.persist = function () { - store.dispatch({ type: PERSIST, register: register, rehydrate: rehydrate }); - }; - - persistor.persist(); - - return persistor; -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/persistStore.js.flow b/node_modules/redux-persist/es/persistStore.js.flow deleted file mode 100644 index 7118baf..0000000 --- a/node_modules/redux-persist/es/persistStore.js.flow +++ /dev/null @@ -1,125 +0,0 @@ -// @flow - -import type { - Persistor, - PersistConfig, - PersistorOptions, - MigrationManifest, - RehydrateAction, - RehydrateErrorType, -} from './types' - -import { createStore } from 'redux' -import persistReducer from './persistReducer' -import { FLUSH, PAUSE, PERSIST, PURGE, REGISTER, REHYDRATE } from './constants' - -type PendingRehydrate = [Object, RehydrateErrorType, PersistConfig] -type Persist = (PersistConfig, MigrationManifest) => R => R -type CreatePersistor = Object => void -type BoostrappedCb = () => any - -const initialState = { - registry: [], - bootstrapped: false, -} - -const persistorReducer = (state = initialState, action) => { - switch (action.type) { - case REGISTER: - return { ...state, registry: [...state.registry, action.key] } - case REHYDRATE: - let firstIndex = state.registry.indexOf(action.key) - let registry = [...state.registry] - registry.splice(firstIndex, 1) - return { ...state, registry, bootstrapped: registry.length === 0 } - default: - return state - } -} - -export default function persistStore( - store: Object, - persistorOptions?: PersistorOptions, - cb?: BoostrappedCb -): Persistor { - let options: Object = persistorOptions || {} - - // help catch incorrect usage of passing PersistConfig in as PersistorOptions - if (process.env.NODE_ENV !== 'production') { - let bannedKeys = [ - 'blacklist', - 'whitelist', - 'transforms', - 'storage', - 'keyPrefix', - 'migrate', - ] - bannedKeys.forEach(k => { - if (!!options[k]) - console.error( - `redux-persist: invalid option passed to persistStore: "${k}". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.` - ) - }) - } - let boostrappedCb = cb || false - let persistor = createStore(persistorReducer, undefined, options.enhancer) - - persistor.purge = () => { - let results = [] - store.dispatch({ - type: PURGE, - result: purgeResult => { - results.push(purgeResult) - }, - }) - return Promise.all(results) - } - - persistor.flush = () => { - let results = [] - store.dispatch({ - type: FLUSH, - result: flushResult => { - results.push(flushResult) - }, - }) - return Promise.all(results) - } - - persistor.pause = () => { - store.dispatch({ - type: PAUSE, - }) - } - - let register = (key: string) => { - persistor.dispatch({ - type: REGISTER, - key, - }) - } - - let rehydrate = (key: string, payload: Object, err: any) => { - let rehydrateAction = { - type: REHYDRATE, - payload, - err, - key, - } - // dispatch to `store` to rehydrate and `persistor` to track result - store.dispatch(rehydrateAction) - persistor.dispatch(rehydrateAction) - if (boostrappedCb && persistor.getState().bootstrapped) { - boostrappedCb() - boostrappedCb = false - } - } - - persistor.persist = () => { - store.dispatch({ type: PERSIST, register, rehydrate }) - } - - persistor.persist() - - return persistor -} diff --git a/node_modules/redux-persist/es/purgeStoredState.js b/node_modules/redux-persist/es/purgeStoredState.js deleted file mode 100644 index a07d21a..0000000 --- a/node_modules/redux-persist/es/purgeStoredState.js +++ /dev/null @@ -1,15 +0,0 @@ - - -import { KEY_PREFIX } from './constants'; - -export default function purgeStoredState(config) { - var storage = config.storage; - var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : KEY_PREFIX) + config.key; - return storage.removeItem(storageKey, warnIfRemoveError); -} - -function warnIfRemoveError(err) { - if (err && process.env.NODE_ENV !== 'production') { - console.error('redux-persist/purgeStoredState: Error purging data stored state', err); - } -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/purgeStoredState.js.flow b/node_modules/redux-persist/es/purgeStoredState.js.flow deleted file mode 100644 index c780f88..0000000 --- a/node_modules/redux-persist/es/purgeStoredState.js.flow +++ /dev/null @@ -1,22 +0,0 @@ -// @flow - -import type { PersistConfig } from './types' - -import { KEY_PREFIX } from './constants' - -export default function purgeStoredState(config: PersistConfig) { - const storage = config.storage - const storageKey = `${config.keyPrefix !== undefined - ? config.keyPrefix - : KEY_PREFIX}${config.key}` - return storage.removeItem(storageKey, warnIfRemoveError) -} - -function warnIfRemoveError(err) { - if (err && process.env.NODE_ENV !== 'production') { - console.error( - 'redux-persist/purgeStoredState: Error purging data stored state', - err - ) - } -} diff --git a/node_modules/redux-persist/es/stateReconciler/autoMergeLevel1.js b/node_modules/redux-persist/es/stateReconciler/autoMergeLevel1.js deleted file mode 100644 index 95ef27b..0000000 --- a/node_modules/redux-persist/es/stateReconciler/autoMergeLevel1.js +++ /dev/null @@ -1,33 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -export default function autoMergeLevel1(inboundState, originalState, reducedState, _ref) { - var debug = _ref.debug; - - var newState = _extends({}, reducedState); - // only rehydrate if inboundState exists and is an object - if (inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') { - Object.keys(inboundState).forEach(function (key) { - // ignore _persist data - if (key === '_persist') return; - // if reducer modifies substate, skip auto rehydration - if (originalState[key] !== reducedState[key]) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist/stateReconciler: sub state for key `%s` modified, skipping.', key); - return; - } - // otherwise hard set the new value - newState[key] = inboundState[key]; - }); - } - - if (process.env.NODE_ENV !== 'production' && debug && inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') console.log('redux-persist/stateReconciler: rehydrated keys \'' + Object.keys(inboundState).join(', ') + '\''); - - return newState; -} - -/* - autoMergeLevel1: - - merges 1 level of substate - - skips substate if already modified -*/ \ No newline at end of file diff --git a/node_modules/redux-persist/es/stateReconciler/autoMergeLevel1.js.flow b/node_modules/redux-persist/es/stateReconciler/autoMergeLevel1.js.flow deleted file mode 100644 index 880f28a..0000000 --- a/node_modules/redux-persist/es/stateReconciler/autoMergeLevel1.js.flow +++ /dev/null @@ -1,50 +0,0 @@ -// @flow - -/* - autoMergeLevel1: - - merges 1 level of substate - - skips substate if already modified -*/ - -import type { PersistConfig } from '../types' - -export default function autoMergeLevel1( - inboundState: State, - originalState: State, - reducedState: State, - { debug }: PersistConfig -): State { - let newState = { ...reducedState } - // only rehydrate if inboundState exists and is an object - if (inboundState && typeof inboundState === 'object') { - Object.keys(inboundState).forEach(key => { - // ignore _persist data - if (key === '_persist') return - // if reducer modifies substate, skip auto rehydration - if (originalState[key] !== reducedState[key]) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - 'redux-persist/stateReconciler: sub state for key `%s` modified, skipping.', - key - ) - return - } - // otherwise hard set the new value - newState[key] = inboundState[key] - }) - } - - if ( - process.env.NODE_ENV !== 'production' && - debug && - inboundState && - typeof inboundState === 'object' - ) - console.log( - `redux-persist/stateReconciler: rehydrated keys '${Object.keys( - inboundState - ).join(', ')}'` - ) - - return newState -} diff --git a/node_modules/redux-persist/es/stateReconciler/autoMergeLevel2.js b/node_modules/redux-persist/es/stateReconciler/autoMergeLevel2.js deleted file mode 100644 index acf61a2..0000000 --- a/node_modules/redux-persist/es/stateReconciler/autoMergeLevel2.js +++ /dev/null @@ -1,43 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -export default function autoMergeLevel2(inboundState, originalState, reducedState, _ref) { - var debug = _ref.debug; - - var newState = _extends({}, reducedState); - // only rehydrate if inboundState exists and is an object - if (inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') { - Object.keys(inboundState).forEach(function (key) { - // ignore _persist data - if (key === '_persist') return; - // if reducer modifies substate, skip auto rehydration - if (originalState[key] !== reducedState[key]) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist/stateReconciler: sub state for key `%s` modified, skipping.', key); - return; - } - if (isPlainEnoughObject(reducedState[key])) { - // if object is plain enough shallow merge the new values (hence "Level2") - newState[key] = _extends({}, newState[key], inboundState[key]); - return; - } - // otherwise hard set - newState[key] = inboundState[key]; - }); - } - - if (process.env.NODE_ENV !== 'production' && debug && inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') console.log('redux-persist/stateReconciler: rehydrated keys \'' + Object.keys(inboundState).join(', ') + '\''); - - return newState; -} - -/* - autoMergeLevel2: - - merges 2 level of substate - - skips substate if already modified - - this is essentially redux-perist v4 behavior -*/ - -function isPlainEnoughObject(o) { - return o !== null && !Array.isArray(o) && (typeof o === 'undefined' ? 'undefined' : _typeof(o)) === 'object'; -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/stateReconciler/autoMergeLevel2.js.flow b/node_modules/redux-persist/es/stateReconciler/autoMergeLevel2.js.flow deleted file mode 100644 index f451380..0000000 --- a/node_modules/redux-persist/es/stateReconciler/autoMergeLevel2.js.flow +++ /dev/null @@ -1,60 +0,0 @@ -// @flow - -/* - autoMergeLevel2: - - merges 2 level of substate - - skips substate if already modified - - this is essentially redux-perist v4 behavior -*/ - -import type { PersistConfig } from '../types' - -export default function autoMergeLevel2( - inboundState: State, - originalState: State, - reducedState: State, - { debug }: PersistConfig -): State { - let newState = { ...reducedState } - // only rehydrate if inboundState exists and is an object - if (inboundState && typeof inboundState === 'object') { - Object.keys(inboundState).forEach(key => { - // ignore _persist data - if (key === '_persist') return - // if reducer modifies substate, skip auto rehydration - if (originalState[key] !== reducedState[key]) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - 'redux-persist/stateReconciler: sub state for key `%s` modified, skipping.', - key - ) - return - } - if (isPlainEnoughObject(reducedState[key])) { - // if object is plain enough shallow merge the new values (hence "Level2") - newState[key] = { ...newState[key], ...inboundState[key] } - return - } - // otherwise hard set - newState[key] = inboundState[key] - }) - } - - if ( - process.env.NODE_ENV !== 'production' && - debug && - inboundState && - typeof inboundState === 'object' - ) - console.log( - `redux-persist/stateReconciler: rehydrated keys '${Object.keys( - inboundState - ).join(', ')}'` - ) - - return newState -} - -function isPlainEnoughObject(o) { - return o !== null && !Array.isArray(o) && typeof o === 'object' -} diff --git a/node_modules/redux-persist/es/stateReconciler/hardSet.js b/node_modules/redux-persist/es/stateReconciler/hardSet.js deleted file mode 100644 index 415341b..0000000 --- a/node_modules/redux-persist/es/stateReconciler/hardSet.js +++ /dev/null @@ -1,10 +0,0 @@ - - -/* - hardSet: - - hard set incoming state -*/ - -export default function hardSet(inboundState) { - return inboundState; -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/stateReconciler/hardSet.js.flow b/node_modules/redux-persist/es/stateReconciler/hardSet.js.flow deleted file mode 100644 index 1f5fcda..0000000 --- a/node_modules/redux-persist/es/stateReconciler/hardSet.js.flow +++ /dev/null @@ -1,10 +0,0 @@ -// @flow - -/* - hardSet: - - hard set incoming state -*/ - -export default function hardSet(inboundState: State): State { - return inboundState -} diff --git a/node_modules/redux-persist/es/storage/createWebStorage.js b/node_modules/redux-persist/es/storage/createWebStorage.js deleted file mode 100644 index 87d949d..0000000 --- a/node_modules/redux-persist/es/storage/createWebStorage.js +++ /dev/null @@ -1,22 +0,0 @@ -import getStorage from './getStorage'; - -export default function createWebStorage(type) { - var storage = getStorage(type); - return { - getItem: function getItem(key) { - return new Promise(function (resolve, reject) { - resolve(storage.getItem(key)); - }); - }, - setItem: function setItem(key, item) { - return new Promise(function (resolve, reject) { - resolve(storage.setItem(key, item)); - }); - }, - removeItem: function removeItem(key) { - return new Promise(function (resolve, reject) { - resolve(storage.removeItem(key)); - }); - } - }; -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/storage/createWebStorage.js.flow b/node_modules/redux-persist/es/storage/createWebStorage.js.flow deleted file mode 100644 index b77132c..0000000 --- a/node_modules/redux-persist/es/storage/createWebStorage.js.flow +++ /dev/null @@ -1,23 +0,0 @@ -// @flow -import getStorage from './getStorage' - -export default function createWebStorage(type: string) { - let storage = getStorage(type) - return { - getItem: (key: string): Promise => { - return new Promise((resolve, reject) => { - resolve(storage.getItem(key)) - }) - }, - setItem: (key: string, item: string): Promise => { - return new Promise((resolve, reject) => { - resolve(storage.setItem(key, item)) - }) - }, - removeItem: (key: string): Promise => { - return new Promise((resolve, reject) => { - resolve(storage.removeItem(key)) - }) - }, - } -} diff --git a/node_modules/redux-persist/es/storage/getStorage.js b/node_modules/redux-persist/es/storage/getStorage.js deleted file mode 100644 index bcc7414..0000000 --- a/node_modules/redux-persist/es/storage/getStorage.js +++ /dev/null @@ -1,37 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -function noop() {} - -var noopStorage = { - getItem: noop, - setItem: noop, - removeItem: noop -}; - -function hasStorage(storageType) { - if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== 'object' || !(storageType in window)) { - return false; - } - - try { - var storage = window[storageType]; - var testKey = 'redux-persist ' + storageType + ' test'; - storage.setItem(testKey, 'test'); - storage.getItem(testKey); - storage.removeItem(testKey); - } catch (e) { - if (process.env.NODE_ENV !== 'production') console.warn('redux-persist ' + storageType + ' test failed, persistence will be disabled.'); - return false; - } - return true; -} - -export default function getStorage(type) { - var storageType = type + 'Storage'; - if (hasStorage(storageType)) return window[storageType];else { - if (process.env.NODE_ENV !== 'production') { - console.error('redux-persist failed to create sync storage. falling back to memory storage.'); - } - return noopStorage; - } -} \ No newline at end of file diff --git a/node_modules/redux-persist/es/storage/getStorage.js.flow b/node_modules/redux-persist/es/storage/getStorage.js.flow deleted file mode 100644 index a6b8e60..0000000 --- a/node_modules/redux-persist/es/storage/getStorage.js.flow +++ /dev/null @@ -1,44 +0,0 @@ -// @flow - -import type { Storage } from '../types' - -function noop() {} -let noopStorage = { - getItem: noop, - setItem: noop, - removeItem: noop, -} - -function hasStorage(storageType) { - if (typeof window !== 'object' || !(storageType in window)) { - return false - } - - try { - let storage = window[storageType] - const testKey = `redux-persist ${storageType} test` - storage.setItem(testKey, 'test') - storage.getItem(testKey) - storage.removeItem(testKey) - } catch (e) { - if (process.env.NODE_ENV !== 'production') - console.warn( - `redux-persist ${storageType} test failed, persistence will be disabled.` - ) - return false - } - return true -} - -export default function getStorage(type: string): Storage { - const storageType = `${type}Storage` - if (hasStorage(storageType)) return window[storageType] - else { - if (process.env.NODE_ENV !== 'production') { - console.error( - `redux-persist failed to create sync storage. falling back to memory storage.` - ) - } - return noopStorage - } -} diff --git a/node_modules/redux-persist/es/storage/index.js b/node_modules/redux-persist/es/storage/index.js deleted file mode 100644 index bdd8dea..0000000 --- a/node_modules/redux-persist/es/storage/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import createWebStorage from './createWebStorage'; - -export default createWebStorage('local'); \ No newline at end of file diff --git a/node_modules/redux-persist/es/storage/index.js.flow b/node_modules/redux-persist/es/storage/index.js.flow deleted file mode 100644 index 0532b1f..0000000 --- a/node_modules/redux-persist/es/storage/index.js.flow +++ /dev/null @@ -1,5 +0,0 @@ -// @flow - -import createWebStorage from './createWebStorage' - -export default createWebStorage('local') diff --git a/node_modules/redux-persist/es/storage/index.native.js b/node_modules/redux-persist/es/storage/index.native.js deleted file mode 100644 index 81d0c60..0000000 --- a/node_modules/redux-persist/es/storage/index.native.js +++ /dev/null @@ -1,6 +0,0 @@ -// @noflow -/* eslint-disable */ - -import { AsyncStorage } from 'react-native'; - -export default AsyncStorage; \ No newline at end of file diff --git a/node_modules/redux-persist/es/storage/index.native.js.flow b/node_modules/redux-persist/es/storage/index.native.js.flow deleted file mode 100644 index 641e10f..0000000 --- a/node_modules/redux-persist/es/storage/index.native.js.flow +++ /dev/null @@ -1,6 +0,0 @@ -// @noflow -/* eslint-disable */ - -import { AsyncStorage } from 'react-native' - -export default AsyncStorage diff --git a/node_modules/redux-persist/es/storage/session.js b/node_modules/redux-persist/es/storage/session.js deleted file mode 100644 index eb01977..0000000 --- a/node_modules/redux-persist/es/storage/session.js +++ /dev/null @@ -1,3 +0,0 @@ -import createWebStorage from './createWebStorage'; - -export default createWebStorage('session'); \ No newline at end of file diff --git a/node_modules/redux-persist/es/storage/session.js.flow b/node_modules/redux-persist/es/storage/session.js.flow deleted file mode 100644 index 1bb16d6..0000000 --- a/node_modules/redux-persist/es/storage/session.js.flow +++ /dev/null @@ -1,5 +0,0 @@ -// @flow - -import createWebStorage from './createWebStorage' - -export default createWebStorage('session') diff --git a/node_modules/redux-persist/es/types.js b/node_modules/redux-persist/es/types.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/redux-persist/es/types.js.flow b/node_modules/redux-persist/es/types.js.flow deleted file mode 100644 index 2873bdb..0000000 --- a/node_modules/redux-persist/es/types.js.flow +++ /dev/null @@ -1,82 +0,0 @@ -// @flow - -export type PersistState = { - version: number, - rehydrated: boolean, -} - -export type PersistedState = { - _persist: PersistState, -} | void - -export type PersistConfig = { - version?: number, - storage: Object, - key: string, - keyPrefix?: string, // @TODO remove in v6 - blacklist?: Array, - whitelist?: Array, - transforms?: Array, - throttle?: number, - migrate?: (PersistedState, number) => Promise, - stateReconciler?: false | Function, - getStoredState?: PersistConfig => Promise, // used for migrations - debug?: boolean, - serialize?: boolean, -} - -export type PersistorOptions = { - enhancer?: Function, -} - -export type Storage = { - getItem: (string, ?(string) => any) => any, - setItem: (string, string, ?() => any) => any, - removeItem: (string, ?() => any) => any, -} - -export type MigrationManifest = { - [number | string]: (PersistedState) => PersistedState, -} - -export type Transform = { - in: (Object | string, string) => Object, - out: (Object | string, string) => Object, - config?: PersistConfig, -} - -export type RehydrateErrorType = any - -export type RehydrateAction = { - type: 'redux-persist/REHYDRATE', - key: string, - payload: ?Object, - err: ?RehydrateErrorType, -} - -export type Persistoid = { - update: Object => void, - flush: () => Promise, -} - -type RegisterAction = { - type: 'redux-persist/REGISTER', - key: string, -} - -type PersistorAction = RehydrateAction | RegisterAction - -type PersistorState = { - registry: Array, - bootstrapped: boolean, -} - -type PersistorSubscribeCallback = () => any - -export type Persistor = { - purge: () => Promise, - flush: () => Promise, - +dispatch: PersistorAction => PersistorAction, - +getState: () => PersistorState, - +subscribe: PersistorSubscribeCallback => () => any, -} diff --git a/node_modules/redux-persist/es/utils/curry.js b/node_modules/redux-persist/es/utils/curry.js deleted file mode 100644 index 868a477..0000000 --- a/node_modules/redux-persist/es/utils/curry.js +++ /dev/null @@ -1,28 +0,0 @@ -// // -// // credit @gcanti, taken from https://github.com/gcanti/flow-static-land/blob/e36cd55b8f8541e81828ec39964bdb6f5ccbec91/src/Fun.js - -// export type Fn1 = (a: A, ...rest: Array) => B -// export type Fn2 = (a: A, b: B, ...rest: Array) => C -// export type Fn3 = (a: A, b: B, c: C, ...rest: Array) => D - -// export type CurriedFn2 = Fn1> & Fn2 -// export type CurriedFn3 = Fn1> & -// Fn2> & -// Fn3 - -// declare function curry(f: Fn2): CurriedFn2 // eslint-disable-line no-redeclare -// declare function curry(f: Fn3): CurriedFn3 // eslint-disable-line no-redeclare - -// declare function curried(f, length, acc) { -// return function() { -// const combined = acc.concat(Array.prototype.slice.call(arguments)) -// return combined.length >= length -// ? f.apply(this, combined) -// : curried(f, length, combined) -// } -// } - -// export function curry(f: Function) { -// // eslint-disable-line no-redeclare -// return curried(f, f.length, []) -// } \ No newline at end of file diff --git a/node_modules/redux-persist/es/utils/curry.js.flow b/node_modules/redux-persist/es/utils/curry.js.flow deleted file mode 100644 index b55b1a8..0000000 --- a/node_modules/redux-persist/es/utils/curry.js.flow +++ /dev/null @@ -1,28 +0,0 @@ -// // @flow -// // credit @gcanti, taken from https://github.com/gcanti/flow-static-land/blob/e36cd55b8f8541e81828ec39964bdb6f5ccbec91/src/Fun.js - -// export type Fn1 = (a: A, ...rest: Array) => B -// export type Fn2 = (a: A, b: B, ...rest: Array) => C -// export type Fn3 = (a: A, b: B, c: C, ...rest: Array) => D - -// export type CurriedFn2 = Fn1> & Fn2 -// export type CurriedFn3 = Fn1> & -// Fn2> & -// Fn3 - -// declare function curry(f: Fn2): CurriedFn2 // eslint-disable-line no-redeclare -// declare function curry(f: Fn3): CurriedFn3 // eslint-disable-line no-redeclare - -// declare function curried(f, length, acc) { -// return function() { -// const combined = acc.concat(Array.prototype.slice.call(arguments)) -// return combined.length >= length -// ? f.apply(this, combined) -// : curried(f, length, combined) -// } -// } - -// export function curry(f: Function) { -// // eslint-disable-line no-redeclare -// return curried(f, f.length, []) -// } diff --git a/node_modules/redux-persist/lib/constants.js b/node_modules/redux-persist/lib/constants.js deleted file mode 100644 index e128dd6..0000000 --- a/node_modules/redux-persist/lib/constants.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -exports.__esModule = true; -var KEY_PREFIX = exports.KEY_PREFIX = 'persist:'; -var FLUSH = exports.FLUSH = 'persist/FLUSH'; -var REHYDRATE = exports.REHYDRATE = 'persist/REHYDRATE'; -var PAUSE = exports.PAUSE = 'persist/PAUSE'; -var PERSIST = exports.PERSIST = 'persist/PERSIST'; -var PURGE = exports.PURGE = 'persist/PURGE'; -var REGISTER = exports.REGISTER = 'persist/REGISTER'; -var DEFAULT_VERSION = exports.DEFAULT_VERSION = -1; \ No newline at end of file diff --git a/node_modules/redux-persist/lib/constants.js.flow b/node_modules/redux-persist/lib/constants.js.flow deleted file mode 100644 index 009705f..0000000 --- a/node_modules/redux-persist/lib/constants.js.flow +++ /dev/null @@ -1,10 +0,0 @@ -// @flow - -export const KEY_PREFIX = 'persist:' -export const FLUSH = 'persist/FLUSH' -export const REHYDRATE = 'persist/REHYDRATE' -export const PAUSE = 'persist/PAUSE' -export const PERSIST = 'persist/PERSIST' -export const PURGE = 'persist/PURGE' -export const REGISTER = 'persist/REGISTER' -export const DEFAULT_VERSION = -1 diff --git a/node_modules/redux-persist/lib/createMigrate.js b/node_modules/redux-persist/lib/createMigrate.js deleted file mode 100644 index 025868b..0000000 --- a/node_modules/redux-persist/lib/createMigrate.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.default = createMigrate; - -var _constants = require('./constants'); - -function createMigrate(migrations, config) { - var _ref = config || {}, - debug = _ref.debug; - - return function (state, currentVersion) { - if (!state) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist: no inbound state, skipping migration'); - return Promise.resolve(undefined); - } - - var inboundVersion = state._persist && state._persist.version !== undefined ? state._persist.version : _constants.DEFAULT_VERSION; - if (inboundVersion === currentVersion) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist: versions match, noop migration'); - return Promise.resolve(state); - } - if (inboundVersion > currentVersion) { - if (process.env.NODE_ENV !== 'production') console.error('redux-persist: downgrading version is not supported'); - return Promise.resolve(state); - } - - var migrationKeys = Object.keys(migrations).map(function (ver) { - return parseInt(ver); - }).filter(function (key) { - return currentVersion >= key && key > inboundVersion; - }).sort(function (a, b) { - return a - b; - }); - - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist: migrationKeys', migrationKeys); - try { - var migratedState = migrationKeys.reduce(function (state, versionKey) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist: running migration for versionKey', versionKey); - return migrations[versionKey](state); - }, state); - return Promise.resolve(migratedState); - } catch (err) { - return Promise.reject(err); - } - }; -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/createMigrate.js.flow b/node_modules/redux-persist/lib/createMigrate.js.flow deleted file mode 100644 index 5426c46..0000000 --- a/node_modules/redux-persist/lib/createMigrate.js.flow +++ /dev/null @@ -1,58 +0,0 @@ -// @flow - -import { DEFAULT_VERSION } from './constants' - -import type { PersistedState, MigrationManifest } from './types' - -export default function createMigrate( - migrations: MigrationManifest, - config?: { debug: boolean } -) { - let { debug } = config || {} - return function( - state: PersistedState, - currentVersion: number - ): Promise { - if (!state) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log('redux-persist: no inbound state, skipping migration') - return Promise.resolve(undefined) - } - - let inboundVersion: number = - state._persist && state._persist.version !== undefined - ? state._persist.version - : DEFAULT_VERSION - if (inboundVersion === currentVersion) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log('redux-persist: versions match, noop migration') - return Promise.resolve(state) - } - if (inboundVersion > currentVersion) { - if (process.env.NODE_ENV !== 'production') - console.error('redux-persist: downgrading version is not supported') - return Promise.resolve(state) - } - - let migrationKeys = Object.keys(migrations) - .map(ver => parseInt(ver)) - .filter(key => currentVersion >= key && key > inboundVersion) - .sort((a, b) => a - b) - - if (process.env.NODE_ENV !== 'production' && debug) - console.log('redux-persist: migrationKeys', migrationKeys) - try { - let migratedState = migrationKeys.reduce((state, versionKey) => { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - 'redux-persist: running migration for versionKey', - versionKey - ) - return migrations[versionKey](state) - }, state) - return Promise.resolve(migratedState) - } catch (err) { - return Promise.reject(err) - } - } -} diff --git a/node_modules/redux-persist/lib/createPersistoid.js b/node_modules/redux-persist/lib/createPersistoid.js deleted file mode 100644 index 8c66f41..0000000 --- a/node_modules/redux-persist/lib/createPersistoid.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.default = createPersistoid; - -var _constants = require('./constants'); - -function createPersistoid(config) { - // defaults - var blacklist = config.blacklist || null; - var whitelist = config.whitelist || null; - var transforms = config.transforms || []; - var throttle = config.throttle || 0; - var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : _constants.KEY_PREFIX) + config.key; - var storage = config.storage; - var serialize = config.serialize === false ? function (x) { - return x; - } : defaultSerialize; - - // initialize stateful values - var lastState = {}; - var stagedState = {}; - var keysToProcess = []; - var timeIterator = null; - var writePromise = null; - - var update = function update(state) { - // add any changed keys to the queue - Object.keys(state).forEach(function (key) { - var subState = state[key]; - if (!passWhitelistBlacklist(key)) return; // is keyspace ignored? noop - if (lastState[key] === state[key]) return; // value unchanged? noop - if (keysToProcess.indexOf(key) !== -1) return; // is key already queued? noop - keysToProcess.push(key); // add key to queue - }); - - // start the time iterator if not running (read: throttle) - if (timeIterator === null) { - timeIterator = setInterval(processNextKey, throttle); - } - - lastState = state; - }; - - function processNextKey() { - if (keysToProcess.length === 0) { - if (timeIterator) clearInterval(timeIterator); - timeIterator = null; - return; - } - - var key = keysToProcess.shift(); - var endState = transforms.reduce(function (subState, transformer) { - return transformer.in(subState, key); - }, lastState[key]); - if (typeof endState !== 'undefined') stagedWrite(key, endState); - } - - function stagedWrite(key, endState) { - try { - stagedState[key] = serialize(endState); - } catch (err) { - console.error('redux-persist/createPersistoid: error serializing state', err); - } - if (keysToProcess.length === 0) { - // cleanup any removed keys just before write. - Object.keys(stagedState).forEach(function (key) { - if (lastState[key] === undefined) { - delete stagedState[key]; - } - }); - - writePromise = storage.setItem(storageKey, serialize(stagedState)).catch(onWriteFail); - } - } - - function passWhitelistBlacklist(key) { - if (whitelist && whitelist.indexOf(key) === -1 && key !== '_persist') return false; - if (blacklist && blacklist.indexOf(key) !== -1) return false; - return true; - } - - function onWriteFail(err) { - // @TODO add fail handlers (typically storage full) - if (err && process.env.NODE_ENV !== 'production') { - console.error('Error storing data', err); - } - } - - var flush = function flush() { - while (keysToProcess.length !== 0) { - processNextKey(); - } - return writePromise || Promise.resolve(); - }; - - // return `persistoid` - return { - update: update, - flush: flush - }; -} - -// @NOTE in the future this may be exposed via config - - -function defaultSerialize(data) { - return JSON.stringify(data); -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/createPersistoid.js.flow b/node_modules/redux-persist/lib/createPersistoid.js.flow deleted file mode 100644 index 16dfe85..0000000 --- a/node_modules/redux-persist/lib/createPersistoid.js.flow +++ /dev/null @@ -1,111 +0,0 @@ -// @flow - -import { KEY_PREFIX, REHYDRATE } from './constants' - -import type { Persistoid, PersistConfig, Transform } from './types' - -export default function createPersistoid(config: PersistConfig): Persistoid { - // defaults - const blacklist: ?Array = config.blacklist || null - const whitelist: ?Array = config.whitelist || null - const transforms = config.transforms || [] - const throttle = config.throttle || 0 - const storageKey = `${config.keyPrefix !== undefined - ? config.keyPrefix - : KEY_PREFIX}${config.key}` - const storage = config.storage - const serialize = config.serialize === false ? x => x : defaultSerialize - - // initialize stateful values - let lastState = {} - let stagedState = {} - let keysToProcess = [] - let timeIterator: ?number = null - let writePromise = null - - const update = (state: Object) => { - // add any changed keys to the queue - Object.keys(state).forEach(key => { - let subState = state[key] - if (!passWhitelistBlacklist(key)) return // is keyspace ignored? noop - if (lastState[key] === state[key]) return // value unchanged? noop - if (keysToProcess.indexOf(key) !== -1) return // is key already queued? noop - keysToProcess.push(key) // add key to queue - }) - - // start the time iterator if not running (read: throttle) - if (timeIterator === null) { - timeIterator = setInterval(processNextKey, throttle) - } - - lastState = state - } - - function processNextKey() { - if (keysToProcess.length === 0) { - if (timeIterator) clearInterval(timeIterator) - timeIterator = null - return - } - - let key = keysToProcess.shift() - let endState = transforms.reduce((subState, transformer) => { - return transformer.in(subState, key) - }, lastState[key]) - if (typeof endState !== 'undefined') stagedWrite(key, endState) - } - - function stagedWrite(key: string, endState: any) { - try { - stagedState[key] = serialize(endState) - } catch (err) { - console.error( - 'redux-persist/createPersistoid: error serializing state', - err - ) - } - if (keysToProcess.length === 0) { - // cleanup any removed keys just before write. - Object.keys(stagedState).forEach(key => { - if (lastState[key] === undefined) { - delete stagedState[key] - } - }) - - writePromise = storage - .setItem(storageKey, serialize(stagedState)) - .catch(onWriteFail) - } - } - - function passWhitelistBlacklist(key) { - if (whitelist && whitelist.indexOf(key) === -1 && key !== '_persist') return false - if (blacklist && blacklist.indexOf(key) !== -1) return false - return true - } - - function onWriteFail(err) { - // @TODO add fail handlers (typically storage full) - if (err && process.env.NODE_ENV !== 'production') { - console.error('Error storing data', err) - } - } - - const flush = () => { - while (keysToProcess.length !== 0) { - processNextKey() - } - return writePromise || Promise.resolve() - } - - // return `persistoid` - return { - update, - flush, - } -} - -// @NOTE in the future this may be exposed via config -function defaultSerialize(data) { - return JSON.stringify(data) -} diff --git a/node_modules/redux-persist/lib/createTransform.js b/node_modules/redux-persist/lib/createTransform.js deleted file mode 100644 index 87ff75e..0000000 --- a/node_modules/redux-persist/lib/createTransform.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = createTransform; -function createTransform( -// @NOTE inbound: transform state coming from redux on its way to being serialized and stored -inbound, -// @NOTE outbound: transform state coming from storage, on its way to be rehydrated into redux -outbound) { - var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - var whitelist = config.whitelist || null; - var blacklist = config.blacklist || null; - - function whitelistBlacklistCheck(key) { - if (whitelist && whitelist.indexOf(key) === -1) return true; - if (blacklist && blacklist.indexOf(key) !== -1) return true; - return false; - } - - return { - in: function _in(state, key) { - return !whitelistBlacklistCheck(key) && inbound ? inbound(state, key) : state; - }, - out: function out(state, key) { - return !whitelistBlacklistCheck(key) && outbound ? outbound(state, key) : state; - } - }; -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/createTransform.js.flow b/node_modules/redux-persist/lib/createTransform.js.flow deleted file mode 100644 index 3da5a15..0000000 --- a/node_modules/redux-persist/lib/createTransform.js.flow +++ /dev/null @@ -1,30 +0,0 @@ -// @flow - -type TransformConfig = { - whitelist?: Array, - blacklist?: Array, -} - -export default function createTransform( - // @NOTE inbound: transform state coming from redux on its way to being serialized and stored - inbound: ?Function, - // @NOTE outbound: transform state coming from storage, on its way to be rehydrated into redux - outbound: ?Function, - config: TransformConfig = {} -) { - let whitelist = config.whitelist || null - let blacklist = config.blacklist || null - - function whitelistBlacklistCheck(key) { - if (whitelist && whitelist.indexOf(key) === -1) return true - if (blacklist && blacklist.indexOf(key) !== -1) return true - return false - } - - return { - in: (state: Object, key: string) => - !whitelistBlacklistCheck(key) && inbound ? inbound(state, key) : state, - out: (state: Object, key: string) => - !whitelistBlacklistCheck(key) && outbound ? outbound(state, key) : state, - } -} diff --git a/node_modules/redux-persist/lib/getStoredState.js b/node_modules/redux-persist/lib/getStoredState.js deleted file mode 100644 index 14c7c2f..0000000 --- a/node_modules/redux-persist/lib/getStoredState.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.default = getStoredState; - -var _constants = require('./constants'); - -function getStoredState(config) { - var transforms = config.transforms || []; - var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : _constants.KEY_PREFIX) + config.key; - var storage = config.storage; - var debug = config.debug; - var deserialize = config.serialize === false ? function (x) { - return x; - } : defaultDeserialize; - return storage.getItem(storageKey).then(function (serialized) { - if (!serialized) return undefined;else { - try { - var state = {}; - var rawState = deserialize(serialized); - Object.keys(rawState).forEach(function (key) { - state[key] = transforms.reduceRight(function (subState, transformer) { - return transformer.out(subState, key); - }, deserialize(rawState[key])); - }); - return state; - } catch (err) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist/getStoredState: Error restoring data ' + serialized, err); - throw err; - } - } - }); -} - -function defaultDeserialize(serial) { - return JSON.parse(serial); -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/getStoredState.js.flow b/node_modules/redux-persist/lib/getStoredState.js.flow deleted file mode 100644 index f98b348..0000000 --- a/node_modules/redux-persist/lib/getStoredState.js.flow +++ /dev/null @@ -1,43 +0,0 @@ -// @flow - -import type { PersistConfig } from './types' - -import { KEY_PREFIX } from './constants' - -export default function getStoredState( - config: PersistConfig -): Promise { - const transforms = config.transforms || [] - const storageKey = `${config.keyPrefix !== undefined - ? config.keyPrefix - : KEY_PREFIX}${config.key}` - const storage = config.storage - const debug = config.debug - const deserialize = config.serialize === false ? x => x : defaultDeserialize - return storage.getItem(storageKey).then(serialized => { - if (!serialized) return undefined - else { - try { - let state = {} - let rawState = deserialize(serialized) - Object.keys(rawState).forEach(key => { - state[key] = transforms.reduceRight((subState, transformer) => { - return transformer.out(subState, key) - }, deserialize(rawState[key])) - }) - return state - } catch (err) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - `redux-persist/getStoredState: Error restoring data ${serialized}`, - err - ) - throw err - } - } - }) -} - -function defaultDeserialize(serial) { - return JSON.parse(serial) -} diff --git a/node_modules/redux-persist/lib/index.js b/node_modules/redux-persist/lib/index.js deleted file mode 100644 index 6b490ef..0000000 --- a/node_modules/redux-persist/lib/index.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _persistReducer = require('./persistReducer'); - -Object.defineProperty(exports, 'persistReducer', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_persistReducer).default; - } -}); - -var _persistCombineReducers = require('./persistCombineReducers'); - -Object.defineProperty(exports, 'persistCombineReducers', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_persistCombineReducers).default; - } -}); - -var _persistStore = require('./persistStore'); - -Object.defineProperty(exports, 'persistStore', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_persistStore).default; - } -}); - -var _createMigrate = require('./createMigrate'); - -Object.defineProperty(exports, 'createMigrate', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_createMigrate).default; - } -}); - -var _createTransform = require('./createTransform'); - -Object.defineProperty(exports, 'createTransform', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_createTransform).default; - } -}); - -var _getStoredState = require('./getStoredState'); - -Object.defineProperty(exports, 'getStoredState', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_getStoredState).default; - } -}); - -var _createPersistoid = require('./createPersistoid'); - -Object.defineProperty(exports, 'createPersistoid', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_createPersistoid).default; - } -}); - -var _purgeStoredState = require('./purgeStoredState'); - -Object.defineProperty(exports, 'purgeStoredState', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_purgeStoredState).default; - } -}); - -var _constants = require('./constants'); - -Object.keys(_constants).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _constants[key]; - } - }); -}); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } \ No newline at end of file diff --git a/node_modules/redux-persist/lib/index.js.flow b/node_modules/redux-persist/lib/index.js.flow deleted file mode 100644 index 0d9c048..0000000 --- a/node_modules/redux-persist/lib/index.js.flow +++ /dev/null @@ -1,12 +0,0 @@ -// @flow - -export { default as persistReducer } from './persistReducer' -export { default as persistCombineReducers } from './persistCombineReducers' -export { default as persistStore } from './persistStore' -export { default as createMigrate } from './createMigrate' -export { default as createTransform } from './createTransform' -export { default as getStoredState } from './getStoredState' -export { default as createPersistoid } from './createPersistoid' -export { default as purgeStoredState } from './purgeStoredState' - -export * from './constants' diff --git a/node_modules/redux-persist/lib/integration/getStoredStateMigrateV4.js b/node_modules/redux-persist/lib/integration/getStoredStateMigrateV4.js deleted file mode 100644 index 94d8b15..0000000 --- a/node_modules/redux-persist/lib/integration/getStoredStateMigrateV4.js +++ /dev/null @@ -1,170 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -exports.default = getStoredState; - -var _getStoredState = require('../getStoredState'); - -var _getStoredState2 = _interopRequireDefault(_getStoredState); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getStoredState(v4Config) { - return function (v5Config) { - return (0, _getStoredState2.default)(v5Config).then(function (state) { - if (state) return state;else return getStoredStateV4(v4Config); - }); - }; -} - -var KEY_PREFIX = 'reduxPersist:'; - -function hasLocalStorage() { - if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== 'object' || !('localStorage' in window)) { - return false; - } - - try { - var _storage = window.localStorage; - var testKey = 'redux-persist localStorage test'; - _storage.setItem(testKey, 'test'); - _storage.getItem(testKey); - _storage.removeItem(testKey); - } catch (e) { - if (process.env.NODE_ENV !== 'production') console.warn('redux-persist localStorage test failed, persistence will be disabled.'); - return false; - } - return true; -} - -var noop = function noop() { - /* noop */return null; -}; -var noStorage = { - getItem: noop, - setItem: noop, - removeItem: noop, - getAllKeys: noop -}; -var createAsyncLocalStorage = function createAsyncLocalStorage() { - if (!hasLocalStorage()) return noStorage; - var localStorage = window.localStorage; - return { - getAllKeys: function getAllKeys(cb) { - try { - var keys = []; - for (var i = 0; i < localStorage.length; i++) { - keys.push(localStorage.key(i)); - } - cb(null, keys); - } catch (e) { - cb(e); - } - }, - getItem: function getItem(key, cb) { - try { - var s = localStorage.getItem(key); - cb(null, s); - } catch (e) { - cb(e); - } - }, - setItem: function setItem(key, string, cb) { - try { - localStorage.setItem(key, string); - cb(null); - } catch (e) { - cb(e); - } - }, - removeItem: function removeItem(key, cb) { - try { - localStorage.removeItem(key); - cb && cb(null); - } catch (e) { - cb(e); - } - } - }; -}; - -function getStoredStateV4(v4Config) { - return new Promise(function (resolve, reject) { - var storage = v4Config.storage || createAsyncLocalStorage(); - var deserializer = v4Config.serialize === false ? function (data) { - return data; - } : function (serial) { - return JSON.parse(serial); - }; - var blacklist = v4Config.blacklist || []; - var whitelist = v4Config.whitelist || false; - var transforms = v4Config.transforms || []; - var keyPrefix = v4Config.keyPrefix !== undefined ? v4Config.keyPrefix : KEY_PREFIX; - - // fallback getAllKeys to `keys` if present (LocalForage compatability) - if (storage.keys && !storage.getAllKeys) storage = _extends({}, storage, { getAllKeys: storage.keys }); - - var restoredState = {}; - var completionCount = 0; - - storage.getAllKeys(function (err) { - var allKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - - if (err) { - if (process.env.NODE_ENV !== 'production') console.warn('redux-persist/getStoredState: Error in storage.getAllKeys'); - return reject(err); - } - - var persistKeys = allKeys.filter(function (key) { - return key.indexOf(keyPrefix) === 0; - }).map(function (key) { - return key.slice(keyPrefix.length); - }); - var keysToRestore = persistKeys.filter(passWhitelistBlacklist); - - var restoreCount = keysToRestore.length; - if (restoreCount === 0) resolve(undefined); - keysToRestore.forEach(function (key) { - storage.getItem(createStorageKey(key), function (err, serialized) { - if (err && process.env.NODE_ENV !== 'production') console.warn('redux-persist/getStoredState: Error restoring data for key:', key, err);else restoredState[key] = rehydrate(key, serialized); - completionCount += 1; - if (completionCount === restoreCount) resolve(restoredState); - }); - }); - }); - - function rehydrate(key, serialized) { - var state = null; - - try { - var data = serialized ? deserializer(serialized) : undefined; - state = transforms.reduceRight(function (subState, transformer) { - return transformer.out(subState, key); - }, data); - } catch (err) { - if (process.env.NODE_ENV !== 'production') console.warn('redux-persist/getStoredState: Error restoring data for key:', key, err); - } - - return state; - } - - function passWhitelistBlacklist(key) { - if (whitelist && whitelist.indexOf(key) === -1) return false; - if (blacklist.indexOf(key) !== -1) return false; - return true; - } - - function createStorageKey(key) { - return '' + keyPrefix + key; - } - }); -} - -function defaultDeserializer(serial) { - return JSON.parse(serial); -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/integration/getStoredStateMigrateV4.js.flow b/node_modules/redux-persist/lib/integration/getStoredStateMigrateV4.js.flow deleted file mode 100644 index 03ea063..0000000 --- a/node_modules/redux-persist/lib/integration/getStoredStateMigrateV4.js.flow +++ /dev/null @@ -1,183 +0,0 @@ -// @flow - -import getStoredStateV5 from '../getStoredState' - -import type { PersistConfig, Transform } from '../types' - -type V4Config = { - storage?: Object, - keyPrefix?: string, - transforms?: Array, - blacklist?: Array, - whitelist?: Array, -} - -export default function getStoredState(v4Config: V4Config) { - return function(v5Config: PersistConfig) { - return getStoredStateV5(v5Config).then(state => { - if (state) return state - else return getStoredStateV4(v4Config) - }) - } -} - -const KEY_PREFIX = 'reduxPersist:' - -function hasLocalStorage() { - if (typeof window !== 'object' || !('localStorage' in window)) { - return false - } - - try { - let storage = window.localStorage - const testKey = `redux-persist localStorage test` - storage.setItem(testKey, 'test') - storage.getItem(testKey) - storage.removeItem(testKey) - } catch (e) { - if (process.env.NODE_ENV !== 'production') - console.warn( - `redux-persist localStorage test failed, persistence will be disabled.` - ) - return false - } - return true -} - -let noop = (...args: any) => { - /* noop */ return null -} -const noStorage = { - getItem: noop, - setItem: noop, - removeItem: noop, - getAllKeys: noop, -} -const createAsyncLocalStorage = () => { - if (!hasLocalStorage()) return noStorage - let localStorage = window.localStorage - return { - getAllKeys: function(cb) { - try { - var keys = [] - for (var i = 0; i < localStorage.length; i++) { - keys.push(localStorage.key(i)) - } - cb(null, keys) - } catch (e) { - cb(e) - } - }, - getItem(key, cb) { - try { - var s = localStorage.getItem(key) - cb(null, s) - } catch (e) { - cb(e) - } - }, - setItem(key, string, cb) { - try { - localStorage.setItem(key, string) - cb(null) - } catch (e) { - cb(e) - } - }, - removeItem(key, cb) { - try { - localStorage.removeItem(key) - cb && cb(null) - } catch (e) { - cb(e) - } - }, - } -} - -function getStoredStateV4(v4Config: V4Config) { - return new Promise((resolve, reject) => { - let storage = v4Config.storage || createAsyncLocalStorage() - const deserializer = - v4Config.serialize === false - ? data => data - : (serial: string) => JSON.parse(serial) - const blacklist = v4Config.blacklist || [] - const whitelist = v4Config.whitelist || false - const transforms = v4Config.transforms || [] - const keyPrefix = - v4Config.keyPrefix !== undefined ? v4Config.keyPrefix : KEY_PREFIX - - // fallback getAllKeys to `keys` if present (LocalForage compatability) - if (storage.keys && !storage.getAllKeys) - storage = { ...storage, getAllKeys: storage.keys } - - let restoredState = {} - let completionCount = 0 - - storage.getAllKeys((err, allKeys = []) => { - if (err) { - if (process.env.NODE_ENV !== 'production') - console.warn( - 'redux-persist/getStoredState: Error in storage.getAllKeys' - ) - return reject(err) - } - - let persistKeys = allKeys - .filter(key => key.indexOf(keyPrefix) === 0) - .map(key => key.slice(keyPrefix.length)) - let keysToRestore = persistKeys.filter(passWhitelistBlacklist) - - let restoreCount = keysToRestore.length - if (restoreCount === 0) resolve(undefined) - keysToRestore.forEach(key => { - storage.getItem(createStorageKey(key), (err, serialized) => { - if (err && process.env.NODE_ENV !== 'production') - console.warn( - 'redux-persist/getStoredState: Error restoring data for key:', - key, - err - ) - else restoredState[key] = rehydrate(key, serialized) - completionCount += 1 - if (completionCount === restoreCount) resolve(restoredState) - }) - }) - }) - - function rehydrate(key: string, serialized: ?string) { - let state = null - - try { - let data = serialized ? deserializer(serialized) : undefined - state = transforms.reduceRight((subState, transformer) => { - return transformer.out(subState, key) - }, data) - } catch (err) { - if (process.env.NODE_ENV !== 'production') - console.warn( - 'redux-persist/getStoredState: Error restoring data for key:', - key, - err - ) - } - - return state - } - - function passWhitelistBlacklist(key) { - if (whitelist && whitelist.indexOf(key) === -1) return false - if (blacklist.indexOf(key) !== -1) return false - return true - } - - function createStorageKey(key) { - return `${keyPrefix}${key}` - } - }) -} - -function defaultDeserializer(serial: string) { - return JSON.parse(serial) -} diff --git a/node_modules/redux-persist/lib/integration/react.js b/node_modules/redux-persist/lib/integration/react.js deleted file mode 100644 index bd309c5..0000000 --- a/node_modules/redux-persist/lib/integration/react.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.PersistGate = undefined; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -// eslint-disable-line import/no-unresolved -// eslint-disable-line import/no-unresolved -var PersistGate = exports.PersistGate = function (_PureComponent) { - _inherits(PersistGate, _PureComponent); - - function PersistGate() { - var _ref; - - var _temp, _this, _ret; - - _classCallCheck(this, PersistGate); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = PersistGate.__proto__ || Object.getPrototypeOf(PersistGate)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - bootstrapped: false - }, _this.handlePersistorState = function () { - var persistor = _this.props.persistor; - - var _persistor$getState = persistor.getState(), - bootstrapped = _persistor$getState.bootstrapped; - - if (bootstrapped) { - if (_this.props.onBeforeLift) { - Promise.resolve(_this.props.onBeforeLift()).then(function () { - return _this.setState({ bootstrapped: true }); - }).catch(function () { - return _this.setState({ bootstrapped: true }); - }); - } else { - _this.setState({ bootstrapped: true }); - } - _this._unsubscribe && _this._unsubscribe(); - } - }, _temp), _possibleConstructorReturn(_this, _ret); - } - - _createClass(PersistGate, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this._unsubscribe = this.props.persistor.subscribe(this.handlePersistorState); - this.handlePersistorState(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this._unsubscribe && this._unsubscribe(); - } - }, { - key: 'render', - value: function render() { - return this.state.bootstrapped ? this.props.children : this.props.loading; - } - }]); - - return PersistGate; -}(_react.PureComponent); - -PersistGate.defaultProps = { - loading: null -}; \ No newline at end of file diff --git a/node_modules/redux-persist/lib/integration/react.js.flow b/node_modules/redux-persist/lib/integration/react.js.flow deleted file mode 100644 index 6a34894..0000000 --- a/node_modules/redux-persist/lib/integration/react.js.flow +++ /dev/null @@ -1,56 +0,0 @@ -// @flow -import React, { PureComponent } from 'react' // eslint-disable-line import/no-unresolved -import type { Node } from 'react' // eslint-disable-line import/no-unresolved -import type { Persistor } from '../types' - -type Props = { - onBeforeLift?: Function, - children?: Node, - loading?: Node, - persistor: Persistor, -} - -type State = { - bootstrapped: boolean, -} - -export class PersistGate extends PureComponent { - static defaultProps = { - loading: null, - } - - state = { - bootstrapped: false, - } - _unsubscribe: ?Function - - componentDidMount() { - this._unsubscribe = this.props.persistor.subscribe( - this.handlePersistorState - ) - this.handlePersistorState() - } - - handlePersistorState = () => { - const { persistor } = this.props - let { bootstrapped } = persistor.getState() - if (bootstrapped) { - if (this.props.onBeforeLift) { - Promise.resolve(this.props.onBeforeLift()) - .then(() => this.setState({ bootstrapped: true })) - .catch(() => this.setState({ bootstrapped: true })) - } else { - this.setState({ bootstrapped: true }) - } - this._unsubscribe && this._unsubscribe() - } - } - - componentWillUnmount() { - this._unsubscribe && this._unsubscribe() - } - - render() { - return this.state.bootstrapped ? this.props.children : this.props.loading - } -} diff --git a/node_modules/redux-persist/lib/persistCombineReducers.js b/node_modules/redux-persist/lib/persistCombineReducers.js deleted file mode 100644 index cd3ace5..0000000 --- a/node_modules/redux-persist/lib/persistCombineReducers.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.default = persistCombineReducers; - -var _redux = require('redux'); - -var _persistReducer = require('./persistReducer'); - -var _persistReducer2 = _interopRequireDefault(_persistReducer); - -var _autoMergeLevel = require('./stateReconciler/autoMergeLevel2'); - -var _autoMergeLevel2 = _interopRequireDefault(_autoMergeLevel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// combineReducers + persistReducer with stateReconciler defaulted to autoMergeLevel2 -function persistCombineReducers(config, reducers) { - config.stateReconciler = config.stateReconciler === undefined ? _autoMergeLevel2.default : config.stateReconciler; - return (0, _persistReducer2.default)(config, (0, _redux.combineReducers)(reducers)); -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/persistCombineReducers.js.flow b/node_modules/redux-persist/lib/persistCombineReducers.js.flow deleted file mode 100644 index 3db95ea..0000000 --- a/node_modules/redux-persist/lib/persistCombineReducers.js.flow +++ /dev/null @@ -1,22 +0,0 @@ -// @flow - -import { combineReducers } from 'redux' -import persistReducer from './persistReducer' -import autoMergeLevel2 from './stateReconciler/autoMergeLevel2' - -import type { PersistConfig } from './types' - -type Reducers = { - [key: string]: Function, -} - -type Reducer = (state: Object, action: Object) => Object - -// combineReducers + persistReducer with stateReconciler defaulted to autoMergeLevel2 -export default function persistCombineReducers( - config: PersistConfig, - reducers: Reducers -): Reducer { - config.stateReconciler = config.stateReconciler === undefined ? autoMergeLevel2 : config.stateReconciler - return persistReducer(config, combineReducers(reducers)) -} diff --git a/node_modules/redux-persist/lib/persistReducer.js b/node_modules/redux-persist/lib/persistReducer.js deleted file mode 100644 index 83773fb..0000000 --- a/node_modules/redux-persist/lib/persistReducer.js +++ /dev/null @@ -1,129 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -exports.default = persistReducer; - -var _constants = require('./constants'); - -var _autoMergeLevel = require('./stateReconciler/autoMergeLevel1'); - -var _autoMergeLevel2 = _interopRequireDefault(_autoMergeLevel); - -var _createPersistoid = require('./createPersistoid'); - -var _createPersistoid2 = _interopRequireDefault(_createPersistoid); - -var _getStoredState = require('./getStoredState'); - -var _getStoredState2 = _interopRequireDefault(_getStoredState); - -var _purgeStoredState = require('./purgeStoredState'); - -var _purgeStoredState2 = _interopRequireDefault(_purgeStoredState); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -/* - @TODO add validation / handling for: - - persisting a reducer which has nested _persist - - handling actions that fire before reydrate is called -*/ -function persistReducer(config, baseReducer) { - if (process.env.NODE_ENV !== 'production') { - if (!config) throw new Error('config is required for persistReducer'); - if (!config.key) throw new Error('key is required in persistor config'); - if (!config.storage) throw new Error("redux-persist: config.storage is required. Try using one of the provided storage engines `import storageLocal from 'redux-persist/es/storage/local'"); - } - - var version = config.version !== undefined ? config.version : _constants.DEFAULT_VERSION; - var debug = config.debug || false; - var stateReconciler = config.stateReconciler === undefined ? _autoMergeLevel2.default : config.stateReconciler; - var getStoredState = config.getStoredState || _getStoredState2.default; - var _persistoid = null; - var _purge = false; - var _paused = true; - - return function (state, action) { - var _ref = state || {}, - _persist = _ref._persist, - rest = _objectWithoutProperties(_ref, ['_persist']); - - var restState = rest; - - if (action.type === _constants.PERSIST) { - // @NOTE PERSIST resumes if paused. - _paused = false; - - // @NOTE only ever create persistoid once, ensure we call it at least once, even if _persist has already been set - if (!_persistoid) _persistoid = (0, _createPersistoid2.default)(config); - - // @NOTE PERSIST can be called multiple times, noop after the first - if (_persist) return state; - if (typeof action.rehydrate !== 'function' || typeof action.register !== 'function') throw new Error('redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.'); - - action.register(config.key); - - getStoredState(config).then(function (restoredState) { - var migrate = config.migrate || function (s, v) { - return Promise.resolve(s); - }; - migrate(restoredState, version).then(function (migratedState) { - action.rehydrate(config.key, migratedState); - }, function (migrateErr) { - if (process.env.NODE_ENV !== 'production' && migrateErr) console.error('redux-persist: migration error', migrateErr); - action.rehydrate(config.key, undefined, migrateErr); - }); - }, function (err) { - action.rehydrate(config.key, undefined, err); - }); - - return _extends({}, baseReducer(restState, action), { - _persist: { version: version, rehydrated: false } - }); - } else if (action.type === _constants.PURGE) { - _purge = true; - action.result((0, _purgeStoredState2.default)(config)); - return _extends({}, baseReducer(restState, action), { - _persist: _persist - }); - } else if (action.type === _constants.FLUSH) { - action.result(_persistoid && _persistoid.flush()); - return _extends({}, baseReducer(restState, action), { - _persist: _persist - }); - } else if (action.type === _constants.PAUSE) { - _paused = true; - } else if (action.type === _constants.REHYDRATE) { - // noop on restState if purging - if (_purge) return _extends({}, restState, { - _persist: _extends({}, _persist, { rehydrated: true }) - - // @NOTE if key does not match, will continue to default else below - });if (action.key === config.key) { - var reducedState = baseReducer(restState, action); - var inboundState = action.payload; - var reconciledRest = stateReconciler !== false ? stateReconciler(inboundState, state, reducedState, config) : reducedState; - - return _extends({}, reconciledRest, { - _persist: _extends({}, _persist, { rehydrated: true }) - }); - } - } - - // if we have not already handled PERSIST, straight passthrough - if (!_persist) return baseReducer(state, action); - - // otherwise, pull off _persist, run the reducer, and update the persistoid - // @TODO more performant workaround for combineReducers warning - var newState = _extends({}, baseReducer(restState, action), { - _persist: _persist - // update the persistoid only if we are already rehydrated and are not paused - });_persist.rehydrated && _persistoid && !_paused && _persistoid.update(newState); - return newState; - }; -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/persistReducer.js.flow b/node_modules/redux-persist/lib/persistReducer.js.flow deleted file mode 100644 index 681a80f..0000000 --- a/node_modules/redux-persist/lib/persistReducer.js.flow +++ /dev/null @@ -1,155 +0,0 @@ -// @flow -import { - FLUSH, - PAUSE, - PERSIST, - PURGE, - REHYDRATE, - DEFAULT_VERSION, -} from './constants' - -import type { - PersistConfig, - MigrationManifest, - PersistState, - Persistoid, -} from './types' - -import autoMergeLevel1 from './stateReconciler/autoMergeLevel1' -import createPersistoid from './createPersistoid' -import defaultGetStoredState from './getStoredState' -import purgeStoredState from './purgeStoredState' - -type PersistPartial = { _persist: PersistState } -/* - @TODO add validation / handling for: - - persisting a reducer which has nested _persist - - handling actions that fire before reydrate is called -*/ -export default function persistReducer( - config: PersistConfig, - baseReducer: (State | void, Action) => State -): (State, Action) => State & PersistPartial { - if (process.env.NODE_ENV !== 'production') { - if (!config) throw new Error('config is required for persistReducer') - if (!config.key) throw new Error('key is required in persistor config') - if (!config.storage) - throw new Error( - "redux-persist: config.storage is required. Try using one of the provided storage engines `import storageLocal from 'redux-persist/es/storage/local'" - ) - } - - const version = - config.version !== undefined ? config.version : DEFAULT_VERSION - const debug = config.debug || false - const stateReconciler = - config.stateReconciler === undefined - ? autoMergeLevel1 - : config.stateReconciler - const getStoredState = config.getStoredState || defaultGetStoredState - let _persistoid = null - let _purge = false - let _paused = true - - return (state: State, action: Action) => { - let { _persist, ...rest } = state || {} - let restState: State = rest - - if (action.type === PERSIST) { - // @NOTE PERSIST resumes if paused. - _paused = false - - // @NOTE only ever create persistoid once, ensure we call it at least once, even if _persist has already been set - if (!_persistoid) _persistoid = createPersistoid(config) - - // @NOTE PERSIST can be called multiple times, noop after the first - if (_persist) return state - if ( - typeof action.rehydrate !== 'function' || - typeof action.register !== 'function' - ) - throw new Error( - 'redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.' - ) - - action.register(config.key) - - getStoredState(config).then( - restoredState => { - const migrate = config.migrate || ((s, v) => Promise.resolve(s)) - migrate(restoredState, version).then( - migratedState => { - action.rehydrate(config.key, migratedState) - }, - migrateErr => { - if (process.env.NODE_ENV !== 'production' && migrateErr) - console.error('redux-persist: migration error', migrateErr) - action.rehydrate(config.key, undefined, migrateErr) - } - ) - }, - err => { - action.rehydrate(config.key, undefined, err) - } - ) - - return { - ...baseReducer(restState, action), - _persist: { version, rehydrated: false }, - } - } else if (action.type === PURGE) { - _purge = true - action.result(purgeStoredState(config)) - return { - ...baseReducer(restState, action), - _persist, - } - } else if (action.type === FLUSH) { - action.result(_persistoid && _persistoid.flush()) - return { - ...baseReducer(restState, action), - _persist, - } - } else if (action.type === PAUSE) { - _paused = true - } else if (action.type === REHYDRATE) { - // noop on restState if purging - if (_purge) - return { - ...restState, - _persist: { ..._persist, rehydrated: true }, - } - - // @NOTE if key does not match, will continue to default else below - if (action.key === config.key) { - let reducedState = baseReducer(restState, action) - let inboundState = action.payload - let reconciledRest: State = - stateReconciler !== false - ? stateReconciler(inboundState, state, reducedState, config) - : reducedState - - return { - ...reconciledRest, - _persist: { ..._persist, rehydrated: true }, - } - } - } - - // if we have not already handled PERSIST, straight passthrough - if (!_persist) return baseReducer(state, action) - - // otherwise, pull off _persist, run the reducer, and update the persistoid - // @TODO more performant workaround for combineReducers warning - let newState = { - ...baseReducer(restState, action), - _persist, - } - // update the persistoid only if we are already rehydrated and are not paused - _persist.rehydrated && - _persistoid && - !_paused && - _persistoid.update(newState) - return newState - } -} diff --git a/node_modules/redux-persist/lib/persistStore.js b/node_modules/redux-persist/lib/persistStore.js deleted file mode 100644 index 1eec37b..0000000 --- a/node_modules/redux-persist/lib/persistStore.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -exports.default = persistStore; - -var _redux = require('redux'); - -var _persistReducer = require('./persistReducer'); - -var _persistReducer2 = _interopRequireDefault(_persistReducer); - -var _constants = require('./constants'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -var initialState = { - registry: [], - bootstrapped: false -}; - -var persistorReducer = function persistorReducer() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - case _constants.REGISTER: - return _extends({}, state, { registry: [].concat(_toConsumableArray(state.registry), [action.key]) }); - case _constants.REHYDRATE: - var firstIndex = state.registry.indexOf(action.key); - var registry = [].concat(_toConsumableArray(state.registry)); - registry.splice(firstIndex, 1); - return _extends({}, state, { registry: registry, bootstrapped: registry.length === 0 }); - default: - return state; - } -}; - -function persistStore(store, persistorOptions, cb) { - var options = persistorOptions || {}; - - // help catch incorrect usage of passing PersistConfig in as PersistorOptions - if (process.env.NODE_ENV !== 'production') { - var bannedKeys = ['blacklist', 'whitelist', 'transforms', 'storage', 'keyPrefix', 'migrate']; - bannedKeys.forEach(function (k) { - if (!!options[k]) console.error('redux-persist: invalid option passed to persistStore: "' + k + '". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.'); - }); - } - var boostrappedCb = cb || false; - var persistor = (0, _redux.createStore)(persistorReducer, undefined, options.enhancer); - - persistor.purge = function () { - var results = []; - store.dispatch({ - type: _constants.PURGE, - result: function result(purgeResult) { - results.push(purgeResult); - } - }); - return Promise.all(results); - }; - - persistor.flush = function () { - var results = []; - store.dispatch({ - type: _constants.FLUSH, - result: function result(flushResult) { - results.push(flushResult); - } - }); - return Promise.all(results); - }; - - persistor.pause = function () { - store.dispatch({ - type: _constants.PAUSE - }); - }; - - var register = function register(key) { - persistor.dispatch({ - type: _constants.REGISTER, - key: key - }); - }; - - var rehydrate = function rehydrate(key, payload, err) { - var rehydrateAction = { - type: _constants.REHYDRATE, - payload: payload, - err: err, - key: key - // dispatch to `store` to rehydrate and `persistor` to track result - };store.dispatch(rehydrateAction); - persistor.dispatch(rehydrateAction); - if (boostrappedCb && persistor.getState().bootstrapped) { - boostrappedCb(); - boostrappedCb = false; - } - }; - - persistor.persist = function () { - store.dispatch({ type: _constants.PERSIST, register: register, rehydrate: rehydrate }); - }; - - persistor.persist(); - - return persistor; -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/persistStore.js.flow b/node_modules/redux-persist/lib/persistStore.js.flow deleted file mode 100644 index 7118baf..0000000 --- a/node_modules/redux-persist/lib/persistStore.js.flow +++ /dev/null @@ -1,125 +0,0 @@ -// @flow - -import type { - Persistor, - PersistConfig, - PersistorOptions, - MigrationManifest, - RehydrateAction, - RehydrateErrorType, -} from './types' - -import { createStore } from 'redux' -import persistReducer from './persistReducer' -import { FLUSH, PAUSE, PERSIST, PURGE, REGISTER, REHYDRATE } from './constants' - -type PendingRehydrate = [Object, RehydrateErrorType, PersistConfig] -type Persist = (PersistConfig, MigrationManifest) => R => R -type CreatePersistor = Object => void -type BoostrappedCb = () => any - -const initialState = { - registry: [], - bootstrapped: false, -} - -const persistorReducer = (state = initialState, action) => { - switch (action.type) { - case REGISTER: - return { ...state, registry: [...state.registry, action.key] } - case REHYDRATE: - let firstIndex = state.registry.indexOf(action.key) - let registry = [...state.registry] - registry.splice(firstIndex, 1) - return { ...state, registry, bootstrapped: registry.length === 0 } - default: - return state - } -} - -export default function persistStore( - store: Object, - persistorOptions?: PersistorOptions, - cb?: BoostrappedCb -): Persistor { - let options: Object = persistorOptions || {} - - // help catch incorrect usage of passing PersistConfig in as PersistorOptions - if (process.env.NODE_ENV !== 'production') { - let bannedKeys = [ - 'blacklist', - 'whitelist', - 'transforms', - 'storage', - 'keyPrefix', - 'migrate', - ] - bannedKeys.forEach(k => { - if (!!options[k]) - console.error( - `redux-persist: invalid option passed to persistStore: "${k}". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.` - ) - }) - } - let boostrappedCb = cb || false - let persistor = createStore(persistorReducer, undefined, options.enhancer) - - persistor.purge = () => { - let results = [] - store.dispatch({ - type: PURGE, - result: purgeResult => { - results.push(purgeResult) - }, - }) - return Promise.all(results) - } - - persistor.flush = () => { - let results = [] - store.dispatch({ - type: FLUSH, - result: flushResult => { - results.push(flushResult) - }, - }) - return Promise.all(results) - } - - persistor.pause = () => { - store.dispatch({ - type: PAUSE, - }) - } - - let register = (key: string) => { - persistor.dispatch({ - type: REGISTER, - key, - }) - } - - let rehydrate = (key: string, payload: Object, err: any) => { - let rehydrateAction = { - type: REHYDRATE, - payload, - err, - key, - } - // dispatch to `store` to rehydrate and `persistor` to track result - store.dispatch(rehydrateAction) - persistor.dispatch(rehydrateAction) - if (boostrappedCb && persistor.getState().bootstrapped) { - boostrappedCb() - boostrappedCb = false - } - } - - persistor.persist = () => { - store.dispatch({ type: PERSIST, register, rehydrate }) - } - - persistor.persist() - - return persistor -} diff --git a/node_modules/redux-persist/lib/purgeStoredState.js b/node_modules/redux-persist/lib/purgeStoredState.js deleted file mode 100644 index fc5be3f..0000000 --- a/node_modules/redux-persist/lib/purgeStoredState.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.default = purgeStoredState; - -var _constants = require('./constants'); - -function purgeStoredState(config) { - var storage = config.storage; - var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : _constants.KEY_PREFIX) + config.key; - return storage.removeItem(storageKey, warnIfRemoveError); -} - -function warnIfRemoveError(err) { - if (err && process.env.NODE_ENV !== 'production') { - console.error('redux-persist/purgeStoredState: Error purging data stored state', err); - } -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/purgeStoredState.js.flow b/node_modules/redux-persist/lib/purgeStoredState.js.flow deleted file mode 100644 index c780f88..0000000 --- a/node_modules/redux-persist/lib/purgeStoredState.js.flow +++ /dev/null @@ -1,22 +0,0 @@ -// @flow - -import type { PersistConfig } from './types' - -import { KEY_PREFIX } from './constants' - -export default function purgeStoredState(config: PersistConfig) { - const storage = config.storage - const storageKey = `${config.keyPrefix !== undefined - ? config.keyPrefix - : KEY_PREFIX}${config.key}` - return storage.removeItem(storageKey, warnIfRemoveError) -} - -function warnIfRemoveError(err) { - if (err && process.env.NODE_ENV !== 'production') { - console.error( - 'redux-persist/purgeStoredState: Error purging data stored state', - err - ) - } -} diff --git a/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel1.js b/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel1.js deleted file mode 100644 index a2568f1..0000000 --- a/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel1.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -exports.default = autoMergeLevel1; -function autoMergeLevel1(inboundState, originalState, reducedState, _ref) { - var debug = _ref.debug; - - var newState = _extends({}, reducedState); - // only rehydrate if inboundState exists and is an object - if (inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') { - Object.keys(inboundState).forEach(function (key) { - // ignore _persist data - if (key === '_persist') return; - // if reducer modifies substate, skip auto rehydration - if (originalState[key] !== reducedState[key]) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist/stateReconciler: sub state for key `%s` modified, skipping.', key); - return; - } - // otherwise hard set the new value - newState[key] = inboundState[key]; - }); - } - - if (process.env.NODE_ENV !== 'production' && debug && inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') console.log('redux-persist/stateReconciler: rehydrated keys \'' + Object.keys(inboundState).join(', ') + '\''); - - return newState; -} - -/* - autoMergeLevel1: - - merges 1 level of substate - - skips substate if already modified -*/ \ No newline at end of file diff --git a/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel1.js.flow b/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel1.js.flow deleted file mode 100644 index 880f28a..0000000 --- a/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel1.js.flow +++ /dev/null @@ -1,50 +0,0 @@ -// @flow - -/* - autoMergeLevel1: - - merges 1 level of substate - - skips substate if already modified -*/ - -import type { PersistConfig } from '../types' - -export default function autoMergeLevel1( - inboundState: State, - originalState: State, - reducedState: State, - { debug }: PersistConfig -): State { - let newState = { ...reducedState } - // only rehydrate if inboundState exists and is an object - if (inboundState && typeof inboundState === 'object') { - Object.keys(inboundState).forEach(key => { - // ignore _persist data - if (key === '_persist') return - // if reducer modifies substate, skip auto rehydration - if (originalState[key] !== reducedState[key]) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - 'redux-persist/stateReconciler: sub state for key `%s` modified, skipping.', - key - ) - return - } - // otherwise hard set the new value - newState[key] = inboundState[key] - }) - } - - if ( - process.env.NODE_ENV !== 'production' && - debug && - inboundState && - typeof inboundState === 'object' - ) - console.log( - `redux-persist/stateReconciler: rehydrated keys '${Object.keys( - inboundState - ).join(', ')}'` - ) - - return newState -} diff --git a/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel2.js b/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel2.js deleted file mode 100644 index a33862d..0000000 --- a/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel2.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -exports.default = autoMergeLevel2; -function autoMergeLevel2(inboundState, originalState, reducedState, _ref) { - var debug = _ref.debug; - - var newState = _extends({}, reducedState); - // only rehydrate if inboundState exists and is an object - if (inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') { - Object.keys(inboundState).forEach(function (key) { - // ignore _persist data - if (key === '_persist') return; - // if reducer modifies substate, skip auto rehydration - if (originalState[key] !== reducedState[key]) { - if (process.env.NODE_ENV !== 'production' && debug) console.log('redux-persist/stateReconciler: sub state for key `%s` modified, skipping.', key); - return; - } - if (isPlainEnoughObject(reducedState[key])) { - // if object is plain enough shallow merge the new values (hence "Level2") - newState[key] = _extends({}, newState[key], inboundState[key]); - return; - } - // otherwise hard set - newState[key] = inboundState[key]; - }); - } - - if (process.env.NODE_ENV !== 'production' && debug && inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') console.log('redux-persist/stateReconciler: rehydrated keys \'' + Object.keys(inboundState).join(', ') + '\''); - - return newState; -} - -/* - autoMergeLevel2: - - merges 2 level of substate - - skips substate if already modified - - this is essentially redux-perist v4 behavior -*/ - -function isPlainEnoughObject(o) { - return o !== null && !Array.isArray(o) && (typeof o === 'undefined' ? 'undefined' : _typeof(o)) === 'object'; -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel2.js.flow b/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel2.js.flow deleted file mode 100644 index f451380..0000000 --- a/node_modules/redux-persist/lib/stateReconciler/autoMergeLevel2.js.flow +++ /dev/null @@ -1,60 +0,0 @@ -// @flow - -/* - autoMergeLevel2: - - merges 2 level of substate - - skips substate if already modified - - this is essentially redux-perist v4 behavior -*/ - -import type { PersistConfig } from '../types' - -export default function autoMergeLevel2( - inboundState: State, - originalState: State, - reducedState: State, - { debug }: PersistConfig -): State { - let newState = { ...reducedState } - // only rehydrate if inboundState exists and is an object - if (inboundState && typeof inboundState === 'object') { - Object.keys(inboundState).forEach(key => { - // ignore _persist data - if (key === '_persist') return - // if reducer modifies substate, skip auto rehydration - if (originalState[key] !== reducedState[key]) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - 'redux-persist/stateReconciler: sub state for key `%s` modified, skipping.', - key - ) - return - } - if (isPlainEnoughObject(reducedState[key])) { - // if object is plain enough shallow merge the new values (hence "Level2") - newState[key] = { ...newState[key], ...inboundState[key] } - return - } - // otherwise hard set - newState[key] = inboundState[key] - }) - } - - if ( - process.env.NODE_ENV !== 'production' && - debug && - inboundState && - typeof inboundState === 'object' - ) - console.log( - `redux-persist/stateReconciler: rehydrated keys '${Object.keys( - inboundState - ).join(', ')}'` - ) - - return newState -} - -function isPlainEnoughObject(o) { - return o !== null && !Array.isArray(o) && typeof o === 'object' -} diff --git a/node_modules/redux-persist/lib/stateReconciler/hardSet.js b/node_modules/redux-persist/lib/stateReconciler/hardSet.js deleted file mode 100644 index 96752c4..0000000 --- a/node_modules/redux-persist/lib/stateReconciler/hardSet.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = hardSet; - - -/* - hardSet: - - hard set incoming state -*/ - -function hardSet(inboundState) { - return inboundState; -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/stateReconciler/hardSet.js.flow b/node_modules/redux-persist/lib/stateReconciler/hardSet.js.flow deleted file mode 100644 index 1f5fcda..0000000 --- a/node_modules/redux-persist/lib/stateReconciler/hardSet.js.flow +++ /dev/null @@ -1,10 +0,0 @@ -// @flow - -/* - hardSet: - - hard set incoming state -*/ - -export default function hardSet(inboundState: State): State { - return inboundState -} diff --git a/node_modules/redux-persist/lib/storage/createWebStorage.js b/node_modules/redux-persist/lib/storage/createWebStorage.js deleted file mode 100644 index 950d9a9..0000000 --- a/node_modules/redux-persist/lib/storage/createWebStorage.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.default = createWebStorage; - -var _getStorage = require('./getStorage'); - -var _getStorage2 = _interopRequireDefault(_getStorage); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function createWebStorage(type) { - var storage = (0, _getStorage2.default)(type); - return { - getItem: function getItem(key) { - return new Promise(function (resolve, reject) { - resolve(storage.getItem(key)); - }); - }, - setItem: function setItem(key, item) { - return new Promise(function (resolve, reject) { - resolve(storage.setItem(key, item)); - }); - }, - removeItem: function removeItem(key) { - return new Promise(function (resolve, reject) { - resolve(storage.removeItem(key)); - }); - } - }; -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/storage/createWebStorage.js.flow b/node_modules/redux-persist/lib/storage/createWebStorage.js.flow deleted file mode 100644 index b77132c..0000000 --- a/node_modules/redux-persist/lib/storage/createWebStorage.js.flow +++ /dev/null @@ -1,23 +0,0 @@ -// @flow -import getStorage from './getStorage' - -export default function createWebStorage(type: string) { - let storage = getStorage(type) - return { - getItem: (key: string): Promise => { - return new Promise((resolve, reject) => { - resolve(storage.getItem(key)) - }) - }, - setItem: (key: string, item: string): Promise => { - return new Promise((resolve, reject) => { - resolve(storage.setItem(key, item)) - }) - }, - removeItem: (key: string): Promise => { - return new Promise((resolve, reject) => { - resolve(storage.removeItem(key)) - }) - }, - } -} diff --git a/node_modules/redux-persist/lib/storage/getStorage.js b/node_modules/redux-persist/lib/storage/getStorage.js deleted file mode 100644 index c8232b7..0000000 --- a/node_modules/redux-persist/lib/storage/getStorage.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -exports.default = getStorage; - - -function noop() {} - -var noopStorage = { - getItem: noop, - setItem: noop, - removeItem: noop -}; - -function hasStorage(storageType) { - if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== 'object' || !(storageType in window)) { - return false; - } - - try { - var storage = window[storageType]; - var testKey = 'redux-persist ' + storageType + ' test'; - storage.setItem(testKey, 'test'); - storage.getItem(testKey); - storage.removeItem(testKey); - } catch (e) { - if (process.env.NODE_ENV !== 'production') console.warn('redux-persist ' + storageType + ' test failed, persistence will be disabled.'); - return false; - } - return true; -} - -function getStorage(type) { - var storageType = type + 'Storage'; - if (hasStorage(storageType)) return window[storageType];else { - if (process.env.NODE_ENV !== 'production') { - console.error('redux-persist failed to create sync storage. falling back to memory storage.'); - } - return noopStorage; - } -} \ No newline at end of file diff --git a/node_modules/redux-persist/lib/storage/getStorage.js.flow b/node_modules/redux-persist/lib/storage/getStorage.js.flow deleted file mode 100644 index a6b8e60..0000000 --- a/node_modules/redux-persist/lib/storage/getStorage.js.flow +++ /dev/null @@ -1,44 +0,0 @@ -// @flow - -import type { Storage } from '../types' - -function noop() {} -let noopStorage = { - getItem: noop, - setItem: noop, - removeItem: noop, -} - -function hasStorage(storageType) { - if (typeof window !== 'object' || !(storageType in window)) { - return false - } - - try { - let storage = window[storageType] - const testKey = `redux-persist ${storageType} test` - storage.setItem(testKey, 'test') - storage.getItem(testKey) - storage.removeItem(testKey) - } catch (e) { - if (process.env.NODE_ENV !== 'production') - console.warn( - `redux-persist ${storageType} test failed, persistence will be disabled.` - ) - return false - } - return true -} - -export default function getStorage(type: string): Storage { - const storageType = `${type}Storage` - if (hasStorage(storageType)) return window[storageType] - else { - if (process.env.NODE_ENV !== 'production') { - console.error( - `redux-persist failed to create sync storage. falling back to memory storage.` - ) - } - return noopStorage - } -} diff --git a/node_modules/redux-persist/lib/storage/index.js b/node_modules/redux-persist/lib/storage/index.js deleted file mode 100644 index ab29ff5..0000000 --- a/node_modules/redux-persist/lib/storage/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _createWebStorage = require('./createWebStorage'); - -var _createWebStorage2 = _interopRequireDefault(_createWebStorage); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = (0, _createWebStorage2.default)('local'); \ No newline at end of file diff --git a/node_modules/redux-persist/lib/storage/index.js.flow b/node_modules/redux-persist/lib/storage/index.js.flow deleted file mode 100644 index 0532b1f..0000000 --- a/node_modules/redux-persist/lib/storage/index.js.flow +++ /dev/null @@ -1,5 +0,0 @@ -// @flow - -import createWebStorage from './createWebStorage' - -export default createWebStorage('local') diff --git a/node_modules/redux-persist/lib/storage/index.native.js b/node_modules/redux-persist/lib/storage/index.native.js deleted file mode 100644 index 9cba57d..0000000 --- a/node_modules/redux-persist/lib/storage/index.native.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _reactNative = require('react-native'); - -exports.default = _reactNative.AsyncStorage; // @noflow -/* eslint-disable */ \ No newline at end of file diff --git a/node_modules/redux-persist/lib/storage/index.native.js.flow b/node_modules/redux-persist/lib/storage/index.native.js.flow deleted file mode 100644 index 641e10f..0000000 --- a/node_modules/redux-persist/lib/storage/index.native.js.flow +++ /dev/null @@ -1,6 +0,0 @@ -// @noflow -/* eslint-disable */ - -import { AsyncStorage } from 'react-native' - -export default AsyncStorage diff --git a/node_modules/redux-persist/lib/storage/session.js b/node_modules/redux-persist/lib/storage/session.js deleted file mode 100644 index 73e278d..0000000 --- a/node_modules/redux-persist/lib/storage/session.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _createWebStorage = require('./createWebStorage'); - -var _createWebStorage2 = _interopRequireDefault(_createWebStorage); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = (0, _createWebStorage2.default)('session'); \ No newline at end of file diff --git a/node_modules/redux-persist/lib/storage/session.js.flow b/node_modules/redux-persist/lib/storage/session.js.flow deleted file mode 100644 index 1bb16d6..0000000 --- a/node_modules/redux-persist/lib/storage/session.js.flow +++ /dev/null @@ -1,5 +0,0 @@ -// @flow - -import createWebStorage from './createWebStorage' - -export default createWebStorage('session') diff --git a/node_modules/redux-persist/lib/types.js b/node_modules/redux-persist/lib/types.js deleted file mode 100644 index a726efc..0000000 --- a/node_modules/redux-persist/lib/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; \ No newline at end of file diff --git a/node_modules/redux-persist/lib/types.js.flow b/node_modules/redux-persist/lib/types.js.flow deleted file mode 100644 index 2873bdb..0000000 --- a/node_modules/redux-persist/lib/types.js.flow +++ /dev/null @@ -1,82 +0,0 @@ -// @flow - -export type PersistState = { - version: number, - rehydrated: boolean, -} - -export type PersistedState = { - _persist: PersistState, -} | void - -export type PersistConfig = { - version?: number, - storage: Object, - key: string, - keyPrefix?: string, // @TODO remove in v6 - blacklist?: Array, - whitelist?: Array, - transforms?: Array, - throttle?: number, - migrate?: (PersistedState, number) => Promise, - stateReconciler?: false | Function, - getStoredState?: PersistConfig => Promise, // used for migrations - debug?: boolean, - serialize?: boolean, -} - -export type PersistorOptions = { - enhancer?: Function, -} - -export type Storage = { - getItem: (string, ?(string) => any) => any, - setItem: (string, string, ?() => any) => any, - removeItem: (string, ?() => any) => any, -} - -export type MigrationManifest = { - [number | string]: (PersistedState) => PersistedState, -} - -export type Transform = { - in: (Object | string, string) => Object, - out: (Object | string, string) => Object, - config?: PersistConfig, -} - -export type RehydrateErrorType = any - -export type RehydrateAction = { - type: 'redux-persist/REHYDRATE', - key: string, - payload: ?Object, - err: ?RehydrateErrorType, -} - -export type Persistoid = { - update: Object => void, - flush: () => Promise, -} - -type RegisterAction = { - type: 'redux-persist/REGISTER', - key: string, -} - -type PersistorAction = RehydrateAction | RegisterAction - -type PersistorState = { - registry: Array, - bootstrapped: boolean, -} - -type PersistorSubscribeCallback = () => any - -export type Persistor = { - purge: () => Promise, - flush: () => Promise, - +dispatch: PersistorAction => PersistorAction, - +getState: () => PersistorState, - +subscribe: PersistorSubscribeCallback => () => any, -} diff --git a/node_modules/redux-persist/lib/utils/curry.js b/node_modules/redux-persist/lib/utils/curry.js deleted file mode 100644 index c358959..0000000 --- a/node_modules/redux-persist/lib/utils/curry.js +++ /dev/null @@ -1,29 +0,0 @@ -// // -// // credit @gcanti, taken from https://github.com/gcanti/flow-static-land/blob/e36cd55b8f8541e81828ec39964bdb6f5ccbec91/src/Fun.js - -// export type Fn1 = (a: A, ...rest: Array) => B -// export type Fn2 = (a: A, b: B, ...rest: Array) => C -// export type Fn3 = (a: A, b: B, c: C, ...rest: Array) => D - -// export type CurriedFn2 = Fn1> & Fn2 -// export type CurriedFn3 = Fn1> & -// Fn2> & -// Fn3 - -// declare function curry(f: Fn2): CurriedFn2 // eslint-disable-line no-redeclare -// declare function curry(f: Fn3): CurriedFn3 // eslint-disable-line no-redeclare - -// declare function curried(f, length, acc) { -// return function() { -// const combined = acc.concat(Array.prototype.slice.call(arguments)) -// return combined.length >= length -// ? f.apply(this, combined) -// : curried(f, length, combined) -// } -// } - -// export function curry(f: Function) { -// // eslint-disable-line no-redeclare -// return curried(f, f.length, []) -// } -"use strict"; \ No newline at end of file diff --git a/node_modules/redux-persist/lib/utils/curry.js.flow b/node_modules/redux-persist/lib/utils/curry.js.flow deleted file mode 100644 index b55b1a8..0000000 --- a/node_modules/redux-persist/lib/utils/curry.js.flow +++ /dev/null @@ -1,28 +0,0 @@ -// // @flow -// // credit @gcanti, taken from https://github.com/gcanti/flow-static-land/blob/e36cd55b8f8541e81828ec39964bdb6f5ccbec91/src/Fun.js - -// export type Fn1 = (a: A, ...rest: Array) => B -// export type Fn2 = (a: A, b: B, ...rest: Array) => C -// export type Fn3 = (a: A, b: B, c: C, ...rest: Array) => D - -// export type CurriedFn2 = Fn1> & Fn2 -// export type CurriedFn3 = Fn1> & -// Fn2> & -// Fn3 - -// declare function curry(f: Fn2): CurriedFn2 // eslint-disable-line no-redeclare -// declare function curry(f: Fn3): CurriedFn3 // eslint-disable-line no-redeclare - -// declare function curried(f, length, acc) { -// return function() { -// const combined = acc.concat(Array.prototype.slice.call(arguments)) -// return combined.length >= length -// ? f.apply(this, combined) -// : curried(f, length, combined) -// } -// } - -// export function curry(f: Function) { -// // eslint-disable-line no-redeclare -// return curried(f, f.length, []) -// } diff --git a/node_modules/redux-persist/package.json b/node_modules/redux-persist/package.json deleted file mode 100644 index 222ebda..0000000 --- a/node_modules/redux-persist/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "redux-persist", - "version": "5.5.0", - "description": "persist and rehydrate redux stores", - "main": "lib/index.js", - "module": "es/index.js", - "repository": "rt2zz/redux-persist", - "files": [ - "es", - "src", - "lib" - ], - "scripts": { - "build": "npm run flow-copy && npm run build:commonjs && npm run build:es", - "build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib", - "build:es": "cross-env BABEL_ENV=es babel src --out-dir es", - "clean": "rimraf es && rimraf lib", - "flow-copy": "flow-copy-source src es && flow-copy-source src lib", - "precommit": "lint-staged", - "prepublishOnly": "npm run clean && npm run build", - "test": "BABEL_ENV=commonjs ava" - }, - "lint-staged": { - "src/**/*.js": [ - "prettier --no-semi --single-quote --trailing-comma --parser=flow --write", - "git add" - ] - }, - "author": "", - "license": "MIT", - "homepage": "https://github.com/rt2zz/redux-persist#readme", - "ava": { - "files": [ - "tests/**/*.spec.js" - ], - "require": [ - "babel-polyfill", - "babel-register" - ], - "babel": "inherit" - }, - "devDependencies": { - "ava": "^0.19.1", - "babel-cli": "^6.26.0", - "babel-eslint": "^8.0.1", - "babel-plugin-transform-class-properties": "^6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-plugin-transform-object-rest-spread": "^6.23.0", - "babel-polyfill": "^6.23.0", - "babel-preset-env": "^1.5.2", - "babel-preset-flow": "^6.23.0", - "babel-register": "^6.24.1", - "cross-env": "^5.0.1", - "eslint": "^4.8.0", - "eslint-plugin-flowtype": "^2.30.4", - "eslint-plugin-import": "^2.2.0", - "flow-bin": "^0.59.0", - "flow-copy-source": "^1.1.0", - "husky": "^0.13.3", - "lint-staged": "^3.4.0", - "lodash": "^4.17.4", - "prettier": "^1.4.4", - "redux": "^3.6.0", - "redux-mock-store": "^1.2.3", - "rimraf": "^2.6.1", - "sinon": "^2.3.2" - }, - "peerDependencies": { - "redux": ">3.0.0" - }, - "dependencies": {} -} diff --git a/node_modules/redux-persist/src/constants.js b/node_modules/redux-persist/src/constants.js deleted file mode 100644 index 009705f..0000000 --- a/node_modules/redux-persist/src/constants.js +++ /dev/null @@ -1,10 +0,0 @@ -// @flow - -export const KEY_PREFIX = 'persist:' -export const FLUSH = 'persist/FLUSH' -export const REHYDRATE = 'persist/REHYDRATE' -export const PAUSE = 'persist/PAUSE' -export const PERSIST = 'persist/PERSIST' -export const PURGE = 'persist/PURGE' -export const REGISTER = 'persist/REGISTER' -export const DEFAULT_VERSION = -1 diff --git a/node_modules/redux-persist/src/createMigrate.js b/node_modules/redux-persist/src/createMigrate.js deleted file mode 100644 index 5426c46..0000000 --- a/node_modules/redux-persist/src/createMigrate.js +++ /dev/null @@ -1,58 +0,0 @@ -// @flow - -import { DEFAULT_VERSION } from './constants' - -import type { PersistedState, MigrationManifest } from './types' - -export default function createMigrate( - migrations: MigrationManifest, - config?: { debug: boolean } -) { - let { debug } = config || {} - return function( - state: PersistedState, - currentVersion: number - ): Promise { - if (!state) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log('redux-persist: no inbound state, skipping migration') - return Promise.resolve(undefined) - } - - let inboundVersion: number = - state._persist && state._persist.version !== undefined - ? state._persist.version - : DEFAULT_VERSION - if (inboundVersion === currentVersion) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log('redux-persist: versions match, noop migration') - return Promise.resolve(state) - } - if (inboundVersion > currentVersion) { - if (process.env.NODE_ENV !== 'production') - console.error('redux-persist: downgrading version is not supported') - return Promise.resolve(state) - } - - let migrationKeys = Object.keys(migrations) - .map(ver => parseInt(ver)) - .filter(key => currentVersion >= key && key > inboundVersion) - .sort((a, b) => a - b) - - if (process.env.NODE_ENV !== 'production' && debug) - console.log('redux-persist: migrationKeys', migrationKeys) - try { - let migratedState = migrationKeys.reduce((state, versionKey) => { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - 'redux-persist: running migration for versionKey', - versionKey - ) - return migrations[versionKey](state) - }, state) - return Promise.resolve(migratedState) - } catch (err) { - return Promise.reject(err) - } - } -} diff --git a/node_modules/redux-persist/src/createPersistoid.js b/node_modules/redux-persist/src/createPersistoid.js deleted file mode 100644 index 16dfe85..0000000 --- a/node_modules/redux-persist/src/createPersistoid.js +++ /dev/null @@ -1,111 +0,0 @@ -// @flow - -import { KEY_PREFIX, REHYDRATE } from './constants' - -import type { Persistoid, PersistConfig, Transform } from './types' - -export default function createPersistoid(config: PersistConfig): Persistoid { - // defaults - const blacklist: ?Array = config.blacklist || null - const whitelist: ?Array = config.whitelist || null - const transforms = config.transforms || [] - const throttle = config.throttle || 0 - const storageKey = `${config.keyPrefix !== undefined - ? config.keyPrefix - : KEY_PREFIX}${config.key}` - const storage = config.storage - const serialize = config.serialize === false ? x => x : defaultSerialize - - // initialize stateful values - let lastState = {} - let stagedState = {} - let keysToProcess = [] - let timeIterator: ?number = null - let writePromise = null - - const update = (state: Object) => { - // add any changed keys to the queue - Object.keys(state).forEach(key => { - let subState = state[key] - if (!passWhitelistBlacklist(key)) return // is keyspace ignored? noop - if (lastState[key] === state[key]) return // value unchanged? noop - if (keysToProcess.indexOf(key) !== -1) return // is key already queued? noop - keysToProcess.push(key) // add key to queue - }) - - // start the time iterator if not running (read: throttle) - if (timeIterator === null) { - timeIterator = setInterval(processNextKey, throttle) - } - - lastState = state - } - - function processNextKey() { - if (keysToProcess.length === 0) { - if (timeIterator) clearInterval(timeIterator) - timeIterator = null - return - } - - let key = keysToProcess.shift() - let endState = transforms.reduce((subState, transformer) => { - return transformer.in(subState, key) - }, lastState[key]) - if (typeof endState !== 'undefined') stagedWrite(key, endState) - } - - function stagedWrite(key: string, endState: any) { - try { - stagedState[key] = serialize(endState) - } catch (err) { - console.error( - 'redux-persist/createPersistoid: error serializing state', - err - ) - } - if (keysToProcess.length === 0) { - // cleanup any removed keys just before write. - Object.keys(stagedState).forEach(key => { - if (lastState[key] === undefined) { - delete stagedState[key] - } - }) - - writePromise = storage - .setItem(storageKey, serialize(stagedState)) - .catch(onWriteFail) - } - } - - function passWhitelistBlacklist(key) { - if (whitelist && whitelist.indexOf(key) === -1 && key !== '_persist') return false - if (blacklist && blacklist.indexOf(key) !== -1) return false - return true - } - - function onWriteFail(err) { - // @TODO add fail handlers (typically storage full) - if (err && process.env.NODE_ENV !== 'production') { - console.error('Error storing data', err) - } - } - - const flush = () => { - while (keysToProcess.length !== 0) { - processNextKey() - } - return writePromise || Promise.resolve() - } - - // return `persistoid` - return { - update, - flush, - } -} - -// @NOTE in the future this may be exposed via config -function defaultSerialize(data) { - return JSON.stringify(data) -} diff --git a/node_modules/redux-persist/src/createTransform.js b/node_modules/redux-persist/src/createTransform.js deleted file mode 100644 index 3da5a15..0000000 --- a/node_modules/redux-persist/src/createTransform.js +++ /dev/null @@ -1,30 +0,0 @@ -// @flow - -type TransformConfig = { - whitelist?: Array, - blacklist?: Array, -} - -export default function createTransform( - // @NOTE inbound: transform state coming from redux on its way to being serialized and stored - inbound: ?Function, - // @NOTE outbound: transform state coming from storage, on its way to be rehydrated into redux - outbound: ?Function, - config: TransformConfig = {} -) { - let whitelist = config.whitelist || null - let blacklist = config.blacklist || null - - function whitelistBlacklistCheck(key) { - if (whitelist && whitelist.indexOf(key) === -1) return true - if (blacklist && blacklist.indexOf(key) !== -1) return true - return false - } - - return { - in: (state: Object, key: string) => - !whitelistBlacklistCheck(key) && inbound ? inbound(state, key) : state, - out: (state: Object, key: string) => - !whitelistBlacklistCheck(key) && outbound ? outbound(state, key) : state, - } -} diff --git a/node_modules/redux-persist/src/getStoredState.js b/node_modules/redux-persist/src/getStoredState.js deleted file mode 100644 index f98b348..0000000 --- a/node_modules/redux-persist/src/getStoredState.js +++ /dev/null @@ -1,43 +0,0 @@ -// @flow - -import type { PersistConfig } from './types' - -import { KEY_PREFIX } from './constants' - -export default function getStoredState( - config: PersistConfig -): Promise { - const transforms = config.transforms || [] - const storageKey = `${config.keyPrefix !== undefined - ? config.keyPrefix - : KEY_PREFIX}${config.key}` - const storage = config.storage - const debug = config.debug - const deserialize = config.serialize === false ? x => x : defaultDeserialize - return storage.getItem(storageKey).then(serialized => { - if (!serialized) return undefined - else { - try { - let state = {} - let rawState = deserialize(serialized) - Object.keys(rawState).forEach(key => { - state[key] = transforms.reduceRight((subState, transformer) => { - return transformer.out(subState, key) - }, deserialize(rawState[key])) - }) - return state - } catch (err) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - `redux-persist/getStoredState: Error restoring data ${serialized}`, - err - ) - throw err - } - } - }) -} - -function defaultDeserialize(serial) { - return JSON.parse(serial) -} diff --git a/node_modules/redux-persist/src/index.d.ts b/node_modules/redux-persist/src/index.d.ts deleted file mode 100644 index 633ad09..0000000 --- a/node_modules/redux-persist/src/index.d.ts +++ /dev/null @@ -1,413 +0,0 @@ - -declare module "redux-persist" { - export * from "redux-persist/es/constants"; - export * from "redux-persist/es/types"; - export * from "redux-persist/es/createMigrate"; - export * from "redux-persist/es/createPersistoid"; - export * from "redux-persist/es/createTransform"; - export * from "redux-persist/es/createWebStorage"; - export * from "redux-persist/es/getStoredState"; - export * from "redux-persist/es/persistCombineReducers"; - export * from "redux-persist/es/persistReducer"; - export * from "redux-persist/es/persistStore"; - export * from "redux-persist/es/purgeStoredState"; -} - -declare module "redux-persist/lib/constants" { - export * from "redux-persist/es/constants"; -} - -declare module "redux-persist/lib/types" { - export * from "redux-persist/es/types"; -} - -declare module "redux-persist/lib/createMigrate" { - export * from "redux-persist/es/createMigrate"; -} - -declare module "redux-persist/lib/createPersistoid" { - export * from "redux-persist/es/createPersistoid"; -} - -declare module "redux-persist/lib/createTransform" { - export * from "redux-persist/es/createTransform"; -} - -declare module "redux-persist/lib/createWebStorage" { - export * from "redux-persist/es/createWebStorage"; -} - -declare module "redux-persist/lib/getStoredState" { - export * from "redux-persist/es/getStoredState"; -} - -declare module "redux-persist/lib/persistCombineReducers" { - export * from "redux-persist/es/persistCombineReducers"; -} - -declare module "redux-persist/lib/persistReducer" { - export * from "redux-persist/es/persistReducer"; -} - -declare module "redux-persist/lib/persistStore" { - export * from "redux-persist/es/persistStore"; -} - -declare module "redux-persist/lib/purgeStoredState" { - export * from "redux-persist/es/purgeStoredState"; -} - -declare module "redux-persist/es/constants" { - /* constants */ - export const DEFAULT_VERSION: number; - export const KEY_PREFIX: "persist:"; - export const FLUSH: "persist/FLUSH"; - export const REHYDRATE: "persist/REHYDRATE"; - export const PAUSE: "persist/PAUSE"; - export const PERSIST: "persist/PERSIST"; - export const PURGE: "persist/PURGE"; - export const REGISTER: "persist/REGISTER"; -} - -declare module "redux-persist/es/types" { - import { StoreEnhancer } from "redux"; - import { Transform } from "redux-persist/es/createTransform" - /* types */ - export interface PersistState { version: number; rehydrated: boolean; } - export type PersistedState = { _persist: PersistState } | void; - - export interface PersistConfig { - version?: number; - storage: WebStorage | AsyncStorage | LocalForageStorage | Storage; - key: string; - /** - * **Depricated:** keyPrefix is going to be removed in v6. - */ - keyPrefix?: string; - blacklist?: Array; - whitelist?: Array; - transforms?: Array>; - throttle?: number; - migrate?: (state: PersistedState, versionKey: number) => Promise; - stateReconciler?: false | Function; - /** - * Used for migrations. - */ - getStoredState?: (config: PersistConfig) => Promise; - debug?: boolean; - serialize?: boolean; - } - export interface PersistorOptions { enhancer?: StoreEnhancer } - export interface MigrationManifest { - [key: string]: (state: PersistedState) => PersistedState; - } - export type RehydrateErrorType = any; - export type RehydrateAction = { - type: "redux-persist/es/REHYDRATE", - key: string, - payload?: Payload, - err?: RehydrateErrorType, - } - export interface Persistoid { - update(item: any): void; - flush(): Promise; - } - export type RegisterAction = { - type: "redux-persist/es/REGISTER", - key: string, - } - export type PersistorAction = RehydrateAction | RegisterAction - export interface PersistorState { - registry: Array; - bootstrapped: boolean; - } - export type PersistorSubscribeCallback = () => any - /** - * A persistor is a redux store unto itself, allowing you to purge stored state, flush all - * pending state serialization and immediately write to disk - */ - export interface Persistor { - purge(): Promise; - flush(): Promise; - dispatch(action: PersistorAction): PersistorAction; - getState(): PersistorState; - subscribe(callback: PersistorSubscribeCallback): () => any; - } - /* storage types */ - export interface WebStorage { - /** - * Fetches key and returns item in a promise. - */ - getItem(key: string): Promise; - /** - * Sets value for key and returns item in a promise. - */ - setItem(key: string, item: string): Promise; - /** - * Removes value for key. - */ - removeItem(key: string): Promise; - } - /** - * User for local storage in react-native. - * - * AsyncStorage is a simple, unencrypted, asynchronous, persistent, key-value storage - * system that is global to the app. It should be used instead of LocalStorage. - * - * It is recommended that you use an abstraction on top of `AsyncStorage` - * instead of `AsyncStorage` directly for anything more than light usage since - * it operates globally. - * - * On iOS, `AsyncStorage` is backed by native code that stores small values in a - * serialized dictionary and larger values in separate files. On Android, - * `AsyncStorage` will use either [RocksDB](http://rocksdb.org/) or SQLite - * based on what is available. - * - * The definition obtained from - * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-native/index.d.ts - */ - export interface AsyncStorage { - /** - * Fetches key and passes the result to callback, along with an Error if there is any. - */ - getItem(key: string, callback?: (error?: Error, result?: string) => void): Promise; - /** - * Sets value for key and calls callback on completion, along with an Error if there is any. - */ - setItem(key: string, value: string, callback?: (error?: Error) => void): Promise; - /** - * Removes value for key and calls callback on completion, along with an Error if there is any. - */ - removeItem(key: string, callback?: (error?: Error) => void): Promise; - /** - * Merges existing value with input value, assuming they are stringified json. Returns a Promise object. - * Not supported by all native implementation - */ - mergeItem(key: string, value: string, callback?: (error?: Error) => void): Promise; - /** - * Erases all AsyncStorage for all clients, libraries, etc. You probably don't want to call this. - * Use removeItem or multiRemove to clear only your own keys instead. - */ - clear(callback?: (error?: Error) => void): Promise; - /** - * Gets all keys known to the app, for all callers, libraries, etc - */ - getAllKeys(callback?: (error?: Error, keys?: string[]) => void): Promise; - /** - * multiGet invokes callback with an array of key-value pair arrays that matches the input format of multiSet - */ - multiGet(keys: string[], callback?: (errors?: Error[], result?: [string, string][]) => void): Promise<[string, string][]>; - /** - * multiSet and multiMerge take arrays of key-value array pairs that match the output of multiGet, - * - * multiSet([['k1', 'val1'], ['k2', 'val2']], cb); - */ - multiSet(keyValuePairs: string[][], callback?: (errors?: Error[]) => void): Promise; - /** - * Delete all the keys in the keys array. - */ - multiRemove(keys: string[], callback?: (errors?: Error[]) => void): Promise; - /** - * Merges existing values with input values, assuming they are stringified json. - * Returns a Promise object. - * - * Not supported by all native implementations. - */ - multiMerge(keyValuePairs: string[][], callback?: (errors?: Error[]) => void): Promise; - } - /** - * LocalForage: Offline storage, improved. Wraps IndexedDB, WebSQL or localStorage using a simple - * but powerful API. - * - * The type definition was obtained from: - * @see https://github.com/localForage/localForage/blob/master/typings/localforage.d.ts - */ - export interface LocalForageStorage { - getItem(key: string, callback?: (err: any, value: T) => void): Promise; - setItem(key: string, value: T, callback?: (err: any, value: T) => void): Promise; - removeItem(key: string, callback?: (err: any) => void): Promise; - clear(callback?: (err: any) => void): Promise; - length(callback?: (err: any, numberOfKeys: number) => void): Promise; - key(keyIndex: number, callback?: (err: any, key: string) => void): Promise; - keys(callback?: (err: any, keys: string[]) => void): Promise; - iterate(iteratee: (value: T, key: string, iterationNumber: number) => U, callback?: (err: any, result: U) => void): Promise; - } - export interface Storage { - getItem(key: string, ...args: any[]): any; - setItem(key: string, value: any, ...args: any[]): any; - remoteItem(key: string, ...args: any[]): any; - } -} - -declare module "redux-persist/es/createMigrate" { - import { PersistedState, MigrationManifest } from "redux-persist/es/types"; - // createMigrate - /** - * Migration configutation - */ - export interface MigrationConfig { debug: boolean; } - export type MigrationDispatch = (state: PersistedState, currentVersion: number) => Promise; - /** - * Creates a migration path for your app's state. - * @param migrations migration manifest - * @param config migration configuration (basically, indicates if you are running in debug mode or not) - */ - export function createMigrate(migrations: MigrationManifest, config?: MigrationConfig): MigrationDispatch; -} - -declare module "redux-persist/es/createPersistoid" { - import { PersistConfig, Persistoid } from "redux-persist/es/types"; - // createPersistoid - export function createPersistoid(config: PersistConfig): Persistoid; -} - -declare module "redux-persist/es/createTransform" { - import { PersistConfig } from "redux-persist/es/types"; - - export type TransformIn = (state: S, key: string) => R; - export type TransformOut = (raw: R, key: string) => S; - - export interface Transform { - in: TransformIn; - out: TransformOut; - config?: PersistConfig; - } - - export function createTransform( - inbound: TransformIn, - outbound: TransformOut, - config?: Pick - ): Transform; -} - -declare module "redux-persist/es/createWebStorage" { - import { WebStorage } from "redux-persist/es/types"; - export function createWebStorage(type: string): WebStorage; -} - -declare module "redux-persist/es/getStoredState" { - import { PersistConfig } from "redux-persist/es/types"; - export function getStoredState(config: PersistConfig): Promise; -} - -declare module "redux-persist/es/persistCombineReducers" { - import { Reducer, ReducersMapObject } from "redux"; - import { PersistConfig, PersistedState } from "redux-persist/es/types"; - /** - * It provides a way of combining the reducers, replacing redux's @see combineReducers - * @param config persistence configuration - * @param reducers set of keyed functions mapping to the application state - * @returns reducer - */ - export function persistCombineReducers(config: PersistConfig, reducers: ReducersMapObject): Reducer; -} - -declare module "redux-persist/es/persistReducer" { - import { PersistState, PersistConfig } from "redux-persist/es/types"; - // persistReducer - export interface PersistPartial { _persist: PersistState } - export type BaseReducer = (state: S | void, action: A) => S; - /** - * It provides a way of combining the reducers, replacing redux's @see combineReducers - * @param config persistence configuration - * @param baseReducer reducer used to persist the state - */ - export function persistReducer(config: PersistConfig, baseReducer: BaseReducer): (s: S, a: A) => S & PersistPartial; -} -declare module "redux-persist/es/persistStore" { - import { PersistorOptions, Persistor } from "redux-persist/es/types"; - // persistStore - export type BoostrappedCallback = () => any; - /** - * Creates a persistor for a given store. - * @param store store to be persisted (or match an existent storage) - * @param persistorOptions enhancers of the persistor - * @param callback bootstrap callback of sort. - */ - export function persistStore(store: any, persistorOptions?: PersistorOptions, callback?: BoostrappedCallback): Persistor; -} - -declare module "redux-persist/es/purgeStoredState" { - import { PersistConfig } from "redux-persist/es/types"; - /** - * Removes stored state. - * @param config persist configuration - */ - export function purgeStoredState(config: PersistConfig): any; -} - -declare module "redux-persist/es/integration/react" { - import { ReactNode, PureComponent } from "react"; - import { Persistor, WebStorage } from "redux-persist"; - - /** - * Properties of @see PersistGate - */ - export interface PersistGateProps { - persistor: Persistor; - onBeforeLift?: Function; - children?: ReactNode; - loading?: ReactNode; - } - /** - * State of @see PersistGate - */ - export interface PersistorGateState { bootstrapped: boolean; } - /** - * Entry point of your react application to allow it persist a given store @see Persistor and its configuration. - * @see Persistor - * @see PersistGateProps - * @see PersistGateState - */ - export class PersistGate extends React.PureComponent { } -} - -declare module "redux-persist/es/integration/getStoredStateMigrateV4" { - import { PersistConfig, Transform } from "redux-persist"; - - export interface V4Config { - storage?: any; - keyPrefix?: string; - transforms?: Array>; - blacklist?: string[]; - whitelist?: string[]; - } - - export function getStoredState(v4Config: V4Config): (config: PersistConfig) => Promise; -} - -declare module "redux-persist/es/stateReconciler/autoMergeLevel1" { - import { PersistConfig } from "redux-persist"; - export function autoMergeLevel1(inboundState: S, originalState: S, reducedState: S, { debug }: PersistConfig): S; -} - -declare module "redux-persist/es/stateReconciler/autoMergeLevel2" { - import { PersistConfig } from "redux-persist"; - export function autoMergeLevel2(inboundState: S, originalState: S, reducedState: S, { debug }: PersistConfig): S; -} - -declare module "redux-persist/es/stateReconciler/hardSet" { - export function hardSet(inboundState: S): S; -} - -declare module "redux-persist/es/storage" { - import { WebStorage } from "redux-persist"; - export let storage: WebStorage; - export default storage; -} - -declare module "redux-persist/es/getStorage" { - import { Storage } from "redux-persist"; - export function getStorage(type: string): Storage; -} - -declare module "redux-persist/es/createWebStorage" { - import { WebStorage } from "redux-persist"; - export function createWebStorage(type: string): WebStorage; -} - -declare module "redux-persist/es/storage/session" { - import { WebStorage } from "redux-persist"; - let sessionStorage: WebStorage; - export default sessionStorage; -} diff --git a/node_modules/redux-persist/src/index.js b/node_modules/redux-persist/src/index.js deleted file mode 100644 index 0d9c048..0000000 --- a/node_modules/redux-persist/src/index.js +++ /dev/null @@ -1,12 +0,0 @@ -// @flow - -export { default as persistReducer } from './persistReducer' -export { default as persistCombineReducers } from './persistCombineReducers' -export { default as persistStore } from './persistStore' -export { default as createMigrate } from './createMigrate' -export { default as createTransform } from './createTransform' -export { default as getStoredState } from './getStoredState' -export { default as createPersistoid } from './createPersistoid' -export { default as purgeStoredState } from './purgeStoredState' - -export * from './constants' diff --git a/node_modules/redux-persist/src/integration/getStoredStateMigrateV4.js b/node_modules/redux-persist/src/integration/getStoredStateMigrateV4.js deleted file mode 100644 index 03ea063..0000000 --- a/node_modules/redux-persist/src/integration/getStoredStateMigrateV4.js +++ /dev/null @@ -1,183 +0,0 @@ -// @flow - -import getStoredStateV5 from '../getStoredState' - -import type { PersistConfig, Transform } from '../types' - -type V4Config = { - storage?: Object, - keyPrefix?: string, - transforms?: Array, - blacklist?: Array, - whitelist?: Array, -} - -export default function getStoredState(v4Config: V4Config) { - return function(v5Config: PersistConfig) { - return getStoredStateV5(v5Config).then(state => { - if (state) return state - else return getStoredStateV4(v4Config) - }) - } -} - -const KEY_PREFIX = 'reduxPersist:' - -function hasLocalStorage() { - if (typeof window !== 'object' || !('localStorage' in window)) { - return false - } - - try { - let storage = window.localStorage - const testKey = `redux-persist localStorage test` - storage.setItem(testKey, 'test') - storage.getItem(testKey) - storage.removeItem(testKey) - } catch (e) { - if (process.env.NODE_ENV !== 'production') - console.warn( - `redux-persist localStorage test failed, persistence will be disabled.` - ) - return false - } - return true -} - -let noop = (...args: any) => { - /* noop */ return null -} -const noStorage = { - getItem: noop, - setItem: noop, - removeItem: noop, - getAllKeys: noop, -} -const createAsyncLocalStorage = () => { - if (!hasLocalStorage()) return noStorage - let localStorage = window.localStorage - return { - getAllKeys: function(cb) { - try { - var keys = [] - for (var i = 0; i < localStorage.length; i++) { - keys.push(localStorage.key(i)) - } - cb(null, keys) - } catch (e) { - cb(e) - } - }, - getItem(key, cb) { - try { - var s = localStorage.getItem(key) - cb(null, s) - } catch (e) { - cb(e) - } - }, - setItem(key, string, cb) { - try { - localStorage.setItem(key, string) - cb(null) - } catch (e) { - cb(e) - } - }, - removeItem(key, cb) { - try { - localStorage.removeItem(key) - cb && cb(null) - } catch (e) { - cb(e) - } - }, - } -} - -function getStoredStateV4(v4Config: V4Config) { - return new Promise((resolve, reject) => { - let storage = v4Config.storage || createAsyncLocalStorage() - const deserializer = - v4Config.serialize === false - ? data => data - : (serial: string) => JSON.parse(serial) - const blacklist = v4Config.blacklist || [] - const whitelist = v4Config.whitelist || false - const transforms = v4Config.transforms || [] - const keyPrefix = - v4Config.keyPrefix !== undefined ? v4Config.keyPrefix : KEY_PREFIX - - // fallback getAllKeys to `keys` if present (LocalForage compatability) - if (storage.keys && !storage.getAllKeys) - storage = { ...storage, getAllKeys: storage.keys } - - let restoredState = {} - let completionCount = 0 - - storage.getAllKeys((err, allKeys = []) => { - if (err) { - if (process.env.NODE_ENV !== 'production') - console.warn( - 'redux-persist/getStoredState: Error in storage.getAllKeys' - ) - return reject(err) - } - - let persistKeys = allKeys - .filter(key => key.indexOf(keyPrefix) === 0) - .map(key => key.slice(keyPrefix.length)) - let keysToRestore = persistKeys.filter(passWhitelistBlacklist) - - let restoreCount = keysToRestore.length - if (restoreCount === 0) resolve(undefined) - keysToRestore.forEach(key => { - storage.getItem(createStorageKey(key), (err, serialized) => { - if (err && process.env.NODE_ENV !== 'production') - console.warn( - 'redux-persist/getStoredState: Error restoring data for key:', - key, - err - ) - else restoredState[key] = rehydrate(key, serialized) - completionCount += 1 - if (completionCount === restoreCount) resolve(restoredState) - }) - }) - }) - - function rehydrate(key: string, serialized: ?string) { - let state = null - - try { - let data = serialized ? deserializer(serialized) : undefined - state = transforms.reduceRight((subState, transformer) => { - return transformer.out(subState, key) - }, data) - } catch (err) { - if (process.env.NODE_ENV !== 'production') - console.warn( - 'redux-persist/getStoredState: Error restoring data for key:', - key, - err - ) - } - - return state - } - - function passWhitelistBlacklist(key) { - if (whitelist && whitelist.indexOf(key) === -1) return false - if (blacklist.indexOf(key) !== -1) return false - return true - } - - function createStorageKey(key) { - return `${keyPrefix}${key}` - } - }) -} - -function defaultDeserializer(serial: string) { - return JSON.parse(serial) -} diff --git a/node_modules/redux-persist/src/integration/react.js b/node_modules/redux-persist/src/integration/react.js deleted file mode 100644 index 6a34894..0000000 --- a/node_modules/redux-persist/src/integration/react.js +++ /dev/null @@ -1,56 +0,0 @@ -// @flow -import React, { PureComponent } from 'react' // eslint-disable-line import/no-unresolved -import type { Node } from 'react' // eslint-disable-line import/no-unresolved -import type { Persistor } from '../types' - -type Props = { - onBeforeLift?: Function, - children?: Node, - loading?: Node, - persistor: Persistor, -} - -type State = { - bootstrapped: boolean, -} - -export class PersistGate extends PureComponent { - static defaultProps = { - loading: null, - } - - state = { - bootstrapped: false, - } - _unsubscribe: ?Function - - componentDidMount() { - this._unsubscribe = this.props.persistor.subscribe( - this.handlePersistorState - ) - this.handlePersistorState() - } - - handlePersistorState = () => { - const { persistor } = this.props - let { bootstrapped } = persistor.getState() - if (bootstrapped) { - if (this.props.onBeforeLift) { - Promise.resolve(this.props.onBeforeLift()) - .then(() => this.setState({ bootstrapped: true })) - .catch(() => this.setState({ bootstrapped: true })) - } else { - this.setState({ bootstrapped: true }) - } - this._unsubscribe && this._unsubscribe() - } - } - - componentWillUnmount() { - this._unsubscribe && this._unsubscribe() - } - - render() { - return this.state.bootstrapped ? this.props.children : this.props.loading - } -} diff --git a/node_modules/redux-persist/src/persistCombineReducers.js b/node_modules/redux-persist/src/persistCombineReducers.js deleted file mode 100644 index 3db95ea..0000000 --- a/node_modules/redux-persist/src/persistCombineReducers.js +++ /dev/null @@ -1,22 +0,0 @@ -// @flow - -import { combineReducers } from 'redux' -import persistReducer from './persistReducer' -import autoMergeLevel2 from './stateReconciler/autoMergeLevel2' - -import type { PersistConfig } from './types' - -type Reducers = { - [key: string]: Function, -} - -type Reducer = (state: Object, action: Object) => Object - -// combineReducers + persistReducer with stateReconciler defaulted to autoMergeLevel2 -export default function persistCombineReducers( - config: PersistConfig, - reducers: Reducers -): Reducer { - config.stateReconciler = config.stateReconciler === undefined ? autoMergeLevel2 : config.stateReconciler - return persistReducer(config, combineReducers(reducers)) -} diff --git a/node_modules/redux-persist/src/persistReducer.js b/node_modules/redux-persist/src/persistReducer.js deleted file mode 100644 index 681a80f..0000000 --- a/node_modules/redux-persist/src/persistReducer.js +++ /dev/null @@ -1,155 +0,0 @@ -// @flow -import { - FLUSH, - PAUSE, - PERSIST, - PURGE, - REHYDRATE, - DEFAULT_VERSION, -} from './constants' - -import type { - PersistConfig, - MigrationManifest, - PersistState, - Persistoid, -} from './types' - -import autoMergeLevel1 from './stateReconciler/autoMergeLevel1' -import createPersistoid from './createPersistoid' -import defaultGetStoredState from './getStoredState' -import purgeStoredState from './purgeStoredState' - -type PersistPartial = { _persist: PersistState } -/* - @TODO add validation / handling for: - - persisting a reducer which has nested _persist - - handling actions that fire before reydrate is called -*/ -export default function persistReducer( - config: PersistConfig, - baseReducer: (State | void, Action) => State -): (State, Action) => State & PersistPartial { - if (process.env.NODE_ENV !== 'production') { - if (!config) throw new Error('config is required for persistReducer') - if (!config.key) throw new Error('key is required in persistor config') - if (!config.storage) - throw new Error( - "redux-persist: config.storage is required. Try using one of the provided storage engines `import storageLocal from 'redux-persist/es/storage/local'" - ) - } - - const version = - config.version !== undefined ? config.version : DEFAULT_VERSION - const debug = config.debug || false - const stateReconciler = - config.stateReconciler === undefined - ? autoMergeLevel1 - : config.stateReconciler - const getStoredState = config.getStoredState || defaultGetStoredState - let _persistoid = null - let _purge = false - let _paused = true - - return (state: State, action: Action) => { - let { _persist, ...rest } = state || {} - let restState: State = rest - - if (action.type === PERSIST) { - // @NOTE PERSIST resumes if paused. - _paused = false - - // @NOTE only ever create persistoid once, ensure we call it at least once, even if _persist has already been set - if (!_persistoid) _persistoid = createPersistoid(config) - - // @NOTE PERSIST can be called multiple times, noop after the first - if (_persist) return state - if ( - typeof action.rehydrate !== 'function' || - typeof action.register !== 'function' - ) - throw new Error( - 'redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.' - ) - - action.register(config.key) - - getStoredState(config).then( - restoredState => { - const migrate = config.migrate || ((s, v) => Promise.resolve(s)) - migrate(restoredState, version).then( - migratedState => { - action.rehydrate(config.key, migratedState) - }, - migrateErr => { - if (process.env.NODE_ENV !== 'production' && migrateErr) - console.error('redux-persist: migration error', migrateErr) - action.rehydrate(config.key, undefined, migrateErr) - } - ) - }, - err => { - action.rehydrate(config.key, undefined, err) - } - ) - - return { - ...baseReducer(restState, action), - _persist: { version, rehydrated: false }, - } - } else if (action.type === PURGE) { - _purge = true - action.result(purgeStoredState(config)) - return { - ...baseReducer(restState, action), - _persist, - } - } else if (action.type === FLUSH) { - action.result(_persistoid && _persistoid.flush()) - return { - ...baseReducer(restState, action), - _persist, - } - } else if (action.type === PAUSE) { - _paused = true - } else if (action.type === REHYDRATE) { - // noop on restState if purging - if (_purge) - return { - ...restState, - _persist: { ..._persist, rehydrated: true }, - } - - // @NOTE if key does not match, will continue to default else below - if (action.key === config.key) { - let reducedState = baseReducer(restState, action) - let inboundState = action.payload - let reconciledRest: State = - stateReconciler !== false - ? stateReconciler(inboundState, state, reducedState, config) - : reducedState - - return { - ...reconciledRest, - _persist: { ..._persist, rehydrated: true }, - } - } - } - - // if we have not already handled PERSIST, straight passthrough - if (!_persist) return baseReducer(state, action) - - // otherwise, pull off _persist, run the reducer, and update the persistoid - // @TODO more performant workaround for combineReducers warning - let newState = { - ...baseReducer(restState, action), - _persist, - } - // update the persistoid only if we are already rehydrated and are not paused - _persist.rehydrated && - _persistoid && - !_paused && - _persistoid.update(newState) - return newState - } -} diff --git a/node_modules/redux-persist/src/persistStore.js b/node_modules/redux-persist/src/persistStore.js deleted file mode 100644 index 7118baf..0000000 --- a/node_modules/redux-persist/src/persistStore.js +++ /dev/null @@ -1,125 +0,0 @@ -// @flow - -import type { - Persistor, - PersistConfig, - PersistorOptions, - MigrationManifest, - RehydrateAction, - RehydrateErrorType, -} from './types' - -import { createStore } from 'redux' -import persistReducer from './persistReducer' -import { FLUSH, PAUSE, PERSIST, PURGE, REGISTER, REHYDRATE } from './constants' - -type PendingRehydrate = [Object, RehydrateErrorType, PersistConfig] -type Persist = (PersistConfig, MigrationManifest) => R => R -type CreatePersistor = Object => void -type BoostrappedCb = () => any - -const initialState = { - registry: [], - bootstrapped: false, -} - -const persistorReducer = (state = initialState, action) => { - switch (action.type) { - case REGISTER: - return { ...state, registry: [...state.registry, action.key] } - case REHYDRATE: - let firstIndex = state.registry.indexOf(action.key) - let registry = [...state.registry] - registry.splice(firstIndex, 1) - return { ...state, registry, bootstrapped: registry.length === 0 } - default: - return state - } -} - -export default function persistStore( - store: Object, - persistorOptions?: PersistorOptions, - cb?: BoostrappedCb -): Persistor { - let options: Object = persistorOptions || {} - - // help catch incorrect usage of passing PersistConfig in as PersistorOptions - if (process.env.NODE_ENV !== 'production') { - let bannedKeys = [ - 'blacklist', - 'whitelist', - 'transforms', - 'storage', - 'keyPrefix', - 'migrate', - ] - bannedKeys.forEach(k => { - if (!!options[k]) - console.error( - `redux-persist: invalid option passed to persistStore: "${k}". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.` - ) - }) - } - let boostrappedCb = cb || false - let persistor = createStore(persistorReducer, undefined, options.enhancer) - - persistor.purge = () => { - let results = [] - store.dispatch({ - type: PURGE, - result: purgeResult => { - results.push(purgeResult) - }, - }) - return Promise.all(results) - } - - persistor.flush = () => { - let results = [] - store.dispatch({ - type: FLUSH, - result: flushResult => { - results.push(flushResult) - }, - }) - return Promise.all(results) - } - - persistor.pause = () => { - store.dispatch({ - type: PAUSE, - }) - } - - let register = (key: string) => { - persistor.dispatch({ - type: REGISTER, - key, - }) - } - - let rehydrate = (key: string, payload: Object, err: any) => { - let rehydrateAction = { - type: REHYDRATE, - payload, - err, - key, - } - // dispatch to `store` to rehydrate and `persistor` to track result - store.dispatch(rehydrateAction) - persistor.dispatch(rehydrateAction) - if (boostrappedCb && persistor.getState().bootstrapped) { - boostrappedCb() - boostrappedCb = false - } - } - - persistor.persist = () => { - store.dispatch({ type: PERSIST, register, rehydrate }) - } - - persistor.persist() - - return persistor -} diff --git a/node_modules/redux-persist/src/purgeStoredState.js b/node_modules/redux-persist/src/purgeStoredState.js deleted file mode 100644 index c780f88..0000000 --- a/node_modules/redux-persist/src/purgeStoredState.js +++ /dev/null @@ -1,22 +0,0 @@ -// @flow - -import type { PersistConfig } from './types' - -import { KEY_PREFIX } from './constants' - -export default function purgeStoredState(config: PersistConfig) { - const storage = config.storage - const storageKey = `${config.keyPrefix !== undefined - ? config.keyPrefix - : KEY_PREFIX}${config.key}` - return storage.removeItem(storageKey, warnIfRemoveError) -} - -function warnIfRemoveError(err) { - if (err && process.env.NODE_ENV !== 'production') { - console.error( - 'redux-persist/purgeStoredState: Error purging data stored state', - err - ) - } -} diff --git a/node_modules/redux-persist/src/stateReconciler/autoMergeLevel1.js b/node_modules/redux-persist/src/stateReconciler/autoMergeLevel1.js deleted file mode 100644 index 880f28a..0000000 --- a/node_modules/redux-persist/src/stateReconciler/autoMergeLevel1.js +++ /dev/null @@ -1,50 +0,0 @@ -// @flow - -/* - autoMergeLevel1: - - merges 1 level of substate - - skips substate if already modified -*/ - -import type { PersistConfig } from '../types' - -export default function autoMergeLevel1( - inboundState: State, - originalState: State, - reducedState: State, - { debug }: PersistConfig -): State { - let newState = { ...reducedState } - // only rehydrate if inboundState exists and is an object - if (inboundState && typeof inboundState === 'object') { - Object.keys(inboundState).forEach(key => { - // ignore _persist data - if (key === '_persist') return - // if reducer modifies substate, skip auto rehydration - if (originalState[key] !== reducedState[key]) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - 'redux-persist/stateReconciler: sub state for key `%s` modified, skipping.', - key - ) - return - } - // otherwise hard set the new value - newState[key] = inboundState[key] - }) - } - - if ( - process.env.NODE_ENV !== 'production' && - debug && - inboundState && - typeof inboundState === 'object' - ) - console.log( - `redux-persist/stateReconciler: rehydrated keys '${Object.keys( - inboundState - ).join(', ')}'` - ) - - return newState -} diff --git a/node_modules/redux-persist/src/stateReconciler/autoMergeLevel2.js b/node_modules/redux-persist/src/stateReconciler/autoMergeLevel2.js deleted file mode 100644 index f451380..0000000 --- a/node_modules/redux-persist/src/stateReconciler/autoMergeLevel2.js +++ /dev/null @@ -1,60 +0,0 @@ -// @flow - -/* - autoMergeLevel2: - - merges 2 level of substate - - skips substate if already modified - - this is essentially redux-perist v4 behavior -*/ - -import type { PersistConfig } from '../types' - -export default function autoMergeLevel2( - inboundState: State, - originalState: State, - reducedState: State, - { debug }: PersistConfig -): State { - let newState = { ...reducedState } - // only rehydrate if inboundState exists and is an object - if (inboundState && typeof inboundState === 'object') { - Object.keys(inboundState).forEach(key => { - // ignore _persist data - if (key === '_persist') return - // if reducer modifies substate, skip auto rehydration - if (originalState[key] !== reducedState[key]) { - if (process.env.NODE_ENV !== 'production' && debug) - console.log( - 'redux-persist/stateReconciler: sub state for key `%s` modified, skipping.', - key - ) - return - } - if (isPlainEnoughObject(reducedState[key])) { - // if object is plain enough shallow merge the new values (hence "Level2") - newState[key] = { ...newState[key], ...inboundState[key] } - return - } - // otherwise hard set - newState[key] = inboundState[key] - }) - } - - if ( - process.env.NODE_ENV !== 'production' && - debug && - inboundState && - typeof inboundState === 'object' - ) - console.log( - `redux-persist/stateReconciler: rehydrated keys '${Object.keys( - inboundState - ).join(', ')}'` - ) - - return newState -} - -function isPlainEnoughObject(o) { - return o !== null && !Array.isArray(o) && typeof o === 'object' -} diff --git a/node_modules/redux-persist/src/stateReconciler/hardSet.js b/node_modules/redux-persist/src/stateReconciler/hardSet.js deleted file mode 100644 index 1f5fcda..0000000 --- a/node_modules/redux-persist/src/stateReconciler/hardSet.js +++ /dev/null @@ -1,10 +0,0 @@ -// @flow - -/* - hardSet: - - hard set incoming state -*/ - -export default function hardSet(inboundState: State): State { - return inboundState -} diff --git a/node_modules/redux-persist/src/storage/createWebStorage.js b/node_modules/redux-persist/src/storage/createWebStorage.js deleted file mode 100644 index b77132c..0000000 --- a/node_modules/redux-persist/src/storage/createWebStorage.js +++ /dev/null @@ -1,23 +0,0 @@ -// @flow -import getStorage from './getStorage' - -export default function createWebStorage(type: string) { - let storage = getStorage(type) - return { - getItem: (key: string): Promise => { - return new Promise((resolve, reject) => { - resolve(storage.getItem(key)) - }) - }, - setItem: (key: string, item: string): Promise => { - return new Promise((resolve, reject) => { - resolve(storage.setItem(key, item)) - }) - }, - removeItem: (key: string): Promise => { - return new Promise((resolve, reject) => { - resolve(storage.removeItem(key)) - }) - }, - } -} diff --git a/node_modules/redux-persist/src/storage/getStorage.js b/node_modules/redux-persist/src/storage/getStorage.js deleted file mode 100644 index a6b8e60..0000000 --- a/node_modules/redux-persist/src/storage/getStorage.js +++ /dev/null @@ -1,44 +0,0 @@ -// @flow - -import type { Storage } from '../types' - -function noop() {} -let noopStorage = { - getItem: noop, - setItem: noop, - removeItem: noop, -} - -function hasStorage(storageType) { - if (typeof window !== 'object' || !(storageType in window)) { - return false - } - - try { - let storage = window[storageType] - const testKey = `redux-persist ${storageType} test` - storage.setItem(testKey, 'test') - storage.getItem(testKey) - storage.removeItem(testKey) - } catch (e) { - if (process.env.NODE_ENV !== 'production') - console.warn( - `redux-persist ${storageType} test failed, persistence will be disabled.` - ) - return false - } - return true -} - -export default function getStorage(type: string): Storage { - const storageType = `${type}Storage` - if (hasStorage(storageType)) return window[storageType] - else { - if (process.env.NODE_ENV !== 'production') { - console.error( - `redux-persist failed to create sync storage. falling back to memory storage.` - ) - } - return noopStorage - } -} diff --git a/node_modules/redux-persist/src/storage/index.js b/node_modules/redux-persist/src/storage/index.js deleted file mode 100644 index 0532b1f..0000000 --- a/node_modules/redux-persist/src/storage/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// @flow - -import createWebStorage from './createWebStorage' - -export default createWebStorage('local') diff --git a/node_modules/redux-persist/src/storage/index.native.js b/node_modules/redux-persist/src/storage/index.native.js deleted file mode 100644 index 641e10f..0000000 --- a/node_modules/redux-persist/src/storage/index.native.js +++ /dev/null @@ -1,6 +0,0 @@ -// @noflow -/* eslint-disable */ - -import { AsyncStorage } from 'react-native' - -export default AsyncStorage diff --git a/node_modules/redux-persist/src/storage/session.js b/node_modules/redux-persist/src/storage/session.js deleted file mode 100644 index 1bb16d6..0000000 --- a/node_modules/redux-persist/src/storage/session.js +++ /dev/null @@ -1,5 +0,0 @@ -// @flow - -import createWebStorage from './createWebStorage' - -export default createWebStorage('session') diff --git a/node_modules/redux-persist/src/types.js b/node_modules/redux-persist/src/types.js deleted file mode 100644 index 2873bdb..0000000 --- a/node_modules/redux-persist/src/types.js +++ /dev/null @@ -1,82 +0,0 @@ -// @flow - -export type PersistState = { - version: number, - rehydrated: boolean, -} - -export type PersistedState = { - _persist: PersistState, -} | void - -export type PersistConfig = { - version?: number, - storage: Object, - key: string, - keyPrefix?: string, // @TODO remove in v6 - blacklist?: Array, - whitelist?: Array, - transforms?: Array, - throttle?: number, - migrate?: (PersistedState, number) => Promise, - stateReconciler?: false | Function, - getStoredState?: PersistConfig => Promise, // used for migrations - debug?: boolean, - serialize?: boolean, -} - -export type PersistorOptions = { - enhancer?: Function, -} - -export type Storage = { - getItem: (string, ?(string) => any) => any, - setItem: (string, string, ?() => any) => any, - removeItem: (string, ?() => any) => any, -} - -export type MigrationManifest = { - [number | string]: (PersistedState) => PersistedState, -} - -export type Transform = { - in: (Object | string, string) => Object, - out: (Object | string, string) => Object, - config?: PersistConfig, -} - -export type RehydrateErrorType = any - -export type RehydrateAction = { - type: 'redux-persist/REHYDRATE', - key: string, - payload: ?Object, - err: ?RehydrateErrorType, -} - -export type Persistoid = { - update: Object => void, - flush: () => Promise, -} - -type RegisterAction = { - type: 'redux-persist/REGISTER', - key: string, -} - -type PersistorAction = RehydrateAction | RegisterAction - -type PersistorState = { - registry: Array, - bootstrapped: boolean, -} - -type PersistorSubscribeCallback = () => any - -export type Persistor = { - purge: () => Promise, - flush: () => Promise, - +dispatch: PersistorAction => PersistorAction, - +getState: () => PersistorState, - +subscribe: PersistorSubscribeCallback => () => any, -} diff --git a/node_modules/redux-persist/src/utils/curry.js b/node_modules/redux-persist/src/utils/curry.js deleted file mode 100644 index b55b1a8..0000000 --- a/node_modules/redux-persist/src/utils/curry.js +++ /dev/null @@ -1,28 +0,0 @@ -// // @flow -// // credit @gcanti, taken from https://github.com/gcanti/flow-static-land/blob/e36cd55b8f8541e81828ec39964bdb6f5ccbec91/src/Fun.js - -// export type Fn1 = (a: A, ...rest: Array) => B -// export type Fn2 = (a: A, b: B, ...rest: Array) => C -// export type Fn3 = (a: A, b: B, c: C, ...rest: Array) => D - -// export type CurriedFn2 = Fn1> & Fn2 -// export type CurriedFn3 = Fn1> & -// Fn2> & -// Fn3 - -// declare function curry(f: Fn2): CurriedFn2 // eslint-disable-line no-redeclare -// declare function curry(f: Fn3): CurriedFn3 // eslint-disable-line no-redeclare - -// declare function curried(f, length, acc) { -// return function() { -// const combined = acc.concat(Array.prototype.slice.call(arguments)) -// return combined.length >= length -// ? f.apply(this, combined) -// : curried(f, length, combined) -// } -// } - -// export function curry(f: Function) { -// // eslint-disable-line no-redeclare -// return curried(f, f.length, []) -// } diff --git a/node_modules/redux/CHANGELOG.md b/node_modules/redux/CHANGELOG.md deleted file mode 100644 index 7988926..0000000 --- a/node_modules/redux/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -# Change Log - -This project adheres to [Semantic Versioning](http://semver.org/). -Every release, along with the migration instructions, is documented on the Github [Releases](https://github.com/reactjs/redux/releases) page. diff --git a/node_modules/redux/LICENSE.md b/node_modules/redux/LICENSE.md deleted file mode 100644 index 55bc8df..0000000 --- a/node_modules/redux/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-present Dan Abramov - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/redux/README.md b/node_modules/redux/README.md deleted file mode 100644 index 54480c8..0000000 --- a/node_modules/redux/README.md +++ /dev/null @@ -1,235 +0,0 @@ -# - -Redux is a predictable state container for JavaScript apps. -(If you're looking for a WordPress framework, check out [Redux Framework](https://reduxframework.com/).) - -It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as [live code editing combined with a time traveling debugger](https://github.com/gaearon/redux-devtools). - -You can use Redux together with [React](https://facebook.github.io/react/), or with any other view library. -It is tiny (2kB, including dependencies). - -[![build status](https://img.shields.io/travis/reactjs/redux/master.svg?style=flat-square)](https://travis-ci.org/reactjs/redux) -[![npm version](https://img.shields.io/npm/v/redux.svg?style=flat-square)](https://www.npmjs.com/package/redux) -[![npm downloads](https://img.shields.io/npm/dm/redux.svg?style=flat-square)](https://www.npmjs.com/package/redux) -[![redux channel on discord](https://img.shields.io/badge/discord-%23redux%20%40%20reactiflux-61dafb.svg?style=flat-square)](https://discord.gg/0ZcbPKXt5bZ6au5t) -[![#rackt on freenode](https://img.shields.io/badge/irc-%23rackt%20%40%20freenode-61DAFB.svg?style=flat-square)](https://webchat.freenode.net/) -[![Changelog #187](https://img.shields.io/badge/changelog-%23187-lightgrey.svg?style=flat-square)](https://changelog.com/187) - ->**Learn Redux from its creator:** ->**[Part 1: Getting Started with Redux](https://egghead.io/series/getting-started-with-redux) (30 free videos)**
->**[Part 2: Building React Applications with Idiomatic Redux](https://egghead.io/courses/building-react-applications-with-idiomatic-redux) (27 free videos)** - -### Testimonials - ->[“Love what you're doing with Redux”](https://twitter.com/jingc/status/616608251463909376) ->Jing Chen, creator of Flux - ->[“I asked for comments on Redux in FB's internal JS discussion group, and it was universally praised. Really awesome work.”](https://twitter.com/fisherwebdev/status/616286955693682688) ->Bill Fisher, author of Flux documentation - ->[“It's cool that you are inventing a better Flux by not doing Flux at all.”](https://twitter.com/andrestaltz/status/616271392930201604) ->André Staltz, creator of Cycle - -### Before Proceeding Further - ->**Also read:** ->**[You Might Not Need Redux](https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367)** - -### Developer Experience - -I wrote Redux while working on my React Europe talk called [“Hot Reloading with Time Travel”](https://www.youtube.com/watch?v=xsSnOQynTHs). My goal was to create a state management library with minimal API but completely predictable behavior, so it is possible to implement logging, hot reloading, time travel, universal apps, record and replay, without any buy-in from the developer. - -### Influences - -Redux evolves the ideas of [Flux](http://facebook.github.io/flux/), but avoids its complexity by taking cues from [Elm](https://github.com/evancz/elm-architecture-tutorial/). -Whether you have used them or not, Redux only takes a few minutes to get started with. - -### Installation - -To install the stable version: - -``` -npm install --save redux -``` - -This assumes you are using [npm](https://www.npmjs.com/) as your package manager. - -If you're not, you can [access these files on unpkg](https://unpkg.com/redux/), download them, or point your package manager to them. - -Most commonly people consume Redux as a collection of [CommonJS](http://webpack.github.io/docs/commonjs.html) modules. These modules are what you get when you import `redux` in a [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/), or a Node environment. If you like to live on the edge and use [Rollup](http://rollupjs.org), we support that as well. - -If you don't use a module bundler, it's also fine. The `redux` npm package includes precompiled production and development [UMD](https://github.com/umdjs/umd) builds in the [`dist` folder](https://unpkg.com/redux/dist/). They can be used directly without a bundler and are thus compatible with many popular JavaScript module loaders and environments. For example, you can drop a UMD build as a [`