Socket
Socket
Sign inDemoInstall

snyk-module

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-module - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

test/benchmark.js

9

dist/index.js

@@ -23,2 +23,11 @@ "use strict";

let str = nameAndMaybeVersion;
// first, try the common case; there's no version, and it's a normal package name
if (!version) {
// foo, foo-bar, @foo/bar, com.example:test
// none of these can be URLs, or versions
const fastPath = /^(?:(?:[a-z-]+)|(?:@[a-z-]+\/[a-z-]+)|(?:[a-z-]+\.[.a-z-]+:[a-z-]+))$/;
if (fastPath.test(str)) {
return supported(str, { name: str, version: '*' }, options);
}
}
if (version && str.lastIndexOf('@') < 1) {

@@ -25,0 +34,0 @@ debug('appending version onto string');

@@ -39,2 +39,12 @@ const debug = require('debug')('snyk:module');

// first, try the common case; there's no version, and it's a normal package name
if (!version) {
// foo, foo-bar, @foo/bar, com.example:test
// none of these can be URLs, or versions
const fastPath = /^(?:(?:[a-z-]+)|(?:@[a-z-]+\/[a-z-]+)|(?:[a-z-]+\.[.a-z-]+:[a-z-]+))$/;
if (fastPath.test(str)) {
return supported(str, { name: str, version: '*' }, options);
}
}
if (version && str.lastIndexOf('@') < 1) {

@@ -41,0 +51,0 @@ debug('appending version onto string');

3

package.json

@@ -26,2 +26,3 @@ {

"@typescript-eslint/parser": "^1.13.0",
"benny": "^3.6.14",
"eslint": "^5.16.0",

@@ -40,3 +41,3 @@ "eslint-config-prettier": "^6.0.0",

},
"version": "2.0.2"
"version": "2.1.0"
}

Sorry, the diff of this file is not supported yet

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