
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
gengojs-default-api
Advanced tools
The default API plugin for gengo.js.
This module will be used for gengo.js.
Note: The API examples defined are respect to the default parser.
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()*/));
The default API is already included in gengo.js so you should not have to require it.
See documentation
{
"global":"__",
"localize":"__l"
}
None
this.header.getLocale(locale:String)
from Header
classthis.header.setLocale(locale:String)
from Header
classthis.header.detectLocale(locale:String)
from Header
class (optional)supported:Array
from Header
optionsthis.backend.catalog(locale:String)
from Backend
classUnix:
DEBUG=gengo.api
Windows:
SET DEBUG=gengo.api
See gengojs-debug for usage.
There are a few reserved words in the API. These words are used for overriding purposes. See the example:
// Using 'phrase' keyword:
__({phrase:'Hello!'});
// Using 'parser' keyword which
// overrides the parser:
// See https://github.com/iwatakeshi/gengojs-default-parser
// for more details.
__('Hello!', {parser:'default'});
// Using 'locale' keyword which
// overrides the locale:
__('You have {n, plural, =0 {no photos.}=1 {one photo.}other {# photos.}}', {parser:'format'});
Feel free to contribute or even fork the project. This plugin has been
written in ES6 and can be seen under lib/index.js
.
FAQs
The default router plugin for gengojs
The npm package gengojs-default-api receives a total of 5 weekly downloads. As such, gengojs-default-api popularity was classified as not popular.
We found that gengojs-default-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.