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

check

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check

Check configurations completeness

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
841
increased by13.19%
Maintainers
1
Weekly downloads
 
Created
Source

node-check

Configuration checker.

Build Status

Install

npm install check

(Or clone the repo.)

Usage

var check = require('check');

var config = {
    database: 'foo',
	someOtherSetting: 'bar'
};

check(config)
	.has('database')
	.has('someOtherSetting')
	.has('missingSetting')   // Missing key - this will make check fail.
	.assert();               // This will assert all keys are there.

API

Initialization

check(object-literal)

Returns an object on which you can chain tests.

.has(key)

Tests if the given key is present.

.assert()

Stops the chaining and assert() if any keys were missing.

.ok()

Stops the chaining and returns if any errors were found.

.errors()

Stops the chaining and returns a list of errors (if any).

Bugs

Plenty! Report them! And add ideas for great features.

License

ISC; see LICENSE.

FAQs

Package last updated on 30 Jul 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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