greybel-mock-environment 1.6.6 → 1.6.8
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/dist/utils.d.ts +1 -2
- package/dist/utils.js +3 -2
- package/package.json +2 -2
package/dist/utils.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import Translations from './data/translations';
|
|
2
1
|
import { Library } from './types/library';
|
|
3
2
|
import { ServiceType } from './types/service';
|
|
4
3
|
import { User } from './types/user';
|
|
5
|
-
export declare function getTranslationText(key:
|
|
4
|
+
export declare function getTranslationText(key: string): string | null;
|
|
6
5
|
export declare function isValidIp(target: string): boolean;
|
|
7
6
|
export declare function isLanIp(target: string): boolean;
|
|
8
7
|
export declare function getServiceLibrary(service: ServiceType): Library | null;
|
package/dist/utils.js
CHANGED
|
@@ -9,9 +9,10 @@ var translations_1 = __importDefault(require("./data/translations"));
|
|
|
9
9
|
var library_1 = require("./types/library");
|
|
10
10
|
var service_1 = require("./types/service");
|
|
11
11
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
12
|
+
var TranslationRecords = translations_1.default;
|
|
12
13
|
function getTranslationText(key) {
|
|
13
|
-
if (hasOwnProperty.call(
|
|
14
|
-
return
|
|
14
|
+
if (hasOwnProperty.call(TranslationRecords, key)) {
|
|
15
|
+
return TranslationRecords[key];
|
|
15
16
|
}
|
|
16
17
|
return null;
|
|
17
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "greybel-mock-environment",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.8",
|
|
4
4
|
"description": "Mock environment",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@types/random-seed": "^0.3.3",
|
|
50
50
|
"blueimp-md5": "^2.19.0",
|
|
51
|
-
"greyscript-core": "^0.9.
|
|
51
|
+
"greyscript-core": "^0.9.6",
|
|
52
52
|
"random-seed": "^0.3.0",
|
|
53
53
|
"random-username-generator": "^1.0.4"
|
|
54
54
|
}
|