node-env-to-object:将环境变量映射到配置对象

时间:2021-05-01 11:56:45
【文件属性】:
文件名称:node-env-to-object:将环境变量映射到配置对象
文件大小:26KB
文件格式:ZIP
更新时间:2021-05-01 11:56:45
JavaScript 环境变量 将映射到配置对象。 安装 $ npm install env-to-object 用法 var env = require ( 'env-to-object' ) ; env(map [,options]) 将映射到配置object 。 var map = { 'NODE_ENV' : { 'keypath' : 'env' , 'type' : 'string' } , 'PORT' : { 'keypath' : 'server.port' , 'type' : 'number' } , 'SSL' : { 'keypath' : 'server.ssl' , 'type' : 'boolean' } , 'LOGLEVEL' : { 'keypath' : 'logger.level' , 'type' : 'string
【文件预览】:
node-env-to-object-master
----.travis.yml(141B)
----.jshintignore(118B)
----package.json(2KB)
----test()
--------test.validate.boolean.js(1KB)
--------test.js(4KB)
--------test.date.js(915B)
--------test.boolean.js(3KB)
--------test.number.js(1KB)
--------test.string.js(773B)
--------test.object.js(939B)
--------test.regexp.js(1KB)
--------test.integer.js(2KB)
--------test.error.js(999B)
--------test.validate.integer.js(2KB)
--------test.validate.js(2KB)
--------fixtures()
----LICENSE(1KB)
----TODO.md(10B)
----.npmignore(519B)
----examples()
--------index.js(921B)
--------env.json(498B)
----.gitignore(1KB)
----lib()
--------integer.js(863B)
--------object.js(588B)
--------index.js(2KB)
--------validate.integer.js(1KB)
--------error.js(631B)
--------number.js(527B)
--------validate.boolean.js(1004B)
--------date.js(530B)
--------boolean.js(1KB)
--------regexp.js(564B)
--------validate.js(1KB)
--------string.js(305B)
----Makefile(2KB)
----README.md(10KB)
----.jshintrc(1KB)
----.editorconfig(169B)
----.gitattributes(12B)

网友评论