Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
valid.js14 linesDownload Raw Back to ranges
1'use strict'
2
3const Range = require('../classes/range')
4const validRange = (range, options) => {
5  try {
6    // Return '*' instead of '' so that truthiness works.
7    // This will throw if it's invalid anyway
8    return new Range(range, options).range || '*'
9  } catch (er) {
10    return null
11  }
12}
13module.exports = validRange
14 
codekingpro/portable-devtools · Team Ai