First upload version 0.0.1
This commit is contained in:
13
node_modules/env-var/lib/accessors/int-negative.js
generated
vendored
Normal file
13
node_modules/env-var/lib/accessors/int-negative.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict'
|
||||
|
||||
const asInt = require('./int')
|
||||
|
||||
module.exports = function asIntNegative (value) {
|
||||
const ret = asInt(value)
|
||||
|
||||
if (ret > 0) {
|
||||
throw new Error('should be a negative integer')
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
Reference in New Issue
Block a user