assert-key
Assert that an object has a specified key
Install
$ npm install --save assert-key
Usage
var assertKey = //=> noop //=> Error: expected bar in object
API
assertKey(object, key)
-> undefined
object
Required
Type: object
The source object.
key
Required
Type: string
The key to expect.
License
MIT © Ben Drucker