Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kano/i18n

Package Overview
Dependencies
Maintainers
21
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kano/i18n - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

1

dist/index.d.ts
export interface IMessageDB {
[k: string]: string;
}
export declare function setDebug(state: boolean): void;
/**

@@ -5,0 +6,0 @@ * Set the default language for this session. The default language will be used if the detected

;
let debug = false;
// Detected language

@@ -46,2 +47,5 @@ let lang;

}
export function setDebug(state) {
debug = state;
}
/**

@@ -66,3 +70,3 @@ * Set the default language for this session. The default language will be used if the detected

export function localize(key, fallback) {
return db[key] || fallback;
return debug ? `\${${key}}` : db[key] || fallback;
}

@@ -69,0 +73,0 @@ // Alias for localize

3

dist/polymer.d.ts
declare type Constructor<T> = new (...args: any[]) => T;
/**
* A Polymer mixin adding the localize and _ method to use in templates
* A Polymer mixin adding the localize method to use in templates
*/
export declare function I18nMixin<T extends Constructor<HTMLElement>>(base: T): {
new (...args: any[]): {
_(key: string, fallback?: string | undefined): string | undefined;
localize(key: string, fallback?: string | undefined): string | undefined;

@@ -9,0 +8,0 @@ accessKey: string;

{
"name": "@kano/i18n",
"version": "1.0.0",
"version": "1.0.1",
"main": "index.js",

@@ -17,3 +17,4 @@ "repository": "git@github.com:KanoComputing/web-i18n.git",

"build:tools": "tsc -p tsconfig.tools.json",
"watch:tools": "yarn build:tools --watch"
"watch:tools": "yarn build:tools --watch",
"prepublishOnly": "yarn build:release"
},

@@ -20,0 +21,0 @@ "devDependencies": {

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