Socket
Socket
Sign inDemoInstall

npm-package-arg

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-package-arg - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

6

npa.js

@@ -49,3 +49,4 @@ var url = require("url")

res.name = (nameparse[1] || "") + nameparse[3]
res.scope = nameparse[2] || null
if (nameparse[2])
res.scope = "@" + nameparse[2]
arg = arg.substr(nameparse[0].length)

@@ -104,3 +105,4 @@ } else {

res.name = arg
res.scope = p[1] || null
if (p[1])
res.scope = "@" + p[1]
} else {

@@ -107,0 +109,0 @@ parseLocal(res, arg)

{
"name": "npm-package-arg",
"version": "1.1.0",
"version": "2.0.0",
"description": "Parse the things that can be arguments to `npm install`",

@@ -5,0 +5,0 @@ "main": "npa.js",

@@ -53,1 +53,4 @@ # npm-package-arg

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
scope is `null`.

@@ -19,3 +19,3 @@ var npa = require("../npa.js")

name: "@foo/bar",
scope: "foo",
scope: "@foo",
rawSpec: "",

@@ -29,3 +29,3 @@ spec: "*",

name: "@foo/bar",
scope: "foo",
scope: "@foo",
rawSpec: "",

@@ -39,3 +39,3 @@ spec: "*",

name: "@foo/bar",
scope: "foo",
scope: "@foo",
rawSpec: "baz",

@@ -76,2 +76,10 @@ spec: "baz",

"@foo/bar@git+ssh://github.com/user/foo": {
name: "@foo/bar",
scope: "@foo",
spec: "ssh://github.com/user/foo",
rawSpec: "git+ssh://github.com/user/foo",
raw: "@foo/bar@git+ssh://github.com/user/foo"
},
"/path/to/foo": {

@@ -78,0 +86,0 @@ name: null,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc