1.1.0 • Published 9 years ago

xenoglossy v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Xenoglossy

Build Status

Human-friendly message library for server and client side interaction responses.

Includes the delightful http-status

Usage

Run npm install xenoglossy --save

Once required you may call it with either an HTTP code to use those provided by http-status or a message name using simple javascript object notation.

This means you can insert your code into API responses, template variables for engines such as EJS, Handlebars, Swig, etc. Use it anywhere you need a well formed, human-friendly message or suitable response.

Code examples

These are just a few examples to get going, it is recommended to simply read the source JSON to see what is available.

API examples

Using HTTP codes:

var xenoglossy = require('xenoglossy');

// Print "Internal Server Error"
console.log(xenoglossy.http[500]);

// Print 500
console.log(xenoglossy.http.INTERNAL_SERVER_ERROR);