Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 313 Bytes

README.md

File metadata and controls

18 lines (12 loc) · 313 Bytes

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!