Comparing version 0.2.1 to 0.3.0
{ | ||
"name": "abl-lang", | ||
"title": "ABL - lang", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "description": "description", |
"use strict"; | ||
const languages = { | ||
en: require("./../bundle/en") | ||
}; | ||
import fs from "fs"; | ||
import path from "path"; | ||
const bundle = "../bundle"; | ||
const languages = {}; | ||
if (!getAvailableLanguages().length) { | ||
fs.readdirSync(path.join(__dirname, bundle)).forEach(lang => { | ||
languages[lang] = {}; | ||
fs.readdirSync(path.join(__dirname, bundle, lang)).forEach(file => { | ||
languages[lang][file.slice(0, -5)] = require(path.join(__dirname, bundle, lang, file)) | ||
}); | ||
}); | ||
} | ||
export function getAvailableLanguages() { | ||
return ["en"]; | ||
return Object.keys(languages); | ||
} | ||
@@ -11,0 +22,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
27624
12
644
2
1