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

@ladjs/i18n

Package Overview
Dependencies
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ladjs/i18n - npm Package Compare versions

Comparing version 3.0.11 to 3.0.12

12

lib/index.js

@@ -38,7 +38,4 @@ "use strict";

const _require5 = require('qs'),
stringify = _require5.stringify; // expose global
stringify = _require5.stringify;
i18n.api = {};
class I18N {

@@ -69,3 +66,2 @@ constructor(config = {}) {

},
register: i18n.api,
lastLocaleField: 'last_locale',

@@ -106,3 +102,3 @@ ignoredRedirectGlobs: [],

if (typeof phrase !== 'string') throw new Error(`translation key missing: ${key}`);
return i18n.api.t({
return this.api.t({
phrase,

@@ -127,3 +123,3 @@ locale

i18n.init(ctx.request, ctx.state); // expose a helper function to `ctx.state.l`
this.init(ctx.request, ctx.state); // expose a helper function to `ctx.state.l`
// which prefixes a link/path with the locale

@@ -175,3 +171,3 @@

i18n.setLocale([ctx.request, ctx.state], locale);
this.setLocale([ctx.request, ctx.state], locale);
ctx.locale = ctx.request.locale;

@@ -178,0 +174,0 @@ ctx.set('Content-Language', ctx.locale); // if the locale was not available then redirect user

{
"name": "@ladjs/i18n",
"description": "i18n wrapper and Koa middleware for Lad",
"version": "3.0.11",
"version": "3.0.12",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",

@@ -6,0 +6,0 @@ "ava": {

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