mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 18:29:39 +02:00
Also check the lang in case insensitive
This commit is contained in:
parent
33e7f7384e
commit
2a9630258f
22658 changed files with 3562773 additions and 3562767 deletions
70
node_modules/lodash/_createRound.js
generated
vendored
70
node_modules/lodash/_createRound.js
generated
vendored
|
@ -1,35 +1,35 @@
|
|||
var root = require('./_root'),
|
||||
toInteger = require('./toInteger'),
|
||||
toNumber = require('./toNumber'),
|
||||
toString = require('./toString');
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeIsFinite = root.isFinite,
|
||||
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 && nativeIsFinite(number)) {
|
||||
// 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);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = createRound;
|
||||
var root = require('./_root'),
|
||||
toInteger = require('./toInteger'),
|
||||
toNumber = require('./toNumber'),
|
||||
toString = require('./toString');
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeIsFinite = root.isFinite,
|
||||
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 && nativeIsFinite(number)) {
|
||||
// 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);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = createRound;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue