[Pkg-javascript-commits] [node-shell-quote] 127/137: Do not use array-reduce
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 25 19:19:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-shell-quote.
commit 1e417965b13b97712c6c559338b32ec5e3efbed5
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Mon Aug 21 14:03:04 2017 +0200
Do not use array-reduce
This is not needed for nodejs (>= 6)
Forwarded: no
---
index.js | 4 +++-
package.json | 3 +--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/index.js b/index.js
index 241f492..d632b0a 100644
--- a/index.js
+++ b/index.js
@@ -1,7 +1,9 @@
var json = typeof JSON !== undefined ? JSON : require('jsonify');
var map = function(a,f) { return a.map(f); };
var filter = function(a,f) { return a.filter(f) ; };
-var reduce = require('array-reduce');
+var reduce = function(xs,f,acc) {
+ return arguments.length >= 3 ? xs.reduce(f,acc) : xs.reduce(f);
+};
exports.quote = function (xs) {
return map(xs, function (s) {
diff --git a/package.json b/package.json
index 6b8839d..6f9920f 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,6 @@
},
"license": "MIT",
"dependencies": {
- "jsonify": "~0.0.0",
- "array-reduce": "~0.0.0"
+ "jsonify": "~0.0.0"
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-shell-quote.git
More information about the Pkg-javascript-commits
mailing list