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

fis3-parser-umu-i18n

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis3-parser-umu-i18n - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

33

index.js

@@ -17,2 +17,13 @@ /**

var PROJECT_DIR = fis.project.getProjectPath();
function extend(target) {
var sources = [].slice.call(arguments, 1);
sources.forEach(function (source) {
for (var prop in source) {
target[prop] = source[prop];
}
});
return target;
}
/**

@@ -26,10 +37,18 @@ * @description 读取 i18n 数据

var I18N_DIR = conf.projectDir || PROJECT_DIR;
var I18N_FILE_PATH = path.join(I18N_DIR, I18N_FOLDER, LANG + '.json');
try {
file.cache.addDeps(I18N_FILE_PATH);
return JSON.parse(fs.readFileSync(I18N_FILE_PATH, 'utf8'));
} catch (e) {
console.error(e.message);
return {};
var data = {};
if (!Array.isArray(I18N_FOLDER)) {
I18N_FOLDER = [I18N_FOLDER];
}
while (I18N_FOLDER.length) {
try {
var I18N_FILE_PATH = path.join(I18N_DIR, I18N_FOLDER.shift(), LANG + '.json');
file.cache.addDeps(I18N_FILE_PATH);
extend(data, JSON.parse(fs.readFileSync(I18N_FILE_PATH, 'utf8')));
} catch (e) {
console.error(e.message);
return {};
}
}
return data;
};

@@ -36,0 +55,0 @@

{
"name": "fis3-parser-umu-i18n",
"version": "0.0.2",
"version": "0.0.3",
"description": "A i18n parser for fis3",

@@ -5,0 +5,0 @@ "main": "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