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

@ladjs/i18n

Package Overview
Dependencies
Maintainers
1
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 1.2.0 to 1.2.1

7

lib/index.js

@@ -62,3 +62,4 @@ "use strict";

},
register: i18n.api
register: i18n.api,
lastLocaleField: 'last_locale'
}, config); // validate locales against available ones

@@ -196,6 +197,6 @@

debug('set cookies for locale "%s"', locale); // if the user is logged in and ctx.isAuthenticated() exists,
// then save it as `last_locale`
// then save it as `last_locale` (variable based off lastLocaleField)
if (isFunction(ctx.isAuthenticated) && ctx.isAuthenticated()) {
ctx.state.user.last_locale = locale;
ctx.state.user[_this.config.lastLocaleField] = locale;

@@ -202,0 +203,0 @@ try {

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

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

@@ -94,3 +94,3 @@ # [**@ladjs/i18n**](https://github.com/ladjs/i18n)

This also stores the `last_locale` for a user via `ctx.state.user.save()`.
This also stores the `last_locale` (or whatever you configure the property name to be in the config option `lastLocaleField`) for a user via `ctx.state.user.save()`.

@@ -126,3 +126,4 @@

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

@@ -129,0 +130,0 @@ ```

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