npm and error messages

This commit is contained in:
2018-10-27 03:51:47 -05:00
parent 692ab70565
commit 025a403027
29601 changed files with 2759363 additions and 14 deletions
+17
View File
@@ -0,0 +1,17 @@
var bind = require('function-bind');
var has = bind.call(Function.call, Object.prototype.hasOwnProperty);
var $assign = Object.assign;
module.exports = function assign(target, source) {
if ($assign) {
return $assign(target, source);
}
for (var key in source) {
if (has(source, key)) {
target[key] = source[key];
}
}
return target;
};
+3
View File
@@ -0,0 +1,3 @@
var $isNaN = Number.isNaN || function (a) { return a !== a; };
module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; };
+3
View File
@@ -0,0 +1,3 @@
module.exports = Number.isNaN || function isNaN(a) {
return a !== a;
};
+3
View File
@@ -0,0 +1,3 @@
module.exports = function isPrimitive(value) {
return value === null || (typeof value !== 'function' && typeof value !== 'object');
};
+4
View File
@@ -0,0 +1,4 @@
module.exports = function mod(number, modulo) {
var remain = number % modulo;
return Math.floor(remain >= 0 ? remain : remain + modulo);
};
+3
View File
@@ -0,0 +1,3 @@
module.exports = function sign(number) {
return number >= 0 ? 1 : -1;
};