Socket
Socket
Sign inDemoInstall

convict

Package Overview
Dependencies
Maintainers
7
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convict - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

.travis.yml

1

lib/convict.js

@@ -257,2 +257,3 @@ /*

case 'port':
case 'nat':
case 'integer':

@@ -259,0 +260,0 @@ case 'int': v = parseInt(v, 10); break;

23

package.json

@@ -5,7 +5,7 @@ {

"description": "Unruly configuration management for nodejs",
"version": "0.4.1",
"homepage": "https://github.com/lloyd/node-convict",
"version": "0.4.2",
"homepage": "https://github.com/mozilla/node-convict",
"repository": {
"type": "git",
"url": "https://github.com/lloyd/node-convict.git"
"url": "https://github.com/mozilla/node-convict.git"
},

@@ -17,15 +17,20 @@ "main": "lib/convict.js",

"dependencies": {
"cjson": "0.2.1",
"validator": "0.4.24",
"moment": "1.7.2",
"optimist": "0.5.0"
"cjson": "0.3.0",
"validator": "1.5.1",
"moment": "2.3.1",
"optimist": "0.6.0"
},
"devDependencies": {
"obj_diff": "0.3.0",
"should": "1.2.2",
"mocha": "1.8.1"
"should": "2.0.1",
"mocha": "1.13.0"
},
"scripts": {
"test": "mocha -R spec"
},
"bugs": "https://github.com/mozilla/node-convict/issues",
"licenses": {
"type": "Apache",
"url": "https://raw.github.com/mozilla/node-convict/master/LICENSE"
}
}

@@ -1,3 +0,6 @@

# node-convict
# node-convict [!['Build status'][travis_image_url]][travis_page_url]
[travis_image_url]: https://api.travis-ci.org/mozilla/node-convict.png
[travis_page_url]: https://travis-ci.org/mozilla/node-convict
Convict expands on the standard pattern of configuring node.js applications in a way that is more robust and accessible to collaborators, who may have less interest in digging through imperative code in order to inspect or modify settings. By introducting a configuration schema, convict gives project collaborators more **context** on each setting and enables **validation and early failures** for when configuration goes wrong.

@@ -4,0 +7,0 @@

@@ -12,2 +12,7 @@ exports.conf = {

},
nat: {
default: 333,
format: 'nat',
env: "NAT"
},
num: {

@@ -33,2 +38,3 @@ default: 10.1,

INT: 77,
NAT: 666,
NUM: 789.1011,

@@ -35,0 +41,0 @@ ARRAY: "a,b,c",

@@ -112,3 +112,3 @@ const should = require('should');

var val = conf.get('foo.date');
should.equal(val, 1367737200000);
should.equal(val, new Date('May 5, 2013').getTime());
});

@@ -115,0 +115,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc