Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Configuration checker.
npm install check
(Or clone the repo.)
var check = require('check');
var config = {
database: {hostname: 'example.com', debug: false},
someOtherSetting: 'bar'
};
check(config)
.has('database.hostname') // Implicitly checks 'database'
.hasBoolean('database.debug')
.has('missingSetting') // Missing key - this will make check fail.
.assert(); // Assert if anything isn't as required.
Will produce an error not entirely unlike this:
AssertionError: Incorrect configuration:
Missing key 'missingSetting'.
at functionA (/your/source/code/a.js:line:col)
at functionB (/your/source/code/b.js:line:col)
...
at EventEmitter._tickCallback (node.js:190:38)
check(object-literal)
Returns an chainable object whereon the following functions can be used.
Tests if the given key is present. This also works with dot-notation, so
has('foo.bar')
will check if foo
exists and then if foo
has a bar
-thing
stuck on.
First checks if the key is present (as if running .has(key)
), and if the
given key is the right type.
If the key is present, it checks if it is of the indicated type.
Stops the chaining and assert()
if any keys were missing.
Stops the chaining and returns if any errors were found.
Stops the chaining and returns a list of errors (if any).
Plenty! Report them! And add ideas for great features.
ISC; see LICENSE.
FAQs
Check configurations completeness
The npm package check receives a total of 0 weekly downloads. As such, check popularity was classified as not popular.
We found that check demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.