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

semver-extra

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semver-extra - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

7

index.js

@@ -8,3 +8,2 @@ 'use strict';

extra.isPrerelease = isPrerelease;
extra.isExplicit = isExplicit;
extra.max = max;

@@ -33,8 +32,2 @@ extra.maxStable = maxStable;

// Returns whether it is a explicit version
function isExplicit (version) {
var range = semver.validRange(version);
return range === version;
}
function arrayEqual (a, b) {

@@ -41,0 +34,0 @@ if (!util.isArray(a) || !util.isArray(b)) {

2

package.json
{
"name": "semver-extra",
"version": "1.0.4",
"version": "1.0.5",
"description": "semver-extra contains useful methods that aren't included in the vanilla semver package.",

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

@@ -53,13 +53,3 @@ # semver-extra [![NPM version](https://badge.fury.io/js/semver-extra.svg)](http://badge.fury.io/js/semver-extra) [![Build Status](https://travis-ci.org/kaelzhang/node-semver-extra.svg?branch=master)](https://travis-ci.org/kaelzhang/node-semver-extra) [![Dependency Status](https://gemnasium.com/kaelzhang/node-semver-extra.svg)](https://gemnasium.com/kaelzhang/node-semver-extra)

### semver.isExplicit(version)
```js
semver.isExplicit('1.0.0'); // true
semver.isExplicit('^1.1.0'); // false
```
Checks whehter the `version` is an explicit version, i.e. it is not a range.
```js
var versions = [

@@ -66,0 +56,0 @@ '1.1.2'

@@ -45,23 +45,2 @@ 'use strict';

describe("extra.isExplicit(version)", function(){
[
['1.2.3', true],
['1.2.3-beta', true],
['1.2.3-beta.1', true],
// invalid range
['abc', false],
['1.2', false],
['^1.2.3', false],
['>1.2.3 <1.3.0', false]
].forEach(function (c) {
var v = c[0];
var r = c[1];
it(v + ': ' + r, function(){
expect(extra.isExplicit(v)).to.equal(r);
});
});
});
describe("extra.max*()", function(){

@@ -68,0 +47,0 @@ var versions = [

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