@elara-services/packages 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG +5 -0
- package/index.d.ts +5 -1
- package/package.json +1 -1
- package/packages/languages.js +13 -2
package/CHANGELOG
CHANGED
package/index.d.ts
CHANGED
@@ -9,7 +9,11 @@ declare module "@elara-services/packages" {
|
|
9
9
|
public decrypt(encrypted: string): string;
|
10
10
|
}
|
11
11
|
|
12
|
-
export const Languages:
|
12
|
+
export const Languages: {
|
13
|
+
find(name: string): string | null;
|
14
|
+
langs: object
|
15
|
+
}
|
16
|
+
|
13
17
|
export class Minesweeper {
|
14
18
|
public constructor(options?: {
|
15
19
|
rows?: number;
|
package/package.json
CHANGED
package/packages/languages.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
const langs = {
|
2
2
|
'en': 'English',
|
3
3
|
'fr': 'French',
|
4
4
|
'es': 'Spanish',
|
@@ -105,4 +105,15 @@ module.exports = {
|
|
105
105
|
'yi': 'Yiddish',
|
106
106
|
'yo': 'Yoruba',
|
107
107
|
'zu': 'Zulu'
|
108
|
-
};
|
108
|
+
};
|
109
|
+
/** @deprecated */
|
110
|
+
module.exports = langs;
|
111
|
+
module.exports.langs = langs;
|
112
|
+
|
113
|
+
module.exports.find = (name) => {
|
114
|
+
for (const key of Object.keys(langs)) {
|
115
|
+
if (key === name) return key;
|
116
|
+
if (langs[key] === name) return key;
|
117
|
+
}
|
118
|
+
return null;
|
119
|
+
}
|