diff options
Diffstat (limited to 'deps/npm/node_modules/npm-package-arg/README.md')
-rw-r--r-- | deps/npm/node_modules/npm-package-arg/README.md | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/deps/npm/node_modules/npm-package-arg/README.md b/deps/npm/node_modules/npm-package-arg/README.md index 82968a4bef..9f4aee1c05 100644 --- a/deps/npm/node_modules/npm-package-arg/README.md +++ b/deps/npm/node_modules/npm-package-arg/README.md @@ -22,12 +22,13 @@ var parsed = npa("@bar/foo@1.2") // Returns an object like: { - raw: '@bar/foo@1.2', // what was passed in - name: "@bar/foo", // the name of the package - scope: "@bar", // the private scope of the package, or null - type: "range", // the type of specifier this is - spec: ">=1.2.0 <1.3.0" // the expanded specifier - rawSpec: "1.2" // the specifier as passed in + raw: '@bar/foo@1.2', // what was passed in + name: '@bar/foo', // the name of the package + escapedName: '@bar%2ffoo', // the escaped name, for making requests against a registry + scope: '@bar', // the scope of the package, or null + type: 'range', // the type of specifier this is + spec: '>=1.2.0 <1.3.0', // the expanded specifier + rawSpec: '1.2' // the specifier as passed in } // Parsing urls pointing at hosted git services produces a variation: @@ -38,6 +39,7 @@ var parsed = npa("git+https://github.com/user/foo") raw: 'git+https://github.com/user/foo', scope: null, name: null, + escapedName: null, rawSpec: 'git+https://github.com/user/foo', spec: 'user/foo', type: 'hosted', @@ -97,8 +99,11 @@ keys: * `rawSpec` - The part after the `name@...`, as it was originally provided. * `scope` - If a name is something like `@org/module` then the `scope` - field will be set to `org`. If it doesn't have a scoped name, then + field will be set to `@org`. If it doesn't have a scoped name, then scope is `null`. +* `escapedName` - A version of `name` escaped to match the npm scoped packages + specification. Mostly used when making requests against a registry. When + `name` is `null`, `escapedName` will also be `null`. If you only include a name and no specifier part, eg, `foo` or `foo@` then a default of `latest` will be used (as of 4.1.0). This is contrast with |