[Pkg-javascript-commits] [node-deps-sort] 04/79: take options

Bastien Roucariès rouca at moszumanska.debian.org
Wed Sep 6 09:41:51 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-deps-sort.

commit 8b1960ef1e40c94171c69a6611af2e560b8baec0
Author: James Halliday <mail at substack.net>
Date:   Mon Jul 8 23:28:27 2013 -0700

    take options
---
 bin/cmd.js | 4 +++-
 index.js   | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/cmd.js b/bin/cmd.js
index 9ba249a..002e85e 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -1,7 +1,9 @@
 #!/usr/bin/env node
 
-var sort = require('../')();
+var argv = require('minimist')(process.argv.slice(2));
 var JSONStream = require('JSONStream');
+
+var sort = require('../')(argv);
 var parse = JSONStream.parse([ true ]);
 var stringify = JSONStream.stringify();
 
diff --git a/index.js b/index.js
index 346f663..cb4a9ad 100644
--- a/index.js
+++ b/index.js
@@ -1,6 +1,8 @@
 var through = require('through');
 
-module.exports = function () {
+module.exports = function (opts) {
+    if (!opts) opts = {};
+    
     var rows = [];
     return through(write, end);
     

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-deps-sort.git



More information about the Pkg-javascript-commits mailing list