hokey-runtime
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -8,1 +8,4 @@ export declare const unknownMessage: (msg: string) => string; | ||
export declare const wrapMessages: (messages: HokeyLocaleMessages) => HokeyLocaleMessages; | ||
export declare const normalizeMsg: (errMsg: string) => string; | ||
export declare const errMatch: (f: string) => (e: string) => boolean; | ||
export declare const errMatchStart: (objPath: string) => (e: string) => boolean; |
@@ -28,1 +28,4 @@ const UNKNOWN_MESSAGE_PREFIX = "???"; | ||
export const wrapMessages = (messages) => new Proxy(Object.assign({}, messages), messageNotFoundHandler); | ||
export const normalizeMsg = (errMsg) => errMsg.replace(/\./g, "_"); | ||
export const errMatch = (f) => (e) => normalizeMsg(e) === normalizeMsg(f); | ||
export const errMatchStart = (objPath) => (e) => normalizeMsg(e).startsWith(`${normalizeMsg(objPath)}_`); |
@@ -8,1 +8,4 @@ export declare const unknownMessage: (msg: string) => string; | ||
export declare const wrapMessages: (messages: HokeyLocaleMessages) => HokeyLocaleMessages; | ||
export declare const normalizeMsg: (errMsg: string) => string; | ||
export declare const errMatch: (f: string) => (e: string) => boolean; | ||
export declare const errMatchStart: (objPath: string) => (e: string) => boolean; |
@@ -28,1 +28,4 @@ const UNKNOWN_MESSAGE_PREFIX = "???"; | ||
export const wrapMessages = (messages) => new Proxy(Object.assign({}, messages), messageNotFoundHandler); | ||
export const normalizeMsg = (errMsg) => errMsg.replace(/\./g, "_"); | ||
export const errMatch = (f) => (e) => normalizeMsg(e) === normalizeMsg(f); | ||
export const errMatchStart = (objPath) => (e) => normalizeMsg(e).startsWith(`${normalizeMsg(objPath)}_`); |
{ | ||
"name": "hokey-runtime", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "runtime library for hokeylization", |
30080
586