Actualizacion de seguridad
This commit is contained in:
9
node_modules/fill-range/index.js
generated
vendored
9
node_modules/fill-range/index.js
generated
vendored
@@ -60,7 +60,7 @@ const toMaxLen = (input, maxLength) => {
|
||||
return negative ? ('-' + input) : input;
|
||||
};
|
||||
|
||||
const toSequence = (parts, options) => {
|
||||
const toSequence = (parts, options, maxLen) => {
|
||||
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
||||
parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
||||
|
||||
@@ -70,11 +70,11 @@ const toSequence = (parts, options) => {
|
||||
let result;
|
||||
|
||||
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('|')})`;
|
||||
}
|
||||
|
||||
if (positives && negatives) {
|
||||
@@ -172,7 +172,7 @@ const fillNumbers = (start, end, step = 1, options = {}) => {
|
||||
|
||||
if (options.toRegex === true) {
|
||||
return step > 1
|
||||
? toSequence(parts, options)
|
||||
? toSequence(parts, options, maxLen)
|
||||
: toRegex(range, null, { wrap: false, ...options });
|
||||
}
|
||||
|
||||
@@ -184,7 +184,6 @@ const fillLetters = (start, end, step = 1, options = {}) => {
|
||||
return invalidRange(start, end, options);
|
||||
}
|
||||
|
||||
|
||||
let format = options.transform || (val => String.fromCharCode(val));
|
||||
let a = `${start}`.charCodeAt(0);
|
||||
let b = `${end}`.charCodeAt(0);
|
||||
|
||||
Reference in New Issue
Block a user