aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es5-ext/string/from-code-point
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
commitcc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch)
tree92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/es5-ext/string/from-code-point
parent3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff)
remove node_modules
Diffstat (limited to 'node_modules/es5-ext/string/from-code-point')
-rw-r--r--node_modules/es5-ext/string/from-code-point/implement.js8
-rw-r--r--node_modules/es5-ext/string/from-code-point/index.js5
-rw-r--r--node_modules/es5-ext/string/from-code-point/is-implemented.js7
-rw-r--r--node_modules/es5-ext/string/from-code-point/shim.js37
4 files changed, 0 insertions, 57 deletions
diff --git a/node_modules/es5-ext/string/from-code-point/implement.js b/node_modules/es5-ext/string/from-code-point/implement.js
deleted file mode 100644
index 4f815d6be..000000000
--- a/node_modules/es5-ext/string/from-code-point/implement.js
+++ /dev/null
@@ -1,8 +0,0 @@
-"use strict";
-
-if (!require("./is-implemented")()) {
- Object.defineProperty(String, "fromCodePoint", { value: require("./shim"),
- configurable: true,
-enumerable: false,
-writable: true });
-}
diff --git a/node_modules/es5-ext/string/from-code-point/index.js b/node_modules/es5-ext/string/from-code-point/index.js
deleted file mode 100644
index d5a811221..000000000
--- a/node_modules/es5-ext/string/from-code-point/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-"use strict";
-
-module.exports = require("./is-implemented")()
- ? String.fromCodePoint
- : require("./shim");
diff --git a/node_modules/es5-ext/string/from-code-point/is-implemented.js b/node_modules/es5-ext/string/from-code-point/is-implemented.js
deleted file mode 100644
index e6ccfa7fa..000000000
--- a/node_modules/es5-ext/string/from-code-point/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = function () {
- var fromCodePoint = String.fromCodePoint;
- if (typeof fromCodePoint !== "function") return false;
- return fromCodePoint(0x1D306, 0x61, 0x1D307) === "\ud834\udf06a\ud834\udf07";
-};
diff --git a/node_modules/es5-ext/string/from-code-point/shim.js b/node_modules/es5-ext/string/from-code-point/shim.js
deleted file mode 100644
index 55824f573..000000000
--- a/node_modules/es5-ext/string/from-code-point/shim.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// Based on:
-// http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/
-// and:
-// https://github.com/mathiasbynens/String.fromCodePoint/blob/master
-// /fromcodepoint.js
-
-"use strict";
-
-var floor = Math.floor, fromCharCode = String.fromCharCode;
-
-// eslint-disable-next-line no-unused-vars
-module.exports = function (codePoint1 /*, …codePoints*/) {
- var chars = [], length = arguments.length, i, codePoint, result = "";
- for (i = 0; i < length; ++i) {
- codePoint = Number(arguments[i]);
- if (
- !isFinite(codePoint) ||
- codePoint < 0 ||
- codePoint > 0x10ffff ||
- floor(codePoint) !== codePoint
- ) {
- throw new RangeError("Invalid code point " + codePoint);
- }
-
- if (codePoint < 0x10000) {
- chars.push(codePoint);
- } else {
- codePoint -= 0x10000;
- // eslint-disable-next-line no-bitwise
- chars.push((codePoint >> 10) + 0xd800, codePoint % 0x400 + 0xdc00);
- }
- if (i + 1 !== length && chars.length <= 0x4000) continue;
- result += fromCharCode.apply(null, chars);
- chars.length = 0;
- }
- return result;
-};