@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 CHANGED
@@ -1,3 +1,8 @@
1
+ # v4.0.1
2
+ Added
3
+ - Languages.find
4
+ - Languages.langs
5
+
1
6
  # v4.0.0
2
7
  __Breaking Change__
3
8
  The following functions & methods for `SlashBuilder` was moved to `static`
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: object;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elara-services/packages",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
@@ -1,4 +1,4 @@
1
- module.exports = {
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
+ }