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