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