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

confme

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

confme - npm Package Compare versions

Comparing version 0.0.14 to 1.0.0

3

package.json
{
"name": "confme",
"version": "0.0.14",
"version": "1.0.0",
"description": "Opinionated config library that allows you to have complex config and behaves according to Twelve Factor App rules",

@@ -45,2 +45,3 @@ "main": "src/confme.js",

"dotenv-defaults": "^1.1.1",
"json5": "^2.1.3",
"livr": "^2.2.4",

@@ -47,0 +48,0 @@ "livr-extra-rules": "^1.2.1"

@@ -21,3 +21,3 @@ ## confme

You can pass a path to a JSON file with [LIVR](https://www.npmjs.com/package/livr) rules as a second argument. In this case, it will use [LIVR](https://www.npmjs.com/package/livr) ([with extra rules](https://www.npmjs.com/package/livr-extra-rules)) to validate the config.
You can pass a path to a JSON/JSON5 file with [LIVR](https://www.npmjs.com/package/livr) rules as a second argument. In this case, it will use [LIVR](https://www.npmjs.com/package/livr) ([with extra rules](https://www.npmjs.com/package/livr-extra-rules)) to validate the config.

@@ -24,0 +24,0 @@ ### Usage examples

require("dotenv-defaults").config();
const JSON5 = require("json5")
const fs = require("fs");

@@ -12,5 +13,5 @@

try {
config = JSON.parse(configStr);
config = JSON5.parse(configStr);
} catch (error) {
console.error("CANNOT PARSE JSON:", configStr);
console.error("CANNOT PARSE JSON5:", configStr);
throw error;

@@ -30,3 +31,3 @@ }

const livrRules = JSON.parse(fs.readFileSync(livrSchemaPath).toString());
const livrRules = JSON5.parse(fs.readFileSync(livrSchemaPath).toString());
const validator = new LIVR.Validator(livrRules, true);

@@ -33,0 +34,0 @@ validator.registerRules(livrExtraRules);

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