Socket
Socket
Sign inDemoInstall

@zag-js/i18n-utils

Package Overview
Dependencies
Maintainers
1
Versions
447
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/i18n-utils - npm Package Compare versions

Comparing version 0.0.0-dev-20230921195604 to 0.0.0-dev-20230921201055

3

dist/index.d.ts

@@ -18,5 +18,4 @@ type Direction = "rtl" | "ltr";

locale?: string;
getRootNode?: () => ShadowRoot | Document;
getRootNode?: () => ShadowRoot | Document | Node;
onLocaleChange?: (locale: Locale) => void;
immediate?: boolean;
}

@@ -23,0 +22,0 @@ declare function trackLocale(options?: LocaleOptions): () => void;

@@ -95,11 +95,4 @@ "use strict";

function trackLocale(options = {}) {
const { locale: localeStr = "en-US", getRootNode, onLocaleChange, immediate } = options;
const fallbackLocale = {
locale: localeStr,
dir: getLocaleDir(localeStr)
};
if (immediate) {
const locale = !(0, import_dom_query.isDom)() ? fallbackLocale : getDefaultLocale();
onLocaleChange?.(locale);
}
const { getRootNode, onLocaleChange } = options;
onLocaleChange?.(getDefaultLocale());
const handleLocaleChange = () => {

@@ -106,0 +99,0 @@ onLocaleChange?.(getDefaultLocale());

{
"name": "@zag-js/i18n-utils",
"version": "0.0.0-dev-20230921195604",
"version": "0.0.0-dev-20230921201055",
"description": "Interationalization utilities for Zag.js",

@@ -27,3 +27,3 @@ "keywords": [

"dependencies": {
"@zag-js/dom-query": "0.0.0-dev-20230921195604"
"@zag-js/dom-query": "0.0.0-dev-20230921201055"
},

@@ -30,0 +30,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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