mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-06-08 08:14:57 +00:00
14 lines
326 B
JavaScript
14 lines
326 B
JavaScript
'use strict'
|
|
|
|
const Range = require('../classes/range')
|
|
const validRange = (range, options) => {
|
|
try {
|
|
// Return '*' instead of '' so that truthiness works.
|
|
// This will throw if it's invalid anyway
|
|
return new Range(range, options).range || '*'
|
|
} catch (er) {
|
|
return null
|
|
}
|
|
}
|
|
module.exports = validRange
|