@rxap/ngx-memory 19.0.1-dev.4 → 19.0.1-dev.5
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.md +4 -0
- package/README.md +24 -25
- package/compodoc/changelog.html +2 -0
- package/compodoc/index.html +26 -17
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +4 -1
- package/docs/documentation.json +458 -387
- package/docs/html/assets/hierarchy.js +1 -0
- package/docs/{assets → html/assets}/highlight.css +13 -6
- package/docs/html/assets/icons.js +18 -0
- package/docs/html/assets/icons.svg +1 -0
- package/docs/{assets → html/assets}/main.js +5 -4
- package/docs/html/assets/navigation.js +1 -0
- package/docs/html/assets/search.js +1 -0
- package/docs/html/assets/style.css +1611 -0
- package/docs/html/classes/EphemeralStorageService.html +13 -0
- package/docs/html/classes/LocalStorageService.html +13 -0
- package/docs/html/classes/MockStorage.html +25 -0
- package/docs/html/classes/SessionStorageService.html +13 -0
- package/docs/html/classes/StorageService.html +13 -0
- package/docs/html/functions/LocalStorage.html +5 -0
- package/docs/html/functions/SessionStorage.html +5 -0
- package/docs/html/functions/StorageGet.html +1 -0
- package/docs/html/functions/StorageHas.html +1 -0
- package/docs/html/functions/StorageKey.html +1 -0
- package/docs/html/functions/StorageRemove.html +1 -0
- package/docs/html/functions/StorageSet.html +1 -0
- package/docs/html/functions/WebStorage.html +1 -0
- package/docs/html/functions/getExpired.html +1 -0
- package/docs/html/functions/stringify.html +1 -0
- package/docs/html/hierarchy.html +1 -0
- package/docs/html/index.html +33 -0
- package/docs/html/modules.html +1 -0
- package/docs/html/types/ExpiredUnit.html +9 -0
- package/docs/html/variables/isBrowser.html +4 -0
- package/docs/markdown/README.md +37 -0
- package/docs/markdown/classes/EphemeralStorageService.md +151 -0
- package/docs/markdown/classes/LocalStorageService.md +151 -0
- package/docs/markdown/classes/MockStorage.md +189 -0
- package/docs/markdown/classes/SessionStorageService.md +151 -0
- package/docs/markdown/classes/StorageService.md +135 -0
- package/docs/markdown/functions/LocalStorage.md +51 -0
- package/docs/markdown/functions/SessionStorage.md +51 -0
- package/docs/markdown/functions/StorageGet.md +25 -0
- package/docs/markdown/functions/StorageHas.md +25 -0
- package/docs/markdown/functions/StorageKey.md +25 -0
- package/docs/markdown/functions/StorageRemove.md +25 -0
- package/docs/markdown/functions/StorageSet.md +37 -0
- package/docs/markdown/functions/WebStorage.md +49 -0
- package/docs/markdown/functions/getExpired.md +25 -0
- package/docs/markdown/functions/stringify.md +21 -0
- package/docs/markdown/globals.md +34 -0
- package/docs/markdown/type-aliases/ExpiredUnit.md +20 -0
- package/docs/markdown/variables/isBrowser.md +15 -0
- package/docs/wiki/Class.EphemeralStorageService.md +147 -0
- package/docs/wiki/Class.LocalStorageService.md +147 -0
- package/docs/wiki/Class.MockStorage.md +185 -0
- package/docs/wiki/Class.SessionStorageService.md +147 -0
- package/docs/wiki/Class.StorageService.md +131 -0
- package/docs/wiki/Function.LocalStorage.md +47 -0
- package/docs/wiki/Function.SessionStorage.md +47 -0
- package/docs/wiki/Function.StorageGet.md +21 -0
- package/docs/wiki/Function.StorageHas.md +21 -0
- package/docs/wiki/Function.StorageKey.md +21 -0
- package/docs/wiki/Function.StorageRemove.md +21 -0
- package/docs/wiki/Function.StorageSet.md +33 -0
- package/docs/wiki/Function.WebStorage.md +45 -0
- package/docs/wiki/Function.getExpired.md +21 -0
- package/docs/wiki/Function.stringify.md +17 -0
- package/docs/wiki/Home.md +33 -0
- package/docs/wiki/TypeAlias.ExpiredUnit.md +16 -0
- package/docs/wiki/Variable.isBrowser.md +11 -0
- package/docs/wiki/_Sidebar.md +30 -0
- package/docs/wiki/globals.md +30 -0
- package/package.json +4 -2
- package/docs/assets/icons.js +0 -15
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1412
- package/docs/classes/EphemeralStorageService.html +0 -13
- package/docs/classes/LocalStorageService.html +0 -13
- package/docs/classes/MockStorage.html +0 -9
- package/docs/classes/SessionStorageService.html +0 -13
- package/docs/classes/StorageService.html +0 -14
- package/docs/functions/LocalStorage.html +0 -5
- package/docs/functions/SessionStorage.html +0 -5
- package/docs/functions/StorageGet.html +0 -1
- package/docs/functions/StorageHas.html +0 -1
- package/docs/functions/StorageKey.html +0 -1
- package/docs/functions/StorageRemove.html +0 -1
- package/docs/functions/StorageSet.html +0 -1
- package/docs/functions/WebStorage.html +0 -1
- package/docs/functions/getExpired.html +0 -1
- package/docs/functions/stringify.html +0 -1
- package/docs/hierarchy.html +0 -1
- package/docs/index.html +0 -25
- package/docs/modules.html +0 -18
- package/docs/types/ExpiredUnit.html +0 -9
- package/docs/variables/isBrowser.html +0 -4
- /package/docs/{.nojekyll → html/.nojekyll} +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
[**@rxap/ngx-memory**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rxap/ngx-memory](../globals.md) / EphemeralStorageService
|
|
6
|
+
|
|
7
|
+
# Class: EphemeralStorageService
|
|
8
|
+
|
|
9
|
+
Defined in: [ephemeral-storage.service.ts:6](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/ephemeral-storage.service.ts#L6)
|
|
10
|
+
|
|
11
|
+
## Extends
|
|
12
|
+
|
|
13
|
+
- [`StorageService`](StorageService.md)
|
|
14
|
+
|
|
15
|
+
## Constructors
|
|
16
|
+
|
|
17
|
+
### new EphemeralStorageService()
|
|
18
|
+
|
|
19
|
+
> **new EphemeralStorageService**(): [`EphemeralStorageService`](EphemeralStorageService.md)
|
|
20
|
+
|
|
21
|
+
Defined in: [ephemeral-storage.service.ts:8](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/ephemeral-storage.service.ts#L8)
|
|
22
|
+
|
|
23
|
+
#### Returns
|
|
24
|
+
|
|
25
|
+
[`EphemeralStorageService`](EphemeralStorageService.md)
|
|
26
|
+
|
|
27
|
+
#### Overrides
|
|
28
|
+
|
|
29
|
+
[`StorageService`](StorageService.md).[`constructor`](StorageService.md#constructors)
|
|
30
|
+
|
|
31
|
+
## Methods
|
|
32
|
+
|
|
33
|
+
### clear()
|
|
34
|
+
|
|
35
|
+
> **clear**(): `void`
|
|
36
|
+
|
|
37
|
+
Defined in: [storage.service.ts:50](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L50)
|
|
38
|
+
|
|
39
|
+
#### Returns
|
|
40
|
+
|
|
41
|
+
`void`
|
|
42
|
+
|
|
43
|
+
#### Inherited from
|
|
44
|
+
|
|
45
|
+
[`StorageService`](StorageService.md).[`clear`](StorageService.md#clear)
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### get()
|
|
50
|
+
|
|
51
|
+
> **get**(`key`): `any`
|
|
52
|
+
|
|
53
|
+
Defined in: [storage.service.ts:19](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L19)
|
|
54
|
+
|
|
55
|
+
#### Parameters
|
|
56
|
+
|
|
57
|
+
##### key
|
|
58
|
+
|
|
59
|
+
`string`
|
|
60
|
+
|
|
61
|
+
#### Returns
|
|
62
|
+
|
|
63
|
+
`any`
|
|
64
|
+
|
|
65
|
+
#### Inherited from
|
|
66
|
+
|
|
67
|
+
[`StorageService`](StorageService.md).[`get`](StorageService.md#get)
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### has()
|
|
72
|
+
|
|
73
|
+
> **has**(`key`): `boolean`
|
|
74
|
+
|
|
75
|
+
Defined in: [storage.service.ts:15](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L15)
|
|
76
|
+
|
|
77
|
+
#### Parameters
|
|
78
|
+
|
|
79
|
+
##### key
|
|
80
|
+
|
|
81
|
+
`string`
|
|
82
|
+
|
|
83
|
+
#### Returns
|
|
84
|
+
|
|
85
|
+
`boolean`
|
|
86
|
+
|
|
87
|
+
#### Inherited from
|
|
88
|
+
|
|
89
|
+
[`StorageService`](StorageService.md).[`has`](StorageService.md#has)
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### remove()
|
|
94
|
+
|
|
95
|
+
> **remove**(`key`): `void`
|
|
96
|
+
|
|
97
|
+
Defined in: [storage.service.ts:33](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L33)
|
|
98
|
+
|
|
99
|
+
Removes the specified key, e.g.:
|
|
100
|
+
- `remove('key')` Remove `key` key
|
|
101
|
+
- `remove(/BMap_\w+/)` Bulk delete all keys starting with BMap_
|
|
102
|
+
|
|
103
|
+
#### Parameters
|
|
104
|
+
|
|
105
|
+
##### key
|
|
106
|
+
|
|
107
|
+
key name or regular expression
|
|
108
|
+
|
|
109
|
+
`string` | `RegExp`
|
|
110
|
+
|
|
111
|
+
#### Returns
|
|
112
|
+
|
|
113
|
+
`void`
|
|
114
|
+
|
|
115
|
+
#### Inherited from
|
|
116
|
+
|
|
117
|
+
[`StorageService`](StorageService.md).[`remove`](StorageService.md#remove)
|
|
118
|
+
|
|
119
|
+
***
|
|
120
|
+
|
|
121
|
+
### set()
|
|
122
|
+
|
|
123
|
+
> **set**(`key`, `value`, `expiredAt`, `expiredUnit`): `void`
|
|
124
|
+
|
|
125
|
+
Defined in: [storage.service.ts:23](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L23)
|
|
126
|
+
|
|
127
|
+
#### Parameters
|
|
128
|
+
|
|
129
|
+
##### key
|
|
130
|
+
|
|
131
|
+
`string`
|
|
132
|
+
|
|
133
|
+
##### value
|
|
134
|
+
|
|
135
|
+
`any`
|
|
136
|
+
|
|
137
|
+
##### expiredAt
|
|
138
|
+
|
|
139
|
+
`number` = `0`
|
|
140
|
+
|
|
141
|
+
##### expiredUnit
|
|
142
|
+
|
|
143
|
+
[`ExpiredUnit`](../type-aliases/ExpiredUnit.md) = `'d'`
|
|
144
|
+
|
|
145
|
+
#### Returns
|
|
146
|
+
|
|
147
|
+
`void`
|
|
148
|
+
|
|
149
|
+
#### Inherited from
|
|
150
|
+
|
|
151
|
+
[`StorageService`](StorageService.md).[`set`](StorageService.md#set)
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
[**@rxap/ngx-memory**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rxap/ngx-memory](../globals.md) / LocalStorageService
|
|
6
|
+
|
|
7
|
+
# Class: LocalStorageService
|
|
8
|
+
|
|
9
|
+
Defined in: [local-storage.service.ts:6](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/local-storage.service.ts#L6)
|
|
10
|
+
|
|
11
|
+
## Extends
|
|
12
|
+
|
|
13
|
+
- [`StorageService`](StorageService.md)
|
|
14
|
+
|
|
15
|
+
## Constructors
|
|
16
|
+
|
|
17
|
+
### new LocalStorageService()
|
|
18
|
+
|
|
19
|
+
> **new LocalStorageService**(): [`LocalStorageService`](LocalStorageService.md)
|
|
20
|
+
|
|
21
|
+
Defined in: [local-storage.service.ts:7](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/local-storage.service.ts#L7)
|
|
22
|
+
|
|
23
|
+
#### Returns
|
|
24
|
+
|
|
25
|
+
[`LocalStorageService`](LocalStorageService.md)
|
|
26
|
+
|
|
27
|
+
#### Overrides
|
|
28
|
+
|
|
29
|
+
[`StorageService`](StorageService.md).[`constructor`](StorageService.md#constructors)
|
|
30
|
+
|
|
31
|
+
## Methods
|
|
32
|
+
|
|
33
|
+
### clear()
|
|
34
|
+
|
|
35
|
+
> **clear**(): `void`
|
|
36
|
+
|
|
37
|
+
Defined in: [storage.service.ts:50](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L50)
|
|
38
|
+
|
|
39
|
+
#### Returns
|
|
40
|
+
|
|
41
|
+
`void`
|
|
42
|
+
|
|
43
|
+
#### Inherited from
|
|
44
|
+
|
|
45
|
+
[`StorageService`](StorageService.md).[`clear`](StorageService.md#clear)
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### get()
|
|
50
|
+
|
|
51
|
+
> **get**(`key`): `any`
|
|
52
|
+
|
|
53
|
+
Defined in: [storage.service.ts:19](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L19)
|
|
54
|
+
|
|
55
|
+
#### Parameters
|
|
56
|
+
|
|
57
|
+
##### key
|
|
58
|
+
|
|
59
|
+
`string`
|
|
60
|
+
|
|
61
|
+
#### Returns
|
|
62
|
+
|
|
63
|
+
`any`
|
|
64
|
+
|
|
65
|
+
#### Inherited from
|
|
66
|
+
|
|
67
|
+
[`StorageService`](StorageService.md).[`get`](StorageService.md#get)
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### has()
|
|
72
|
+
|
|
73
|
+
> **has**(`key`): `boolean`
|
|
74
|
+
|
|
75
|
+
Defined in: [storage.service.ts:15](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L15)
|
|
76
|
+
|
|
77
|
+
#### Parameters
|
|
78
|
+
|
|
79
|
+
##### key
|
|
80
|
+
|
|
81
|
+
`string`
|
|
82
|
+
|
|
83
|
+
#### Returns
|
|
84
|
+
|
|
85
|
+
`boolean`
|
|
86
|
+
|
|
87
|
+
#### Inherited from
|
|
88
|
+
|
|
89
|
+
[`StorageService`](StorageService.md).[`has`](StorageService.md#has)
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### remove()
|
|
94
|
+
|
|
95
|
+
> **remove**(`key`): `void`
|
|
96
|
+
|
|
97
|
+
Defined in: [storage.service.ts:33](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L33)
|
|
98
|
+
|
|
99
|
+
Removes the specified key, e.g.:
|
|
100
|
+
- `remove('key')` Remove `key` key
|
|
101
|
+
- `remove(/BMap_\w+/)` Bulk delete all keys starting with BMap_
|
|
102
|
+
|
|
103
|
+
#### Parameters
|
|
104
|
+
|
|
105
|
+
##### key
|
|
106
|
+
|
|
107
|
+
key name or regular expression
|
|
108
|
+
|
|
109
|
+
`string` | `RegExp`
|
|
110
|
+
|
|
111
|
+
#### Returns
|
|
112
|
+
|
|
113
|
+
`void`
|
|
114
|
+
|
|
115
|
+
#### Inherited from
|
|
116
|
+
|
|
117
|
+
[`StorageService`](StorageService.md).[`remove`](StorageService.md#remove)
|
|
118
|
+
|
|
119
|
+
***
|
|
120
|
+
|
|
121
|
+
### set()
|
|
122
|
+
|
|
123
|
+
> **set**(`key`, `value`, `expiredAt`, `expiredUnit`): `void`
|
|
124
|
+
|
|
125
|
+
Defined in: [storage.service.ts:23](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L23)
|
|
126
|
+
|
|
127
|
+
#### Parameters
|
|
128
|
+
|
|
129
|
+
##### key
|
|
130
|
+
|
|
131
|
+
`string`
|
|
132
|
+
|
|
133
|
+
##### value
|
|
134
|
+
|
|
135
|
+
`any`
|
|
136
|
+
|
|
137
|
+
##### expiredAt
|
|
138
|
+
|
|
139
|
+
`number` = `0`
|
|
140
|
+
|
|
141
|
+
##### expiredUnit
|
|
142
|
+
|
|
143
|
+
[`ExpiredUnit`](../type-aliases/ExpiredUnit.md) = `'d'`
|
|
144
|
+
|
|
145
|
+
#### Returns
|
|
146
|
+
|
|
147
|
+
`void`
|
|
148
|
+
|
|
149
|
+
#### Inherited from
|
|
150
|
+
|
|
151
|
+
[`StorageService`](StorageService.md).[`set`](StorageService.md#set)
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
[**@rxap/ngx-memory**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rxap/ngx-memory](../globals.md) / MockStorage
|
|
6
|
+
|
|
7
|
+
# Class: MockStorage
|
|
8
|
+
|
|
9
|
+
Defined in: [storage-utility.ts:110](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage-utility.ts#L110)
|
|
10
|
+
|
|
11
|
+
## Implements
|
|
12
|
+
|
|
13
|
+
- `Storage`
|
|
14
|
+
|
|
15
|
+
## Constructors
|
|
16
|
+
|
|
17
|
+
### new MockStorage()
|
|
18
|
+
|
|
19
|
+
> **new MockStorage**(): [`MockStorage`](MockStorage.md)
|
|
20
|
+
|
|
21
|
+
#### Returns
|
|
22
|
+
|
|
23
|
+
[`MockStorage`](MockStorage.md)
|
|
24
|
+
|
|
25
|
+
## Properties
|
|
26
|
+
|
|
27
|
+
### cache
|
|
28
|
+
|
|
29
|
+
> **cache**: `Record`\<`string`, `string`\> = `{}`
|
|
30
|
+
|
|
31
|
+
Defined in: [storage-utility.ts:112](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage-utility.ts#L112)
|
|
32
|
+
|
|
33
|
+
## Accessors
|
|
34
|
+
|
|
35
|
+
### length
|
|
36
|
+
|
|
37
|
+
#### Get Signature
|
|
38
|
+
|
|
39
|
+
> **get** **length**(): `number`
|
|
40
|
+
|
|
41
|
+
Defined in: [storage-utility.ts:114](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage-utility.ts#L114)
|
|
42
|
+
|
|
43
|
+
Returns the number of key/value pairs.
|
|
44
|
+
|
|
45
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/length)
|
|
46
|
+
|
|
47
|
+
##### Returns
|
|
48
|
+
|
|
49
|
+
`number`
|
|
50
|
+
|
|
51
|
+
#### Implementation of
|
|
52
|
+
|
|
53
|
+
`Storage.length`
|
|
54
|
+
|
|
55
|
+
## Methods
|
|
56
|
+
|
|
57
|
+
### clear()
|
|
58
|
+
|
|
59
|
+
> **clear**(): `void`
|
|
60
|
+
|
|
61
|
+
Defined in: [storage-utility.ts:136](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage-utility.ts#L136)
|
|
62
|
+
|
|
63
|
+
Removes all key/value pairs, if there are any.
|
|
64
|
+
|
|
65
|
+
Dispatches a storage event on Window objects holding an equivalent Storage object.
|
|
66
|
+
|
|
67
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/clear)
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`void`
|
|
72
|
+
|
|
73
|
+
#### Implementation of
|
|
74
|
+
|
|
75
|
+
`Storage.clear`
|
|
76
|
+
|
|
77
|
+
***
|
|
78
|
+
|
|
79
|
+
### getItem()
|
|
80
|
+
|
|
81
|
+
> **getItem**(`key`): `null` \| `string`
|
|
82
|
+
|
|
83
|
+
Defined in: [storage-utility.ts:118](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage-utility.ts#L118)
|
|
84
|
+
|
|
85
|
+
Returns the current value associated with the given key, or null if the given key does not exist.
|
|
86
|
+
|
|
87
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/getItem)
|
|
88
|
+
|
|
89
|
+
#### Parameters
|
|
90
|
+
|
|
91
|
+
##### key
|
|
92
|
+
|
|
93
|
+
`string`
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`null` \| `string`
|
|
98
|
+
|
|
99
|
+
#### Implementation of
|
|
100
|
+
|
|
101
|
+
`Storage.getItem`
|
|
102
|
+
|
|
103
|
+
***
|
|
104
|
+
|
|
105
|
+
### key()
|
|
106
|
+
|
|
107
|
+
> **key**(`index`): `null` \| `string`
|
|
108
|
+
|
|
109
|
+
Defined in: [storage-utility.ts:122](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage-utility.ts#L122)
|
|
110
|
+
|
|
111
|
+
Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs.
|
|
112
|
+
|
|
113
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/key)
|
|
114
|
+
|
|
115
|
+
#### Parameters
|
|
116
|
+
|
|
117
|
+
##### index
|
|
118
|
+
|
|
119
|
+
`number`
|
|
120
|
+
|
|
121
|
+
#### Returns
|
|
122
|
+
|
|
123
|
+
`null` \| `string`
|
|
124
|
+
|
|
125
|
+
#### Implementation of
|
|
126
|
+
|
|
127
|
+
`Storage.key`
|
|
128
|
+
|
|
129
|
+
***
|
|
130
|
+
|
|
131
|
+
### removeItem()
|
|
132
|
+
|
|
133
|
+
> **removeItem**(`key`): `void`
|
|
134
|
+
|
|
135
|
+
Defined in: [storage-utility.ts:126](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage-utility.ts#L126)
|
|
136
|
+
|
|
137
|
+
Removes the key/value pair with the given key, if a key/value pair with the given key exists.
|
|
138
|
+
|
|
139
|
+
Dispatches a storage event on Window objects holding an equivalent Storage object.
|
|
140
|
+
|
|
141
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/removeItem)
|
|
142
|
+
|
|
143
|
+
#### Parameters
|
|
144
|
+
|
|
145
|
+
##### key
|
|
146
|
+
|
|
147
|
+
`string`
|
|
148
|
+
|
|
149
|
+
#### Returns
|
|
150
|
+
|
|
151
|
+
`void`
|
|
152
|
+
|
|
153
|
+
#### Implementation of
|
|
154
|
+
|
|
155
|
+
`Storage.removeItem`
|
|
156
|
+
|
|
157
|
+
***
|
|
158
|
+
|
|
159
|
+
### setItem()
|
|
160
|
+
|
|
161
|
+
> **setItem**(`key`, `value`): `void`
|
|
162
|
+
|
|
163
|
+
Defined in: [storage-utility.ts:132](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage-utility.ts#L132)
|
|
164
|
+
|
|
165
|
+
Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
|
|
166
|
+
|
|
167
|
+
Throws a "QuotaExceededError" DOMException exception if the new value couldn't be set. (Setting could fail if, e.g., the user has disabled storage for the site, or if the quota has been exceeded.)
|
|
168
|
+
|
|
169
|
+
Dispatches a storage event on Window objects holding an equivalent Storage object.
|
|
170
|
+
|
|
171
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/setItem)
|
|
172
|
+
|
|
173
|
+
#### Parameters
|
|
174
|
+
|
|
175
|
+
##### key
|
|
176
|
+
|
|
177
|
+
`string`
|
|
178
|
+
|
|
179
|
+
##### value
|
|
180
|
+
|
|
181
|
+
`string`
|
|
182
|
+
|
|
183
|
+
#### Returns
|
|
184
|
+
|
|
185
|
+
`void`
|
|
186
|
+
|
|
187
|
+
#### Implementation of
|
|
188
|
+
|
|
189
|
+
`Storage.setItem`
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
[**@rxap/ngx-memory**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rxap/ngx-memory](../globals.md) / SessionStorageService
|
|
6
|
+
|
|
7
|
+
# Class: SessionStorageService
|
|
8
|
+
|
|
9
|
+
Defined in: [session-storage.service.ts:6](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/session-storage.service.ts#L6)
|
|
10
|
+
|
|
11
|
+
## Extends
|
|
12
|
+
|
|
13
|
+
- [`StorageService`](StorageService.md)
|
|
14
|
+
|
|
15
|
+
## Constructors
|
|
16
|
+
|
|
17
|
+
### new SessionStorageService()
|
|
18
|
+
|
|
19
|
+
> **new SessionStorageService**(): [`SessionStorageService`](SessionStorageService.md)
|
|
20
|
+
|
|
21
|
+
Defined in: [session-storage.service.ts:7](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/session-storage.service.ts#L7)
|
|
22
|
+
|
|
23
|
+
#### Returns
|
|
24
|
+
|
|
25
|
+
[`SessionStorageService`](SessionStorageService.md)
|
|
26
|
+
|
|
27
|
+
#### Overrides
|
|
28
|
+
|
|
29
|
+
[`StorageService`](StorageService.md).[`constructor`](StorageService.md#constructors)
|
|
30
|
+
|
|
31
|
+
## Methods
|
|
32
|
+
|
|
33
|
+
### clear()
|
|
34
|
+
|
|
35
|
+
> **clear**(): `void`
|
|
36
|
+
|
|
37
|
+
Defined in: [storage.service.ts:50](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L50)
|
|
38
|
+
|
|
39
|
+
#### Returns
|
|
40
|
+
|
|
41
|
+
`void`
|
|
42
|
+
|
|
43
|
+
#### Inherited from
|
|
44
|
+
|
|
45
|
+
[`StorageService`](StorageService.md).[`clear`](StorageService.md#clear)
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### get()
|
|
50
|
+
|
|
51
|
+
> **get**(`key`): `any`
|
|
52
|
+
|
|
53
|
+
Defined in: [storage.service.ts:19](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L19)
|
|
54
|
+
|
|
55
|
+
#### Parameters
|
|
56
|
+
|
|
57
|
+
##### key
|
|
58
|
+
|
|
59
|
+
`string`
|
|
60
|
+
|
|
61
|
+
#### Returns
|
|
62
|
+
|
|
63
|
+
`any`
|
|
64
|
+
|
|
65
|
+
#### Inherited from
|
|
66
|
+
|
|
67
|
+
[`StorageService`](StorageService.md).[`get`](StorageService.md#get)
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### has()
|
|
72
|
+
|
|
73
|
+
> **has**(`key`): `boolean`
|
|
74
|
+
|
|
75
|
+
Defined in: [storage.service.ts:15](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L15)
|
|
76
|
+
|
|
77
|
+
#### Parameters
|
|
78
|
+
|
|
79
|
+
##### key
|
|
80
|
+
|
|
81
|
+
`string`
|
|
82
|
+
|
|
83
|
+
#### Returns
|
|
84
|
+
|
|
85
|
+
`boolean`
|
|
86
|
+
|
|
87
|
+
#### Inherited from
|
|
88
|
+
|
|
89
|
+
[`StorageService`](StorageService.md).[`has`](StorageService.md#has)
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### remove()
|
|
94
|
+
|
|
95
|
+
> **remove**(`key`): `void`
|
|
96
|
+
|
|
97
|
+
Defined in: [storage.service.ts:33](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L33)
|
|
98
|
+
|
|
99
|
+
Removes the specified key, e.g.:
|
|
100
|
+
- `remove('key')` Remove `key` key
|
|
101
|
+
- `remove(/BMap_\w+/)` Bulk delete all keys starting with BMap_
|
|
102
|
+
|
|
103
|
+
#### Parameters
|
|
104
|
+
|
|
105
|
+
##### key
|
|
106
|
+
|
|
107
|
+
key name or regular expression
|
|
108
|
+
|
|
109
|
+
`string` | `RegExp`
|
|
110
|
+
|
|
111
|
+
#### Returns
|
|
112
|
+
|
|
113
|
+
`void`
|
|
114
|
+
|
|
115
|
+
#### Inherited from
|
|
116
|
+
|
|
117
|
+
[`StorageService`](StorageService.md).[`remove`](StorageService.md#remove)
|
|
118
|
+
|
|
119
|
+
***
|
|
120
|
+
|
|
121
|
+
### set()
|
|
122
|
+
|
|
123
|
+
> **set**(`key`, `value`, `expiredAt`, `expiredUnit`): `void`
|
|
124
|
+
|
|
125
|
+
Defined in: [storage.service.ts:23](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/memory/src/lib/storage.service.ts#L23)
|
|
126
|
+
|
|
127
|
+
#### Parameters
|
|
128
|
+
|
|
129
|
+
##### key
|
|
130
|
+
|
|
131
|
+
`string`
|
|
132
|
+
|
|
133
|
+
##### value
|
|
134
|
+
|
|
135
|
+
`any`
|
|
136
|
+
|
|
137
|
+
##### expiredAt
|
|
138
|
+
|
|
139
|
+
`number` = `0`
|
|
140
|
+
|
|
141
|
+
##### expiredUnit
|
|
142
|
+
|
|
143
|
+
[`ExpiredUnit`](../type-aliases/ExpiredUnit.md) = `'d'`
|
|
144
|
+
|
|
145
|
+
#### Returns
|
|
146
|
+
|
|
147
|
+
`void`
|
|
148
|
+
|
|
149
|
+
#### Inherited from
|
|
150
|
+
|
|
151
|
+
[`StorageService`](StorageService.md).[`set`](StorageService.md#set)
|