blob: 365f35689d358b34637f1710b25002c9f7a6feb2 [file] [log] [blame]
Alex Rudenkod04dd452024-02-27 08:25:351const Range = require('../classes/range')
2const validRange = (range, options) => {
3 try {
4 // Return '*' instead of '' so that truthiness works.
5 // This will throw if it's invalid anyway
6 return new Range(range, options).range || '*'
7 } catch (er) {
8 return null
9 }
10}
11module.exports = validRange