Files
airllm-fork-nodejs/node_modules/env-var/lib/accessors/int-positive.js
2026-02-05 15:27:49 +08:00

14 lines
213 B
JavaScript

'use strict'
const asInt = require('./int')
module.exports = function asIntPositive (value) {
const ret = asInt(value)
if (ret < 0) {
throw new Error('should be a positive integer')
}
return ret
}