@@ -62,7 +62,7 @@ function analytics(config = {}) {
62
62
// if (SERVER) {
63
63
// console.log('INIT SERVER')
64
64
// }
65
-
65
+
66
66
/* Parse plugins array */
67
67
const parsedOptions = ( config . plugins || [ ] ) . reduce ( ( acc , plugin ) => {
68
68
if ( isFunction ( plugin ) ) {
@@ -125,7 +125,7 @@ function analytics(config = {}) {
125
125
middlewares : [ ] ,
126
126
events : [ ]
127
127
} )
128
-
128
+
129
129
/* Storage by default is set to global & is not persisted */
130
130
const storage = ( config . storage ) ? config . storage : {
131
131
getItem : get ,
@@ -160,7 +160,7 @@ function analytics(config = {}) {
160
160
// throw new Error(`${ERROR_URL}3`)
161
161
throw new Error ( 'Abort disabled inListener' )
162
162
}
163
-
163
+
164
164
// Parse URL parameters
165
165
const params = paramsParse ( )
166
166
// Initialize visitor information
@@ -177,8 +177,8 @@ function analytics(config = {}) {
177
177
}
178
178
179
179
/**
180
- * Async Management methods for plugins.
181
- *
180
+ * Async Management methods for plugins.
181
+ *
182
182
* This is also where [custom methods](https://bit.ly/329vFXy) are loaded into the instance.
183
183
* @typedef {Object } Plugins
184
184
* @property {EnablePlugin } enable - Set storage value
@@ -275,7 +275,7 @@ function analytics(config = {}) {
275
275
// Merge in custom plugin methods
276
276
...parsedOptions . methods
277
277
}
278
-
278
+
279
279
let readyCalled = false
280
280
/**
281
281
* Analytic instance returned from initialization
@@ -289,7 +289,7 @@ function analytics(config = {}) {
289
289
* @property {On } on - Fire callback on analytics lifecycle events.
290
290
* @property {Once } once - Fire callback on analytics lifecycle events once.
291
291
* @property {GetState } getState - Get data about user, activity, or context.
292
- * @property {Storage } storage - storage methods
292
+ * @property {AnalyticsStorage } storage - storage methods
293
293
* @property {Plugins } plugins - plugin methods
294
294
*/
295
295
const instance = {
@@ -733,7 +733,7 @@ function analytics(config = {}) {
733
733
/**
734
734
* Storage utilities for persisting data.
735
735
* These methods will allow you to save data in localStorage, cookies, or to the window.
736
- * @typedef {Object } Storage
736
+ * @typedef {Object } AnalyticsStorage
737
737
* @property {GetItem } getItem - Get value from storage
738
738
* @property {SetItem } setItem - Set storage value
739
739
* @property {RemoveItem } removeItem - Remove storage value
@@ -887,7 +887,7 @@ function analytics(config = {}) {
887
887
}
888
888
return acc
889
889
} , { } )
890
-
890
+
891
891
const initialState = {
892
892
context : initialConfig ,
893
893
user : visitorInfo ,
@@ -941,7 +941,7 @@ function analytics(config = {}) {
941
941
942
942
const enabledPlugins = pluginKeys . filter ( ( name ) => parsedOptions . pluginEnabled [ name ] )
943
943
const disabledPlugins = pluginKeys . filter ( ( name ) => ! parsedOptions . pluginEnabled [ name ] )
944
-
944
+
945
945
/* Register analytic plugins */
946
946
store . dispatch ( {
947
947
type : EVENTS . registerPlugins ,
0 commit comments