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

@zag-js/i18n-utils

Package Overview
Dependencies
Maintainers
1
Versions
461
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.70.0 to 0.71.0

67

dist/index.js

@@ -1,34 +0,4 @@

"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
'use strict';
// src/index.ts
var src_exports = {};
__export(src_exports, {
formatBytes: () => formatBytes,
formatDate: () => formatDate,
formatList: () => formatList,
formatNumber: () => formatNumber,
formatRelativeTime: () => formatRelativeTime,
getDefaultLocale: () => getDefaultLocale,
getLocaleDir: () => getLocaleDir,
isRTL: () => isRTL,
trackLocale: () => trackLocale
});
module.exports = __toCommonJS(src_exports);
var domQuery = require('@zag-js/dom-query');

@@ -405,7 +375,2 @@ // src/cache.ts

let locale = typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
try {
Intl.DateTimeFormat.supportedLocalesOf([locale]);
} catch {
locale = "en-US";
}
return {

@@ -416,5 +381,2 @@ locale,

}
// src/track-locale.ts
var import_dom_query = require("@zag-js/dom-query");
function trackLocale(options = {}) {

@@ -426,3 +388,3 @@ const { getRootNode, onLocaleChange } = options;

};
const win = getRootNode ? (0, import_dom_query.getWindow)(getRootNode()) : window;
const win = getRootNode ? domQuery.getWindow(getRootNode()) : window;
win.addEventListener("languagechange", handleLocaleChange);

@@ -433,14 +395,11 @@ return () => {

}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
formatBytes,
formatDate,
formatList,
formatNumber,
formatRelativeTime,
getDefaultLocale,
getLocaleDir,
isRTL,
trackLocale
});
//# sourceMappingURL=index.js.map
exports.formatBytes = formatBytes;
exports.formatDate = formatDate;
exports.formatList = formatList;
exports.formatNumber = formatNumber;
exports.formatRelativeTime = formatRelativeTime;
exports.getDefaultLocale = getDefaultLocale;
exports.getLocaleDir = getLocaleDir;
exports.isRTL = isRTL;
exports.trackLocale = trackLocale;

4

package.json
{
"name": "@zag-js/i18n-utils",
"version": "0.70.0",
"version": "0.71.0",
"description": "Interationalization utilities for Zag.js",

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

"dependencies": {
"@zag-js/dom-query": "0.70.0"
"@zag-js/dom-query": "0.71.0"
},

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

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