Skip to content
/ riposte Public

Creates predictable API response objects by placing errors, warnings, and data in a well defined envelope.

License

Notifications You must be signed in to change notification settings

livio/riposte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Riposte

Reply

Name Type Description
id String Unique identifier for the original client's request all the way to the final response.

toObject

Converts the Reply instance into a JSON object that can be return in an API response.

Parameters

# Parameter Required Type Default Description
1 options no Object {} Overrides default behaviors when converting the reply instance to an object.
1 options.sanitizeData no Boolean false When true, calls the ON_SANITIZE_DATA Riposte handler before adding the data to the response object.
2 cb yes Function undefined

Express

res.reply res.replyOptions

About

Creates predictable API response objects by placing errors, warnings, and data in a well defined envelope.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published