First upload version 0.0.1
This commit is contained in:
9
node_modules/env-var/lib/accessors/json.js
generated
vendored
Normal file
9
node_modules/env-var/lib/accessors/json.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = function asJson (value) {
|
||||
try {
|
||||
return JSON.parse(value)
|
||||
} catch (e) {
|
||||
throw new Error('should be valid (parseable) JSON')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user