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

tant-intl

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tant-intl - npm Package Compare versions

Comparing version 3.0.7 to 3.0.8

24

es/index.js

@@ -35,3 +35,3 @@ "use strict";

const lan = (0, exports.getLocale)();
const intl = window.intl;
const intl = window.intl || {};
if (!tags || tags.length === 0) {

@@ -42,12 +42,14 @@ await superagent_1.default.get(`/intl/${lan}.json`).then((res) => {

}
await Promise.all(tags.map(tag => superagent_1.default.get(`/intl/${lan}-${tag}.json`)
.then((res) => {
return res.body;
})
.catch((err) => {
console.log(err);
return {};
}))).then((arr) => {
window.intl = Object.assign(intl, ...arr);
});
else {
await Promise.all(tags.map(tag => superagent_1.default.get(`/intl/${lan}-${tag}.json`)
.then((res) => {
return res.body;
})
.catch((err) => {
console.log(err);
return {};
}))).then((arr) => {
window.intl = Object.assign(intl, ...(arr || []));
});
}
};

@@ -54,0 +56,0 @@ exports.getIntlMessage = getIntlMessage;

@@ -86,3 +86,3 @@ "use strict";

lan = (0, exports.getLocale)();
intl = window.intl;
intl = window.intl || {};
if (!(!tags || tags.length === 0)) return [3 /*break*/, 2];

@@ -94,3 +94,3 @@ return [4 /*yield*/, superagent_1.default.get("/intl/".concat(lan, ".json")).then(function (res) {

_a.sent();
_a.label = 2;
return [3 /*break*/, 4];
case 2: return [4 /*yield*/, Promise.all(tags.map(function (tag) {

@@ -106,7 +106,8 @@ return superagent_1.default.get("/intl/".concat(lan, "-").concat(tag, ".json"))

})).then(function (arr) {
window.intl = Object.assign.apply(Object, __spreadArray([intl], arr, false));
window.intl = Object.assign.apply(Object, __spreadArray([intl], (arr || []), false));
})];
case 3:
_a.sent();
return [2 /*return*/];
_a.label = 4;
case 4: return [2 /*return*/];
}

@@ -113,0 +114,0 @@ });

{
"name": "tant-intl",
"version": "3.0.7",
"version": "3.0.8",
"description": "依托于飞书表格做文案管理的多语言组件",

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

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