Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

internationalization

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

internationalization - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

3

angular.js

@@ -21,2 +21,5 @@ // Generated by CoffeeScript 1.8.0

key = arguments[0], vars = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
if (!key) {
return "";
}
idx = key.indexOf(nsSeparator);

@@ -23,0 +26,0 @@ if (idx !== -1) {

2

package.json
{
"name": "internationalization",
"version": "0.1.0",
"version": "0.1.1",
"description": "i18n",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,5 +0,5 @@

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.1
(function() {
var debug, getAcceptLanguage, getInstance, middleware,
__slice = [].slice;
slice = [].slice;

@@ -12,5 +12,5 @@ debug = require('debug')('i18n');

middleware = function(_arg) {
middleware = function(arg) {
var cookie, directory, env, fallback, nsSeparator, query, translator;
cookie = _arg.cookie, directory = _arg.directory, fallback = _arg.fallback, nsSeparator = _arg.nsSeparator, query = _arg.query;
cookie = arg.cookie, directory = arg.directory, fallback = arg.fallback, nsSeparator = arg.nsSeparator, query = arg.query;
if (!directory) {

@@ -37,2 +37,5 @@ throw new Error("you hava to specify directory for locales");

var lang;
if (!req.cookies) {
throw new Error("cookies not accessible");
}
if (env === "development") {

@@ -48,9 +51,9 @@ translator.load(directory);

var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return translator.translate.apply(translator, [lang].concat(__slice.call(args)));
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
return translator.translate.apply(translator, [lang].concat(slice.call(args)));
};
res.locals.__ = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return translator.translatePlural.apply(translator, [lang].concat(__slice.call(args)));
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
return translator.translatePlural.apply(translator, [lang].concat(slice.call(args)));
};

@@ -57,0 +60,0 @@ res.locals.lang = lang;

@@ -72,3 +72,3 @@ // Generated by CoffeeScript 1.8.0

} else {
throw new Error("var '" + this.tokens[i] + "' missing in '" + this.template + "'");
throw new Error("var '" + this.tokens[i] + "' missing, required in '" + this.template + "'");
}

@@ -75,0 +75,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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