Socket
Socket
Sign inDemoInstall

@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.1.1 to 1.2.0

6

lib/index.js

@@ -63,7 +63,3 @@ "use strict";

register: i18n.api
}, config);
const logger = this.config.logger;
this.config.logDebugFn = logger.debug;
this.config.logWarnFn = logger.warn;
this.config.logErrorFn = logger.error; // validate locales against available ones
}, config); // validate locales against available ones

@@ -70,0 +66,0 @@ if (!every(this.config.locales, l => locales.includes(l))) throw new Error(`Invalid locales: ${this.config.locales.filter(str => !locales.includes(str)).join(', ')}`); // inherit i18n object

2

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

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

@@ -129,4 +129,14 @@ # [**@ladjs/i18n**](https://github.com/ladjs/i18n)

Note that we automatically bind `logDebugFn`, `logWarnFn`, and `logErrorFn` for [i18n][] options to `logger.debug`, `logger.warn`, and `logger.error` respectively.
If you wish to bind `logDebugFn`, `logWarnFn`, and `logErrorFn` per [i18n][] options:
```js
const i18n = new I18N({
logDebugFn: console.log,
logWarnFn: console.log,
logErrorFn: console.log
});
```
We recommend to use [CabinJS][cabin] for all your logging needs.
For a list of all available locales see [i18n-locales][].

@@ -166,1 +176,3 @@

[language-support]: https://github.com/nodejs/nodejs.org/commit/d6cdd942a8fc0fffcf6879eca124295e95991bbc#diff-78c12f5adc1848d13b1c6f07055d996eR59
[cabin]: https://cabinjs.com
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