Socket
Socket
Sign inDemoInstall

@18f/identity-i18n

Package Overview
Dependencies
0
Maintainers
9
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

13

dist/index.js

@@ -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 };

2

package.json
{
"name": "@18f/identity-i18n",
"private": false,
"version": "1.0.0",
"version": "1.0.1",
"type": "module",

@@ -6,0 +6,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc