Socket
Socket
Sign inDemoInstall

fill-range

Package Overview
Dependencies
2
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.1 to 7.1.1

9

index.js

@@ -63,3 +63,3 @@ /*!

const toSequence = (parts, options) => {
const toSequence = (parts, options, maxLen) => {
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);

@@ -74,7 +74,7 @@ parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);

if (parts.positives.length) {
positives = parts.positives.join('|');
positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|');
}
if (parts.negatives.length) {
negatives = `-(${prefix}${parts.negatives.join('|')})`;
negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`;
}

@@ -177,3 +177,3 @@

return step > 1
? toSequence(parts, options)
? toSequence(parts, options, maxLen)
: toRegex(range, null, { wrap: false, ...options });

@@ -190,3 +190,2 @@ }

let format = options.transform || (val => String.fromCharCode(val));

@@ -193,0 +192,0 @@ let a = `${start}`.charCodeAt(0);

{
"name": "fill-range",
"description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`",
"version": "7.0.1",
"version": "7.1.1",
"homepage": "https://github.com/jonschlinkert/fill-range",

@@ -27,3 +27,7 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"scripts": {
"test": "mocha"
"lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
"mocha": "mocha --reporter dot",
"test": "npm run lint && npm run mocha",
"test:ci": "npm run test:cover",
"test:cover": "nyc npm run mocha"
},

@@ -35,3 +39,4 @@ "dependencies": {

"gulp-format-md": "^2.0.0",
"mocha": "^6.1.1"
"mocha": "^6.1.1",
"nyc": "^15.1.0"
},

@@ -38,0 +43,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc