saykit 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/runtime.mjs +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> Type-safe i18n library with compile-time macro transforms.
|
|
4
4
|
|
|
5
|
+
[](https://codecov.io/gh/k0d13/saykit?flags%5B0%5D=integration)
|
|
6
|
+
|
|
5
7
|
The core runtime for [SayKit](https://saykit.js.org). Exports the `Say` class, which stores your locales, loads message catalogues, and formats messages using ICU MessageFormat.
|
|
6
8
|
|
|
7
9
|
You author messages with the `` say`...` `` tagged template (and `say.plural`, `say.ordinal`, `say.select`); a SayKit build-tool plugin rewrites them at build time into small runtime calls.
|
package/dist/runtime.mjs
CHANGED
|
@@ -70,6 +70,7 @@ var Say = class Say {
|
|
|
70
70
|
* @throws If no messages are available for the active locale
|
|
71
71
|
*/
|
|
72
72
|
get messages() {
|
|
73
|
+
/* v8 ignore next */
|
|
73
74
|
if (!_classPrivateFieldGet2(_messages, this).has(this.locale)) throw new Error("No messages loaded for locale");
|
|
74
75
|
return _classPrivateFieldGet2(_messages, this).get(this.locale);
|
|
75
76
|
}
|