rest-status

REST Response Status Codes Utility

rest-status

REST Response Status Codes Utility

Guide

Install

npm install rest-status

Use with status code

require("rest-status").E404(); // Error object with: status=404, message=Not Found 

Use with status message

require("rest-status").NotFound(); // Error object with: status=404, message=Not Found