Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

assert-keys

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assert-keys

assert an object has some keys

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
-60%
Maintainers
1
Weekly downloads
 
Created
Source

assert-keys

asserts that some keys are present in an object

install

npm i assert-keys

example

var checkConfig = require('assert-keys')(['port', 'api_url']);

checkConfig({port: 8000, api_url: 'http://localhost:1234'}); // doesn't throw
checkConfig({port: 8000}); // throws!

Keywords

assert

FAQs

Package last updated on 30 Sep 2013

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