summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh')
-rw-r--r--tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/implement.js6
-rw-r--r--tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/index.js5
-rw-r--r--tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/is-implemented.js7
-rw-r--r--tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/shim.js11
4 files changed, 29 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/implement.js
new file mode 100644
index 0000000000..f90d83056c
--- /dev/null
+++ b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'cosh', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/index.js
new file mode 100644
index 0000000000..000636ab77
--- /dev/null
+++ b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.cosh
+ : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/is-implemented.js
new file mode 100644
index 0000000000..c796bcbf31
--- /dev/null
+++ b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var cosh = Math.cosh;
+ if (typeof cosh !== 'function') return false;
+ return cosh(1) === 1.5430806348152437;
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/shim.js
new file mode 100644
index 0000000000..f9062bd976
--- /dev/null
+++ b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var exp = Math.exp;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x === 0) return 1;
+ if (!isFinite(x)) return Infinity;
+ return (exp(x) + exp(-x)) / 2;
+};