@18f/identity-i18n
Advanced tools
Comparing version 0.0.1-beta0.4 to 1.0.0-beta0.1
@@ -1,7 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.t = exports.replaceVariables = exports.i18n = exports.I18n = void 0; | ||
const hasOwn = (object, key) => Object.prototype.hasOwnProperty.call(object, key); | ||
@@ -72,4 +66,3 @@ | ||
*/ | ||
const replaceVariables = (string, variables) => string.replace(/%{(\w+)}/g, (match, key) => hasOwn(variables, key) ? variables[key] : match); | ||
exports.replaceVariables = replaceVariables; | ||
export const replaceVariables = (string, variables) => string.replace(/%{(\w+)}/g, (match, key) => hasOwn(variables, key) ? variables[key] : match); | ||
class I18n { | ||
@@ -104,10 +97,8 @@ constructor() { | ||
// eslint-disable-next-line no-underscore-dangle | ||
exports.I18n = I18n; | ||
const i18n = new I18n({ | ||
strings: globalThis._locale_data | ||
}); | ||
exports.i18n = i18n; | ||
const { | ||
t | ||
} = i18n; | ||
exports.t = t; | ||
export { I18n, i18n, t }; |
{ | ||
"name": "@18f/identity-i18n", | ||
"private": false, | ||
"version": "0.0.1-beta0.4", | ||
"version": "1.0.0-beta0.1", | ||
"type": "module", | ||
@@ -10,3 +10,3 @@ "files": [ | ||
"scripts": { | ||
"prepublishOnly": "babel index.ts --out-dir dist --extensions '.ts,.js'" | ||
"prepublishOnly": "babel index.ts --out-dir dist --extensions '.ts,.js'" | ||
}, | ||
@@ -24,5 +24,2 @@ "exports": { | ||
"homepage": "https://github.com/18f/identity-idp", | ||
"peerDependencies": { | ||
"react": ">=17" | ||
}, | ||
"repository": { | ||
@@ -29,0 +26,0 @@ "type": "git", |
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
0
0
7178
92