@ladjs/i18n
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -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 |
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
177
0
16937
168