Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/ls.js
diff options
context:
space:
mode:
authorZac <zdoege@gm.slc.edu>2016-03-04 04:31:22 +0300
committerRebecca Turner <me@re-becca.org>2016-03-11 01:38:12 +0300
commit611070f0f7a1e185c75cadae46179194084b398f (patch)
treebf6dc7293fe64c9d82d21759b8d67acf325f8820 /lib/ls.js
parentff9038227a1976b5e936442716d9877f43c6c9b4 (diff)
ls: Made `npm ls --parseable` honor the `depth` option
Credit: @zacdoe Reviewed-By: @iarna PR-URL: https://github.com/npm/npm/pull/11773 Fixes: #11495
Diffstat (limited to 'lib/ls.js')
-rw-r--r--lib/ls.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ls.js b/lib/ls.js
index 8be186fdb..b5dc44888 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -434,7 +434,7 @@ function getExtras (data) {
function makeParseable (data, long, dir, depth, parent, d) {
depth = depth || 0
-
+ if (depth > npm.config.get('depth')) return [ makeParseable_(data, long, dir, depth, parent, d) ]
return [ makeParseable_(data, long, dir, depth, parent, d) ]
.concat(Object.keys(data.dependencies || {})
.sort(alphasort).map(function (d) {