New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gengojs-default-api

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gengojs-default-api

The default router plugin for gengojs

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gengojs-default-api

The default API plugin for gengo.js.

Build Status

This module will be used for gengo.js.

Note: The API examples defined are respect to the default parser.

Documentation

See documentation

An example usage with options is:


var gengo = require('gengojs');
var api = require('gengojs-default-api');

/* In whatever framework you are using: */

// I'll use express for an example
// but it shouldn't matter

var app = require('express')();
app.use(gengo({
   // Specify the type
   // of option to modify
	api:{
		/* options */
	}
},/*api()*/));

Internal API

Not Applicable

Dependencies

  • this.header.getLocale(locale:String) from Header
    • Should return a string of the current locale.
  • this.header.setLocale(locale:String) from Header
    • Should set the locale.
  • this.header.detectLocale(locale:String) from Header (optional)
    • Should detect the current locale by parsing the Accept-Language, domains, sub-domains, queries, URLs, and cookies.
  • this.header.options.supported:Array from Header options
    • Should be an array of supported locales.
  • this.backend.catalog(locale:String) from Backend
    • Should return an object containing the dictionaries for each locale.

Options

{
	"global":"__",
	"localize":"__l"
}

Debug

Unix:

DEBUG=gengo.api

Windows:

SET DEBUG=gengo.api

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.

Keywords

FAQs

Package last updated on 09 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc