[Pkg-javascript-commits] [node-deps-sort] 06/79: document opts.index

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 10a788163da5209a180a2f12fe67529d53554440
Author: James Halliday <mail at substack.net>
Date:   Mon Jul 8 23:35:55 2013 -0700

    document opts.index
---
 readme.markdown | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/readme.markdown b/readme.markdown
index 5933bb5..c3fe9c3 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -47,12 +47,18 @@ process.stdin.pipe(parse).pipe(sort).pipe(stringify).pipe(process.stdout);
 var depsSort = require('deps-sort');
 ```
 
-## var stream = depsSort()
+## var stream = depsSort(opts)
 
 Return a new through `stream` that should get written
 [module-deps](https://npmjs.org/package/module-deps) objects and will output
 sorted objects.
 
+`opts` can be:
+
+* `opts.index` - when true, for each module-deps row, insert `row.index` with
+the numeric index and `row.indexDeps` like `row.deps` but mapping require
+strings to row indices
+
 # install
 
 With [npm](https://npmjs.org) do:

-- 
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