function msOption (name, value) { const n = typeof value === 'number' ? value : parseMs(value) if (!Number.isInteger(n)) { throw new Error('The "' + name + '" option must be an integer, optionally with a unit (e.g. "50ms")') } if (n <= 0) throw new Error('The "' + name + '" option must be > 0 milliseconds') return n }