@u27n/js 0.1.0 → 0.1.1

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/dist/core.d.ts CHANGED
@@ -3,13 +3,13 @@ export interface LocaleImports {
3
3
  default: unknown[];
4
4
  }>;
5
5
  }
6
- export interface I18nOptions {
6
+ export interface U27nOptions {
7
7
  source: string;
8
8
  locales: LocaleImports;
9
9
  }
10
- export declare class I18n {
10
+ export declare class U27n {
11
11
  #private;
12
- constructor(options: I18nOptions | I18n);
12
+ constructor(options: U27nOptions | U27n);
13
13
  load(locale: string): Promise<void>;
14
14
  get locale(): string;
15
15
  set locale(value: string);
package/dist/core.js CHANGED
@@ -1,9 +1,9 @@
1
- export class I18n {
1
+ export class U27n {
2
2
  #kernel;
3
3
  #locale;
4
4
  #data;
5
5
  constructor(options) {
6
- this.#kernel = options instanceof I18n ? options.#kernel : {
6
+ this.#kernel = options instanceof U27n ? options.#kernel : {
7
7
  s: options.source,
8
8
  i: options.locales,
9
9
  p: new Map(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@u27n/js",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
package/src/core.ts CHANGED
@@ -14,18 +14,18 @@ interface Kernel {
14
14
  d: Map<string, unknown[]>;
15
15
  }
16
16
 
17
- export interface I18nOptions {
17
+ export interface U27nOptions {
18
18
  source: string;
19
19
  locales: LocaleImports;
20
20
  }
21
21
 
22
- export class I18n {
22
+ export class U27n {
23
23
  #kernel: Kernel;
24
24
  #locale: string | undefined;
25
25
  #data: unknown[] | undefined;
26
26
 
27
- constructor(options: I18nOptions | I18n) {
28
- this.#kernel = options instanceof I18n ? options.#kernel : {
27
+ constructor(options: U27nOptions | U27n) {
28
+ this.#kernel = options instanceof U27n ? options.#kernel : {
29
29
  s: options.source,
30
30
  i: options.locales,
31
31
  p: new Map(),