Skip to content

Commit

Permalink
update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
austinvalle committed Jul 23, 2024
1 parent 32d444f commit 8656422
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18235,6 +18235,8 @@ const Range = __nccwpck_require__(9828)
/***/ 9828:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {

const SPACE_CHARACTERS = /\s+/g

// hoisted class for cyclic dependency
class Range {
constructor (range, options) {
Expand All @@ -18255,7 +18257,7 @@ class Range {
// just put it in the set and return
this.raw = range.value
this.set = [[range]]
this.format()
this.formatted = undefined
return this
}

Expand All @@ -18266,10 +18268,7 @@ class Range {
// First reduce all whitespace as much as possible so we do not have to rely
// on potentially slow regexes like \s*. This is then stored and used for
// future error messages as well.
this.raw = range
.trim()
.split(/\s+/)
.join(' ')
this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')

// First, split on ||
this.set = this.raw
Expand Down Expand Up @@ -18303,14 +18302,29 @@ class Range {
}
}

this.format()
this.formatted = undefined
}

get range () {
if (this.formatted === undefined) {
this.formatted = ''
for (let i = 0; i < this.set.length; i++) {
if (i > 0) {
this.formatted += '||'
}
const comps = this.set[i]
for (let k = 0; k < comps.length; k++) {
if (k > 0) {
this.formatted += ' '
}
this.formatted += comps[k].toString().trim()
}
}
}
return this.formatted
}

format () {
this.range = this.set
.map((comps) => comps.join(' ').trim())
.join('||')
.trim()
return this.range
}

Expand Down

0 comments on commit 8656422

Please sign in to comment.