Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Undocumented npm view json switch #2992

squarism opened this Issue · 2 comments

2 participants


(At first I thought npm view was returning invalid json ...)
$ npm view ${anything}
Returns invalid JSON.

For example:
npm view connect dist
{ shasum: 'b869df9acf3dd8a0af7523c7c6f1aa8b4b761daa',
tarball: '' } says only double quoted strings are allowed. Is this supposed to be JSON or "jsdom output"? It might be valid.

Update: Ok nevermind, --json switch works but npm help view does not list it as an option.
npm view connect dist --json


It's a valid JS object literal. JSON is a rather strict subset of JS object literals (it stands for JavaScript Object Notation).


Ok @nathan7, thanks for the info. I left this issue open just for the undocumented --json switch.

@nathan7 nathan7 closed this in 2915f61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.