Socket
Socket
Sign inDemoInstall

i18next

Package Overview
Dependencies
Maintainers
1
Versions
501
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

.travis.yml

4

lib/i18next.js

@@ -46,2 +46,6 @@ (function() {

// set locale & i18n in req
req.locale = locales[0];
req.i18n = i18n;
i18n.setLng(locales[0], function() {

@@ -48,0 +52,0 @@ i18n.persistCookie(req, res, i18n.lng());

43

package.json
{
"author": "Jan Muehlemann <jan.muehlemann@gmail.com>"
, "name": "i18next"
, "description": "A i18n middleware for the Express.js framework."
, "version": "1.2.0"
, "repository": {
"type": "git"
, "url": "git@github.com:jamuhl/i18next-node.git"
}
, "private": false
, "main": "index.js"
, "directories": {
"author": "Jan Muehlemann <jan.muehlemann@gmail.com>",
"name": "i18next",
"description": "A i18n middleware for the Express.js framework.",
"version": "1.2.1",
"repository": {
"type": "git",
"url": "git@github.com:jamuhl/i18next-node.git"
},
"private": false,
"main": "index.js",
"directories": {
"lib": "lib"
},
"engines": {
"node": ">v0.4.0"
},
"dependencies": {
"cookies": ">= 0.1.6"
},
"devDependencies": {
"mocha": "~0.10.2"
},
"scripts": {
"test": "make test"
}
, "engines": {
"node": ">v0.4.0"
}
, "dependencies": {
"cookies": ">= 0.1.6"
}
, "devDependencies": { }
, "scripts": {
}
}

@@ -12,2 +12,4 @@ # Introduction

[![Build Status](https://secure.travis-ci.org/jamuhl/i18next-node.png)](http://travis-ci.org/jamuhl/i18next-node)
# installation

@@ -14,0 +16,0 @@

@@ -30,2 +30,6 @@ var express = require('express')

app.get('/str', function(req, res) {
res.send('locale: ' + req.locale + '<br /> key nav.home -> ' + req.i18n.t('nav.home'));
});
app.listen(3000);

@@ -7,5 +7,5 @@ var i18n = require('../index')

it('should be to init i18next without option', function(done) {
it('should init i18next without option', function(done) {
i18n.init(function(t) {
assert.equal(i18n.lng(),'dev');
assert.equal(typeof t,'function');

@@ -12,0 +12,0 @@ done();

//run tests with cmd
//mocha --globals i,len test/*
//make test
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