@timum/timum_pdk 2.2.0 → 2.2.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.
@@ -1,50 +1,50 @@
1
- import { reactLocalStorage } from "reactjs-localstorage";
2
-
3
- function get(key, defaultValue = undefined, silent = true) {
4
- if (isLocalStorageAvailable()) {
5
- return reactLocalStorage.get(key, defaultValue, silent);
6
- } else {
7
- return undefined;
8
- }
9
- }
10
-
11
- function set(key, value) {
12
- if (isLocalStorageAvailable()) {
13
- reactLocalStorage.set(key, value);
14
- }
15
- }
16
-
17
- function getObject(key, defaultValue = {}, silent = true) {
18
- if (isLocalStorageAvailable()) {
19
- return reactLocalStorage.getObject(key, defaultValue, silent);
20
- } else {
21
- return undefined;
22
- }
23
- }
24
-
25
- function setObject(key, object) {
26
- if (isLocalStorageAvailable()) {
27
- return reactLocalStorage.setObject(key, object);
28
- }
29
- return undefined;
30
- }
31
-
32
- function isLocalStorageAvailable() {
33
- var test = "test";
34
- try {
35
- localStorage.setItem(test, test);
36
- localStorage.removeItem(test);
37
- return true;
38
- } catch (e) {
39
- return false;
40
- }
41
- }
42
-
43
- const failsaveStorage = {
44
- get,
45
- set,
46
- getObject,
47
- setObject,
48
- };
49
-
50
- export default failsaveStorage;
1
+ import { reactLocalStorage } from 'reactjs-localstorage';
2
+
3
+ function get(key, defaultValue = undefined, silent = true) {
4
+ if (isLocalStorageAvailable()) {
5
+ return reactLocalStorage.get(key, defaultValue, silent);
6
+ } else {
7
+ return undefined;
8
+ }
9
+ }
10
+
11
+ function set(key, value) {
12
+ if (isLocalStorageAvailable()) {
13
+ reactLocalStorage.set(key, value);
14
+ }
15
+ }
16
+
17
+ function getObject(key, defaultValue = {}, silent = true) {
18
+ if (isLocalStorageAvailable()) {
19
+ return reactLocalStorage.getObject(key, defaultValue, silent);
20
+ } else {
21
+ return undefined;
22
+ }
23
+ }
24
+
25
+ function setObject(key, object) {
26
+ if (isLocalStorageAvailable()) {
27
+ return reactLocalStorage.setObject(key, object);
28
+ }
29
+ return undefined;
30
+ }
31
+
32
+ function isLocalStorageAvailable() {
33
+ var test = 'test';
34
+ try {
35
+ localStorage.setItem(test, test);
36
+ localStorage.removeItem(test);
37
+ return true;
38
+ } catch (e) {
39
+ return false;
40
+ }
41
+ }
42
+
43
+ const failsaveStorage = {
44
+ get,
45
+ set,
46
+ getObject,
47
+ setObject,
48
+ };
49
+
50
+ export default failsaveStorage;
package/webpack.config.js CHANGED
@@ -1,12 +1,12 @@
1
- const path = require('path');
2
-
3
- module.exports = {
4
- entry: './src/index.js',
5
- output: {
6
- path: path.resolve(__dirname, 'dist'),
7
- library: {
8
- name: 'timumPdk',
9
- type: 'umd'
10
- },
11
- },
1
+ const path = require('path');
2
+
3
+ module.exports = {
4
+ entry: './src/index.js',
5
+ output: {
6
+ path: path.resolve(__dirname, 'dist'),
7
+ library: {
8
+ name: 'timumPdk',
9
+ type: 'umd'
10
+ },
11
+ },
12
12
  };
@@ -1,68 +0,0 @@
1
- /**
2
- * @license React
3
- * react-dom.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
10
-
11
- /**
12
- * @license React
13
- * react-is.production.min.js
14
- *
15
- * Copyright (c) Facebook, Inc. and its affiliates.
16
- *
17
- * This source code is licensed under the MIT license found in the
18
- * LICENSE file in the root directory of this source tree.
19
- */
20
-
21
- /**
22
- * @license React
23
- * react.production.min.js
24
- *
25
- * Copyright (c) Facebook, Inc. and its affiliates.
26
- *
27
- * This source code is licensed under the MIT license found in the
28
- * LICENSE file in the root directory of this source tree.
29
- */
30
-
31
- /**
32
- * @license React
33
- * scheduler.production.min.js
34
- *
35
- * Copyright (c) Facebook, Inc. and its affiliates.
36
- *
37
- * This source code is licensed under the MIT license found in the
38
- * LICENSE file in the root directory of this source tree.
39
- */
40
-
41
- /**
42
- * @license React
43
- * use-sync-external-store-shim.production.min.js
44
- *
45
- * Copyright (c) Facebook, Inc. and its affiliates.
46
- *
47
- * This source code is licensed under the MIT license found in the
48
- * LICENSE file in the root directory of this source tree.
49
- */
50
-
51
- /**
52
- * @license React
53
- * use-sync-external-store-shim/with-selector.production.min.js
54
- *
55
- * Copyright (c) Facebook, Inc. and its affiliates.
56
- *
57
- * This source code is licensed under the MIT license found in the
58
- * LICENSE file in the root directory of this source tree.
59
- */
60
-
61
- /** @license React v16.13.1
62
- * react-is.production.min.js
63
- *
64
- * Copyright (c) Facebook, Inc. and its affiliates.
65
- *
66
- * This source code is licensed under the MIT license found in the
67
- * LICENSE file in the root directory of this source tree.
68
- */