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

parse-numeric-range

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-numeric-range - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

index.js

@@ -7,3 +7,3 @@ /**

let res = [], m
for (let str of string.split(',')) {
for (let str of string.split(',').map(str => str.trim())) {
// just a number

@@ -10,0 +10,0 @@ if (/^-?\d+$/.test(str)) {

{
"name": "parse-numeric-range",
"version": "1.0.0",
"version": "1.1.0",
"description": "Takes a string, such as \"1,2,3-10,5-8\" and turns it into an array of numbers",

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

@@ -55,3 +55,6 @@ import { expect } from 'chai'

});
it('should parse ranges with a space in between', function() {
peq('1-2, 3-4', [1,2,3,4]);
});
});
});

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