secure-ls2 2.1.9 → 2.1.10

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/eslint.config.mjs CHANGED
@@ -1,12 +1,12 @@
1
- import globals from "globals";
2
- import pluginJs from "@eslint/js";
3
-
4
- export default [
5
- {languageOptions: { globals: globals.browser }},
6
- pluginJs.configs.recommended,
7
- {
8
- "rules": {
9
-
10
- }
11
- }
12
- ];
1
+ import globals from "globals";
2
+ import pluginJs from "@eslint/js";
3
+
4
+ export default [
5
+ {languageOptions: { globals: globals.browser }},
6
+ pluginJs.configs.recommended,
7
+ {
8
+ "rules": {
9
+
10
+ }
11
+ }
12
+ ];
@@ -1,42 +1,42 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <title>Example Page</title>
5
- <script type="text/javascript" src="../dist/secure-ls.js"></script>
6
- <script type="text/javascript">
7
- window.SecureLS = SecureLS.default;
8
- </script>
9
- <script type="text/javascript" src="vendor/screenlog.min.js"></script>
10
- </head>
11
- <body>
12
- Open console to check localStorage data.
13
- <br />
14
- All of the console output from various examples will be log here. Scroll within it to view all logs.
15
- <br /><br />
16
- Input:
17
- <pre>{"data":[{"age":1},{"age":"2"}]}</pre>
18
- Output:
19
- <pre>{"data":[{"age":1},{"age":"2"}]}</pre>
20
- <script type="text/javascript">
21
- screenLog.init({
22
- autoScroll: false,
23
- });
24
- </script>
25
-
26
- <script type="text/javascript" src="standard.js"></script>
27
- <script type="text/javascript" src="only-base64.js"></script>
28
- <script type="text/javascript" src="only-compressed.js"></script>
29
- <script type="text/javascript" src="base64-compressed.js"></script>
30
- <script type="text/javascript" src="aes-compressed.js"></script>
31
- <script type="text/javascript" src="aes-compressed-realm.js"></script>
32
- <script type="text/javascript" src="aes-uncompressed.js"></script>
33
- <script type="text/javascript" src="des-compressed.js"></script>
34
- <script type="text/javascript" src="des-uncompressed.js"></script>
35
- <script type="text/javascript" src="rabbit-compressed.js"></script>
36
- <script type="text/javascript" src="rabbit-uncompressed.js"></script>
37
- <script type="text/javascript" src="rc4-compressed.js"></script>
38
- <script type="text/javascript" src="rc4-uncompressed.js"></script>
39
- <script type="text/javascript" src="sessionStorage.js"></script>
40
- <script type="text/javascript" src="custom-storage.js"></script>
41
- </body>
42
- </html>
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <title>Example Page</title>
5
+ <script type="text/javascript" src="../dist/secure-ls.js"></script>
6
+ <script type="text/javascript">
7
+ window.SecureLS = SecureLS.default;
8
+ </script>
9
+ <script type="text/javascript" src="vendor/screenlog.min.js"></script>
10
+ </head>
11
+ <body>
12
+ Open console to check localStorage data.
13
+ <br />
14
+ All of the console output from various examples will be log here. Scroll within it to view all logs.
15
+ <br /><br />
16
+ Input:
17
+ <pre>{"data":[{"age":1},{"age":"2"}]}</pre>
18
+ Output:
19
+ <pre>{"data":[{"age":1},{"age":"2"}]}</pre>
20
+ <script type="text/javascript">
21
+ screenLog.init({
22
+ autoScroll: false,
23
+ });
24
+ </script>
25
+
26
+ <script type="text/javascript" src="standard.js"></script>
27
+ <script type="text/javascript" src="only-base64.js"></script>
28
+ <script type="text/javascript" src="only-compressed.js"></script>
29
+ <script type="text/javascript" src="base64-compressed.js"></script>
30
+ <script type="text/javascript" src="aes-compressed.js"></script>
31
+ <script type="text/javascript" src="aes-compressed-realm.js"></script>
32
+ <script type="text/javascript" src="aes-uncompressed.js"></script>
33
+ <script type="text/javascript" src="des-compressed.js"></script>
34
+ <script type="text/javascript" src="des-uncompressed.js"></script>
35
+ <script type="text/javascript" src="rabbit-compressed.js"></script>
36
+ <script type="text/javascript" src="rabbit-uncompressed.js"></script>
37
+ <script type="text/javascript" src="rc4-compressed.js"></script>
38
+ <script type="text/javascript" src="rc4-uncompressed.js"></script>
39
+ <script type="text/javascript" src="sessionStorage.js"></script>
40
+ <script type="text/javascript" src="custom-storage.js"></script>
41
+ </body>
42
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secure-ls2",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "description": "Secure localStorage/sessionStorage data with high level of encryption and data compression",
5
5
  "main": "./dist/secure-ls.js",
6
6
  "module": "./dist/secure-ls2.esm.js",
@@ -39,23 +39,23 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/core": "^7.29.0",
42
- "@babel/preset-env": "^7.29.2",
43
- "@commitlint/cli": "^20.5.0",
44
- "@commitlint/config-conventional": "^20.5.0",
42
+ "@babel/preset-env": "^7.29.5",
43
+ "@commitlint/cli": "^21.0.1",
44
+ "@commitlint/config-conventional": "^21.0.1",
45
45
  "@eslint/js": "^10.0.1",
