aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es5-ext/string/#/code-point-at
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/#/code-point-at
parent3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff)
remove node_modules
Diffstat (limited to 'node_modules/es5-ext/string/#/code-point-at')
-rw-r--r--node_modules/es5-ext/string/#/code-point-at/implement.js9
-rw-r--r--node_modules/es5-ext/string/#/code-point-at/index.js5
-rw-r--r--node_modules/es5-ext/string/#/code-point-at/is-implemented.js8
-rw-r--r--node_modules/es5-ext/string/#/code-point-at/shim.js26
4 files changed, 0 insertions, 48 deletions
diff --git a/node_modules/es5-ext/string/#/code-point-at/implement.js b/node_modules/es5-ext/string/#/code-point-at/implement.js
deleted file mode 100644
index f1dc80a04..000000000
--- a/node_modules/es5-ext/string/#/code-point-at/implement.js
+++ /dev/null
@@ -1,9 +0,0 @@
-"use strict";
-
-if (!require("./is-implemented")()) {
- Object.defineProperty(String.prototype, "codePointAt",
- { value: require("./shim"),
-configurable: true,
-enumerable: false,
- writable: true });
-}
diff --git a/node_modules/es5-ext/string/#/code-point-at/index.js b/node_modules/es5-ext/string/#/code-point-at/index.js
deleted file mode 100644
index 33d45c9f2..000000000
--- a/node_modules/es5-ext/string/#/code-point-at/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-"use strict";
-
-module.exports = require("./is-implemented")()
- ? String.prototype.codePointAt
- : require("./shim");
diff --git a/node_modules/es5-ext/string/#/code-point-at/is-implemented.js b/node_modules/es5-ext/string/#/code-point-at/is-implemented.js
deleted file mode 100644
index 7da785f2c..000000000
--- a/node_modules/es5-ext/string/#/code-point-at/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-"use strict";
-
-var str = "abc\uD834\uDF06def";
-
-module.exports = function () {
- if (typeof str.codePointAt !== "function") return false;
- return str.codePointAt(3) === 0x1D306;
-};
diff --git a/node_modules/es5-ext/string/#/code-point-at/shim.js b/node_modules/es5-ext/string/#/code-point-at/shim.js
deleted file mode 100644
index 0f331c3f1..000000000
--- a/node_modules/es5-ext/string/#/code-point-at/shim.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// Based on: https://github.com/mathiasbynens/String.prototype.codePointAt
-// Thanks @mathiasbynens !
-
-"use strict";
-
-var toInteger = require("../../../number/to-integer")
- , validValue = require("../../../object/valid-value");
-
-module.exports = function (pos) {
- var str = String(validValue(this)), length = str.length, first, second;
- pos = toInteger(pos);
-
- // Account for out-of-bounds indices:
- if (pos < 0 || pos >= length) return undefined;
-
- // Get the first code unit
- first = str.charCodeAt(pos);
- if (first >= 0xd800 && first <= 0xdbff && length > pos + 1) {
- second = str.charCodeAt(pos + 1);
- if (second >= 0xdc00 && second <= 0xdfff) {
- // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
- return (first - 0xd800) * 0x400 + second - 0xdc00 + 0x10000;
- }
- }
- return first;
-};