Update of multiple frontend libs.

This commit is contained in:
baldo 2017-05-13 13:25:33 +02:00
parent de261dbde5
commit a9c6ddc03b
276 changed files with 41257 additions and 19300 deletions
app/bower_components/lodash/lib/fp/template

View file

@ -9,20 +9,19 @@ to produce immutable auto-curried iteratee-first data-last methods.
In a browser:
```html
<script src='path/to/lodash.js'></script>
<script src='path/to/lodash.fp.js'></script>
<script src='https://cdn.jsdelivr.net/g/lodash@4(lodash.min.js+lodash.fp.min.js)'></script>
<script>
// Loading `lodash.fp.js` converts `_` to its fp variant.
_.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
// → { 'a: 1, 'b': 2 }
// ➜ { 'a': 1, 'b': 2 }
// Use `noConflict` to restore the pre-fp variant.
var fp = _.noConflict();
_.defaults({ 'a': 1 }, { 'a': 2, 'b': 2 });
// → { 'a: 1, 'b': 2 }
// ➜ { 'a': 1, 'b': 2 }
fp.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
// → { 'a: 1, 'b': 2 }
// ➜ { 'a': 1, 'b': 2 }
</script>
```
@ -51,12 +50,12 @@ Iteratee arguments are capped to avoid gotchas with variadic iteratees.
// The `lodash/map` iteratee receives three arguments:
// (value, index|key, collection)
_.map(['6', '8', '10'], parseInt);
// [6, NaN, 2]
// [6, NaN, 2]
// The `lodash/fp/map` iteratee is capped at one argument:
// (value)
fp.map(parseInt)(['6', '8', '10']);
// [6, 8, 10]
// [6, 8, 10]
```
Methods that cap iteratees to one argument:<br>
@ -65,7 +64,7 @@ Methods that cap iteratees to one argument:<br>
Methods that cap iteratees to two arguments:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %>
The iteratee of `mapKeys` is invoked with one argument: (key)
The iteratee of `mapKeys` is capped to one argument: `(key)`
#### Fixed Arity
@ -73,13 +72,13 @@ Methods have fixed arities to support auto-currying.
```js
// `lodash/padStart` accepts an optional `chars` param.
_.padStart('a', 3, '-')
// '--a'
// '--a'
// `lodash/fp/padStart` does not.
fp.padStart(3)('a');
// ' a'
// ' a'
fp.padCharsStart('-')(3)('a');
// '--a'
// '--a'
```
Methods with a fixed arity of one:<br>
@ -102,13 +101,13 @@ Method arguments are rearranged to make composition easier.
// (collection, iteratee)
var compact = _.partial(_.filter, _, Boolean);
compact(['a', null, 'c']);
// ['a', 'c']
// ['a', 'c']
// `lodash/fp/filter` is iteratee-first data-last:
// (iteratee, collection)
var compact = fp.filter(Boolean);
compact(['a', null, 'c']);
// ['a', 'c']
// ['a', 'c']
```
##### Most methods follow these rules
@ -124,18 +123,20 @@ A fixed arity of four has an argument order of:<br>
##### Exceptions to the rules
Methods that accept an array of arguments as their second parameter:<br>
Methods that accept an array as their last or only argument:<br>
<%= toFuncList(_.keys(mapping.methodSpread)) %>
Methods with unchanged argument orders:<br>
<%= toFuncList(_.keys(mapping.skipRearg)) %>
Methods with custom argument orders:<br>
<%= _.map(_.keys(mapping.methodRearg), function(methodName) {
var orders = mapping.methodRearg[methodName];
<%= _.map(_.keys(mapping.methodRearg), methodName => {
const orders = mapping.methodRearg[methodName];
return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders);
}).join('\n') %>
The iteratee of `reduceRight` has an argument order of: `(b, a)`
#### New Methods
Not all variadic methods have corresponding new method variants. Feel free to
@ -148,8 +149,8 @@ Methods created to accommodate Lodashs variadic methods:<br>
#### Aliases
There are <%= _.size(mapping.aliasToReal) %> method aliases:<br>
<%= _.map(_.keys(mapping.aliasToReal).sort(), function(alias) {
var realName = mapping.aliasToReal[alias];
<%= _.map(_.keys(mapping.aliasToReal).sort(), alias => {
const realName = mapping.aliasToReal[alias];
return ' * `_.' + alias + '` is an alias of `_.' + realName + '`';
}).join('\n') %>
@ -161,11 +162,11 @@ arguments of the curried returned function.
```js
// The equivalent of `2 > 5`.
_.gt(2)(5);
// false
// false
// The equivalent of `_.gt(5, 2)` or `5 > 2`.
_.gt(_, 2)(5);
// true
// true
```
## Chaining

View file

@ -9,6 +9,6 @@ module.exports = {
'iteratee': require('../iteratee'),
'keys': require('../_baseKeys'),
'rearg': require('../rearg'),
'spread': require('../spread'),
'toInteger': require('../toInteger'),
'toPath': require('../toPath')
};

View file

@ -1,5 +1,5 @@
var convert = require('./convert'),
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
func = convert('<%= name %>', require('../<%= _.get(mapping.remap, name, name) %>'));
func.placeholder = require('./placeholder');
module.exports = func;

View file

@ -1,5 +1,5 @@
var convert = require('./convert'),
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), require('./_falseOptions'));
func = convert('<%= name %>', require('../<%= _.get(mapping.remap, name, name) %>'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;