aboutsummaryrefslogtreecommitdiff
path: root/node_modules/core-js/features/instance/code-points.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/core-js/features/instance/code-points.js')
-rw-r--r--node_modules/core-js/features/instance/code-points.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/core-js/features/instance/code-points.js b/node_modules/core-js/features/instance/code-points.js
new file mode 100644
index 0000000..6437299
--- /dev/null
+++ b/node_modules/core-js/features/instance/code-points.js
@@ -0,0 +1,9 @@
+var codePoints = require('../string/virtual/code-points');
+
+var StringPrototype = String.prototype;
+
+module.exports = function (it) {
+ var own = it.codePoints;
+ return typeof it === 'string' || it === StringPrototype
+ || (it instanceof String && own === StringPrototype.codePoints) ? codePoints : own;
+};