First upload version 0.0.1
This commit is contained in:
13
node_modules/env-var/lib/accessors/int-positive.js
generated
vendored
Normal file
13
node_modules/env-var/lib/accessors/int-positive.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'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
|
||||
}
|
||||
Reference in New Issue
Block a user