46
46
  "@types/crypto-js": "^4.2.2",
47
47
  "@types/lz-string": "^1.5.0",
48
- "babel-jest": "^30.3.0",
48
+ "babel-jest": "^30.4.1",
49
49
  "babel-loader": "^10.1.1",
50
- "eslint": "^10.0.3",
51
- "globals": "^17.4.0",
50
+ "eslint": "^10.3.0",
51
+ "globals": "^17.6.0",
52
52
  "husky": "^9.1.7",
53
- "jest": "^30.3.0",
54
- "jest-environment-jsdom": "^30.3.0",
55
- "lint-staged": "^16.4.0",
56
- "prettier": "^3.8.1",
57
- "semver": "^7.7.4",
58
- "webpack": "^5.105.4",
53
+ "jest": "^30.4.2",
54
+ "jest-environment-jsdom": "^30.4.1",
55
+ "lint-staged": "^17.0.4",
56
+ "prettier": "^3.8.3",
57
+ "semver": "^7.8.0",
58
+ "webpack": "^5.106.2",
59
59
  "webpack-cli": "^7.0.2"
60
60
  },
61
61
  "repository": {
@@ -1,58 +1,58 @@
1
- export = SecureLS;
2
-
3
- import * as LZString from 'lz-string';
4
- import { CipherHelper, Encoder } from 'crypto-js';
5
-
6
- declare class SecureLS {
7
- constructor(config?: {
8
- isCompression?: boolean;
9
- encodingType?: string;
10
- encryptionSecret?: string;
11
- encryptionNamespace?: string;
12
- });
13
- getEncryptionSecret(): string;
14
- get(key: string, isAllKeysData?: boolean): any;
15
- getDataFromLocalStorage(key: string): string | null;
16
- getAllKeys(): string[];
17
- set(key: string, data: any): void;
18
- setDataToLocalStorage(key: string, data: string): void;
19
- remove(key: string): void;
20
- removeAll(): void;
21
- clear(): void;
22
- resetAllKeys(): string[];
23
- processData(data: any | string, isAllKeysData: boolean): string;
24
- setMetaData(): void;
25
- getMetaData(): { keys: string[] };
26
-
27
- storage: Storage;
28
-
29
- _name: string;
30
- Base64: SecureLS.Base64;
31
- LZString: LZString.LZStringStatic;
32
- AES: CipherHelper;
33
- DES: CipherHelper;
34
- RABBIT: CipherHelper;
35
- RC4: CipherHelper;
36
- enc: {
37
- Latin1: Encoder;
38
- _Utf8: Encoder;
39
- };
40
- }
41
-
42
- interface Storage {
43
- readonly length: number;
44
- clear(): void;
45
- getItem(key: string): string | null;
46
- key(index: number): string | null;
47
- removeItem(key: string): void;
48
- setItem(key: string, value: string): void;
49
- [name: string]: any;
50
- }
51
-
52
- declare namespace SecureLS {
53
- interface Base64 {
54
- _keyStr: string;
55
- encode(e: string): string;
56
- decode(e: string): string;
57
- }
58
- }
1
+ export = SecureLS;
2
+
3
+ import * as LZString from 'lz-string';
4
+ import { CipherHelper, Encoder } from 'crypto-js';
5
+
6
+ declare class SecureLS {
7
+ constructor(config?: {
8
+ isCompression?: boolean;
9
+ encodingType?: string;
10
+ encryptionSecret?: string;
11
+ encryptionNamespace?: string;
12
+ });
13
+ getEncryptionSecret(): string;
14
+ get(key: string, isAllKeysData?: boolean): any;
15
+ getDataFromLocalStorage(key: string): string | null;
16
+ getAllKeys(): string[];
17
+ set(key: string, data: any): void;
18
+ setDataToLocalStorage(key: string, data: string): void;
19
+ remove(key: string): void;
20
+ removeAll(): void;
21
+ clear(): void;
22
+ resetAllKeys(): string[];
23
+ processData(data: any | string, isAllKeysData: boolean): string;
24
+ setMetaData(): void;
25
+ getMetaData(): { keys: string[] };
26
+
27
+ storage: Storage;
28
+
29
+ _name: string;
30
+ Base64: SecureLS.Base64;
31
+ LZString: LZString.LZStringStatic;
32
+ AES: CipherHelper;
33
+ DES: CipherHelper;
34
+ RABBIT: CipherHelper;
35
+ RC4: CipherHelper;
36
+ enc: {
37
+ Latin1: Encoder;
38
+ _Utf8: Encoder;
39
+ };
40
+ }
41
+
42
+ interface Storage {
43
+ readonly length: number;
44
+ clear(): void;
45
+ getItem(key: string): string | null;
46
+ key(index: number): string | null;
47
+ removeItem(key: string): void;
48
+ setItem(key: string, value: string): void;
49
+ [name: string]: any;
50
+ }
51
+
52
+ declare namespace SecureLS {
53
+ interface Base64 {
54
+ _keyStr: string;
55
+ encode(e: string): string;
56
+ decode(e: string): string;
57
+ }
58
+ }