Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

semver-parser

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semver-parser - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

6

index.js

@@ -40,10 +40,10 @@ /**

* @param {string} part - version part
* @param {boolean} [testInt] - test version part is integer before parseInt()
* @param {boolean} [nonPosInt] - accept non positive integer
* @returns {string|number} - parsed version part
*/
const parseVersionPart = (part, testInt = false) => {
const parseVersionPart = (part, nonPosInt = false) => {
if (!isString(part)) {
throw new TypeError(`Expected String but got ${getType(part)}.`);
}
if (!(testInt || REGEXP_INT.test(part))) {
if (!(nonPosInt || REGEXP_INT.test(part))) {
throw new Error(`${part} is not a stringified positive integer.`);

@@ -50,0 +50,0 @@ }

@@ -22,8 +22,8 @@ {

"chai": "^4.1.2",
"eslint": "^4.19.1",
"eslint": "^5.0.1",
"mocha": "^5.2.0",
"nyc": "^12.0.2",
"sinon": "^6.0.0"
"sinon": "^6.1.3"
},
"version": "2.0.2"
"version": "2.0.3"
}
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