New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

onix-core

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onix-core - npm Package Compare versions

Comparing version 1.1.21 to 1.1.22

2

built/Intl.d.ts

@@ -14,2 +14,4 @@ export interface StringsMap {

static setLocale: (value: string) => "ru-ru";
private static safeT;
private static safeTS;
static t: (category: string, key: string) => string;

@@ -16,0 +18,0 @@ static ts: (category: string, key: string) => string[];

@@ -16,6 +16,20 @@ "use strict";

};
Intl.safeT = function (category, locale, key) {
var result = null;
if (Intl.categories[category] && Intl.categories[category][locale]) {
result = Intl.categories[category][locale][key];
}
return result;
};
Intl.safeTS = function (category, locale, key) {
var result = null;
if (Intl.categories[category] && Intl.categories[category][locale]) {
result = Intl.categories[category][locale][key];
}
return result;
};
Intl.t = function (category, key) {
var result = Intl.categories[category][Intl.currentLocale][key];
var result = Intl.safeT(category, Intl.currentLocale, key);
if (!result) {
result = Intl.categories[category][defaultLocale][key];
result = Intl.safeT(category, defaultLocale, key);
}

@@ -25,5 +39,5 @@ return result;

Intl.ts = function (category, key) {
var result = Intl.categories[category][Intl.currentLocale][key];
var result = Intl.safeTS(category, Intl.currentLocale, key);
if (!result) {
result = Intl.categories[category][defaultLocale][key];
result = Intl.safeTS(category, defaultLocale, key);
}

@@ -30,0 +44,0 @@ return result;

2

package.json
{
"name": "onix-core",
"version": "1.1.21",
"version": "1.1.22",
"description": "Onix library core",

@@ -5,0 +5,0 @@ "main": "built/index.js",

@@ -32,6 +32,24 @@ declare type Locales = 'ru-ru' | 'en-us';

private static safeT = (category: string, locale: string, key: string) => {
let result: string = null;
if (Intl.categories[category] && Intl.categories[category][locale]) {
result = <string>Intl.categories[category][locale][key];
}
return result;
};
private static safeTS = (category: string, locale: string, key: string) => {
let result: string[] = null;
if (Intl.categories[category] && Intl.categories[category][locale]) {
result = <string[]>Intl.categories[category][locale][key];
}
return result;
};
public static t = (category: string, key: string) => {
let result = <string>Intl.categories[category][Intl.currentLocale][key];
let result = Intl.safeT(category, Intl.currentLocale, key);
if (!result) {
result = <string>Intl.categories[category][defaultLocale][key];
result = Intl.safeT(category, defaultLocale, key);
}

@@ -43,5 +61,5 @@

public static ts = (category: string, key: string) => {
let result = <string[]>Intl.categories[category][Intl.currentLocale][key];
let result = Intl.safeTS(category, Intl.currentLocale, key);
if (!result) {
result = <string[]>Intl.categories[category][defaultLocale][key];
result = Intl.safeTS(category, defaultLocale, key);
}

@@ -48,0 +66,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc