From cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 27 Mar 2019 21:01:33 +0100 Subject: remove node_modules --- node_modules/es5-ext/math/hypot/implement.js | 8 ----- node_modules/es5-ext/math/hypot/index.js | 5 --- node_modules/es5-ext/math/hypot/is-implemented.js | 7 ---- node_modules/es5-ext/math/hypot/shim.js | 43 ----------------------- 4 files changed, 63 deletions(-) delete mode 100644 node_modules/es5-ext/math/hypot/implement.js delete mode 100644 node_modules/es5-ext/math/hypot/index.js delete mode 100644 node_modules/es5-ext/math/hypot/is-implemented.js delete mode 100644 node_modules/es5-ext/math/hypot/shim.js (limited to 'node_modules/es5-ext/math/hypot') diff --git a/node_modules/es5-ext/math/hypot/implement.js b/node_modules/es5-ext/math/hypot/implement.js deleted file mode 100644 index e2b3928b3..000000000 --- a/node_modules/es5-ext/math/hypot/implement.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "hypot", { value: require("./shim"), - configurable: true, -enumerable: false, -writable: true }); -} diff --git a/node_modules/es5-ext/math/hypot/index.js b/node_modules/es5-ext/math/hypot/index.js deleted file mode 100644 index a030a4198..000000000 --- a/node_modules/es5-ext/math/hypot/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() - ? Math.hypot - : require("./shim"); diff --git a/node_modules/es5-ext/math/hypot/is-implemented.js b/node_modules/es5-ext/math/hypot/is-implemented.js deleted file mode 100644 index d317bc7e5..000000000 --- a/node_modules/es5-ext/math/hypot/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var hypot = Math.hypot; - if (typeof hypot !== "function") return false; - return hypot(3, 4) === 5; -}; diff --git a/node_modules/es5-ext/math/hypot/shim.js b/node_modules/es5-ext/math/hypot/shim.js deleted file mode 100644 index 2a92b1715..000000000 --- a/node_modules/es5-ext/math/hypot/shim.js +++ /dev/null @@ -1,43 +0,0 @@ -// Thanks for hints: https://github.com/paulmillr/es6-shim - -"use strict"; - -var some = Array.prototype.some - , abs = Math.abs - , sqrt = Math.sqrt - , compare = function (val1, val2) { - return val2 - val1; -} - , divide = function (value) { - return value / this; -} - , add = function (sum, number) { - return sum + number * number; -}; - -// eslint-disable-next-line no-unused-vars -module.exports = function (val1, val2 /*, …valn*/) { - var result, numbers; - if (!arguments.length) return 0; - some.call(arguments, function (val) { - if (isNaN(val)) { - result = NaN; - return false; - } - if (!isFinite(val)) { - result = Infinity; - return true; - } - if (result !== undefined) return false; - val = Number(val); - if (val === 0) return false; - if (numbers) numbers.push(abs(val)); - else numbers = [abs(val)]; - return false; - }); - if (result !== undefined) return result; - if (!numbers) return 0; - - numbers.sort(compare); - return numbers[0] * sqrt(numbers.map(divide, numbers[0]).reduce(add, 0)); -}; -- cgit v1.2.3