0.2.1 • Published 10 years ago

gengojs-default-memory v0.2.1

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

gengojs-default-memory

The default memory backend plugin for gengo.js.

Build Status

This module will be used for gengo.js.

Documentation

See documentation.

Usage

An example usage with options is:

var gengo = require('gengojs');
var backend = require('gengojs-default-memory');

/* 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
	backend:{
		/* options */
	}
},/*backend()*/));

The default backend is already included in gengojs so you should not have to require it.

Options

{
  "directory": "./locales",
  "extension": "json",
  "prefix": "",
  "cache": true
}

Supported Extensions

The supported file types are:

  • .json
  • .yaml
  • .toml
  • .js

Internal API

  • find(locale:String)
    • Should return the dictionary by locale
  • catalog(locale:String)
    • Should return the dictionary by locale or the entire dictionary.

For more see documentation

Dependencies

Not Applicable

Debug

Unix:

DEBUG=gengo.backend

Windows:

SET DEBUG=gengo.backend

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.

0.2.1

10 years ago

0.2.0

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.1-beta.9

10 years ago

0.0.1-beta.8

10 years ago

0.0.1-beta.7

10 years ago

0.0.1-beta.6

10 years ago

0.0.1-beta.5

10 years ago

0.0.1-beta.4

10 years ago

0.0.1-beta.3

10 years ago

0.0.1-beta.2

10 years ago

0.0.1-beta.1

10 years ago