Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

2conf

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

2conf - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

config/default.json

10

CHANGELOG.md

@@ -1,3 +0,11 @@

# 2pid changelog
# 2conf changelog
## [1.0.1](link/1.0.1) (2016-06-22)
[Full Changelog](/compare/1.0.0...1.0.1)
**What Was Done:**
- add check config files for exists
- updated config examples
## [1.0.0](link/1.0.0) (2016-06-17)

@@ -4,0 +12,0 @@ [Full Changelog](/compare/master...1.0.0)

9

lib/config.js

@@ -27,5 +27,10 @@ /*!

var config = JSON.parse(fs.readFileSync('./config/'+env+'.json', 'utf8'));
try {
var configFile = './config/'+env+'.json';
fs.accessSync(configFile, fs.F_OK);
return JSON.parse(fs.readFileSync(configFile, 'utf8'));
} catch (e) {
return {};
}
return config;
}
{
"name": "2conf",
"version": "1.0.0",
"description": "Config",
"version": "1.0.1",
"description": "Simple config",
"main": "index.js",

@@ -22,3 +22,9 @@ "dependencies": {

"keywords": [
"Config"
"config",
"simple",
"simpleness",
"2conf",
"toconf",
"to conf",
"to congigurate"
],

@@ -25,0 +31,0 @@ "author": {

# Config
v.1.0.0
v.1.0.1

@@ -5,0 +5,0 @@ ## Install

@@ -17,17 +17,7 @@ var expect = require('chai').expect;

it('ports config', function(done) {
config.should.have.property('PORTS');
config.PORTS.should.have.property('login');
expect(config.PORTS.login).to.be.above(0);
config.should.have.property('port');
expect(config.port).to.be.above(0);
done();
});
it('login config', function(done) {
config.should.have.property('login');
config.login.should.have.property('TOKEN');
config.login.TOKEN.should.have.property('secret');
config.login.TOKEN.should.have.property('expire');
expect(config.login.TOKEN.expire).to.be.above(0);
done();
});
it('log config', function(done) {

@@ -49,17 +39,7 @@ config.should.have.property('log');

it('ports config', function(done) {
config.should.have.property('PORTS');
config.PORTS.should.have.property('login');
expect(config.PORTS.login).to.be.above(0);
config.should.have.property('port');
expect(config.port).to.be.above(0);
done();
});
it('login config', function(done) {
config.should.have.property('login');
config.login.should.have.property('TOKEN');
config.login.TOKEN.should.have.property('secret');
config.login.TOKEN.should.have.property('expire');
expect(config.login.TOKEN.expire).to.be.above(0);
done();
});
it('log config', function(done) {

@@ -66,0 +46,0 @@ config.should.have.property('log');

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