Zoom
Provides a consitent interface that mirrors Boom
// Here's the code in full'use strict'; { thisdata = data; thisstatusCode = statusCode || 200;}Zoom { return data;} moduleexports = Zoom;
Usage
{ } // This would yield "statusCode": 200 "data": "foo": true "bar": 42 // If an error occured, the (Boom) response would look like "statusCode": 400 "error": "whatever" "message": "Something went wrong"