aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es5-ext/array/#/separate.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es5-ext/array/#/separate.js')
-rw-r--r--node_modules/es5-ext/array/#/separate.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/node_modules/es5-ext/array/#/separate.js b/node_modules/es5-ext/array/#/separate.js
new file mode 100644
index 000000000..35e1cc5ac
--- /dev/null
+++ b/node_modules/es5-ext/array/#/separate.js
@@ -0,0 +1,12 @@
+"use strict";
+
+var forEach = Array.prototype.forEach;
+
+module.exports = function (sep) {
+ var result = [];
+ forEach.call(this, function (val) {
+ result.push(val, sep);
+ });
+ result.pop();
+ return result;
+};