$25 GRAYBYTE WORDPRESS FILE MANAGER $78

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/alt-nodejs18/root/usr/lib/node_modules/npm/node_modules.bundled/semver/ranges/

HOME
Current File : /opt/alt/alt-nodejs18/root/usr/lib/node_modules/npm/node_modules.bundled/semver/ranges//simplify.js
// given a set of versions and a range, create a "simplified" range
// that includes the same versions that the original range does
// If the original range is shorter than the simplified one, return that.
const satisfies = require('../functions/satisfies.js')
const compare = require('../functions/compare.js')
module.exports = (versions, range, options) => {
  const set = []
  let first = null
  let prev = null
  const v = versions.sort((a, b) => compare(a, b, options))
  for (const version of v) {
    const included = satisfies(version, range, options)
    if (included) {
      prev = version
      if (!first) {
        first = version
      }
    } else {
      if (prev) {
        set.push([first, prev])
      }
      prev = null
      first = null
    }
  }
  if (first) {
    set.push([first, null])
  }

  const ranges = []
  for (const [min, max] of set) {
    if (min === max) {
      ranges.push(min)
    } else if (!max && min === v[0]) {
      ranges.push('*')
    } else if (!max) {
      ranges.push(`>=${min}`)
    } else if (min === v[0]) {
      ranges.push(`<=${max}`)
    } else {
      ranges.push(`${min} - ${max}`)
    }
  }
  const simplified = ranges.join(' || ')
  const original = typeof range.raw === 'string' ? range.raw : String(range)
  return simplified.length < original.length ? simplified : range
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
14 Aug 2025 9.29 PM
root / root
0755
gtr.js
0.212 KB
5 Jun 2025 6.30 PM
root / root
0644
intersects.js
0.205 KB
5 Jun 2025 6.30 PM
root / root
0644
ltr.js
0.208 KB
5 Jun 2025 6.30 PM
root / root
0644
max-satisfying.js
0.565 KB
5 Jun 2025 6.30 PM
root / root
0644
min-satisfying.js
0.563 KB
5 Jun 2025 6.30 PM
root / root
0644
min-version.js
1.465 KB
5 Jun 2025 6.30 PM
root / root
0644
outside.js
2.139 KB
5 Jun 2025 6.30 PM
root / root
0644
simplify.js
1.31 KB
5 Jun 2025 6.30 PM
root / root
0644
subset.js
7.334 KB
5 Jun 2025 6.30 PM
root / root
0644
to-comparators.js
0.262 KB
5 Jun 2025 6.30 PM
root / root
0644
valid.js
0.305 KB
5 Jun 2025 6.30 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF