Socket
Socket
Sign inDemoInstall

core-js-compat

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core-js-compat - npm Package Compare versions

Comparing version 3.38.0 to 3.38.1

30

helpers.js

@@ -5,18 +5,22 @@ 'use strict';

const VERSION_PATTERN = /(\d+)(?:\.(\d+))?(?:\.(\d+))?/;
class SemVer {
constructor(input) {
const match = VERSION_PATTERN.exec(input);
if (!match) throw new TypeError(`Invalid version: ${ input }`);
const [, $major, $minor, $patch] = match;
this.major = +$major;
this.minor = $minor ? +$minor : 0;
this.patch = $patch ? +$patch : 0;
}
toString() {
return `${ this.major }.${ this.minor }.${ this.patch }`;
}
}
function semver(input) {
if (input instanceof semver) return input;
// eslint-disable-next-line new-cap -- ok
if (!(this instanceof semver)) return new semver(input);
const match = /(\d+)(?:\.(\d+))?(?:\.(\d+))?/.exec(input);
if (!match) throw new TypeError(`Invalid version: ${ input }`);
const [, $major, $minor, $patch] = match;
this.major = +$major;
this.minor = $minor ? +$minor : 0;
this.patch = $patch ? +$patch : 0;
return input instanceof SemVer ? input : new SemVer(input);
}
semver.prototype.toString = function () {
return `${ this.major }.${ this.minor }.${ this.patch }`;
};
function compare($a, operator, $b) {

@@ -23,0 +27,0 @@ const a = semver($a);

{
"name": "core-js-compat",
"version": "3.38.0",
"version": "3.38.1",
"type": "commonjs",

@@ -8,3 +8,3 @@ "description": "core-js compat",

"type": "git",
"url": "https://github.com/zloirock/core-js.git",
"url": "git+https://github.com/zloirock/core-js.git",
"directory": "packages/core-js-compat"

@@ -11,0 +11,0 @@ },

Sorry, the diff of this file is too big to display

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