gengojs-default-header

0.1.5 • Public • Published

gengojs-default-header

The default accept plugin for gengo.js.

Build Status

This module is a plugified version of gengojs-accept for gengo.js.

Documentation

See documentation.

Internal API

  • getLocale(locale:String)
    • Should return a string of the current locale.
  • setLocale(locale:String)
    • Should set the locale.
  • detectLocale(locale:String)
    • Should detect the current locale by parsing the Accept-Language, domains, sub-domains, queries, URLs, and cookies.
  • supported:Array from options
    • Should be an array of supported locales.

For more see documentation

Dependencies

Not Applicable

Debug

Unix:

DEBUG=gengo.header

Windows:

SET DEBUG=gengo.header

See gengojs-debug for usage.

Contribute

Feel free to contribute or even fork the project. This plugin has been written in ES6 and can be seen under lib/index.js. If you would like to contribute to the header parser, visit gengojs-accept's GitHub page.

Package Sidebar

Install

npm i gengojs-default-header

Weekly Downloads

2

Version

0.1.5

License

MIT

Last publish

Collaborators

  • iwatakeshi