@@ -62,7 +62,7 @@ function analytics(config = {}) {
6262 // if (SERVER) {
6363 // console.log('INIT SERVER')
6464 // }
65-
65+
6666 /* Parse plugins array */
6767 const parsedOptions = ( config . plugins || [ ] ) . reduce ( ( acc , plugin ) => {
6868 if ( isFunction ( plugin ) ) {
@@ -125,7 +125,7 @@ function analytics(config = {}) {
125125 middlewares : [ ] ,
126126 events : [ ]
127127 } )
128-
128+
129129 /* Storage by default is set to global & is not persisted */
130130 const storage = ( config . storage ) ? config . storage : {
131131 getItem : get ,
@@ -160,7 +160,7 @@ function analytics(config = {}) {
160160 // throw new Error(`${ERROR_URL}3`)
161161 throw new Error ( 'Abort disabled inListener' )
162162 }
163-
163+
164164 // Parse URL parameters
165165 const params = paramsParse ( )
166166 // Initialize visitor information
@@ -177,8 +177,8 @@ function analytics(config = {}) {
177177 }
178178
179179 /**
180- * Async Management methods for plugins.
181- *
180+ * Async Management methods for plugins.
181+ *
182182 * This is also where [custom methods](https://bit.ly/329vFXy) are loaded into the instance.
183183 * @typedef {Object } Plugins
184184 * @property {EnablePlugin } enable - Set storage value
@@ -275,7 +275,7 @@ function analytics(config = {}) {
275275 // Merge in custom plugin methods
276276 ...parsedOptions . methods
277277 }
278-
278+
279279 let readyCalled = false
280280 /**
281281 * Analytic instance returned from initialization
@@ -289,7 +289,7 @@ function analytics(config = {}) {
289289 * @property {On } on - Fire callback on analytics lifecycle events.
290290 * @property {Once } once - Fire callback on analytics lifecycle events once.
291291 * @property {GetState } getState - Get data about user, activity, or context.
292- * @property {Storage } storage - storage methods
292+ * @property {AnalyticsStorage } storage - storage methods
293293 * @property {Plugins } plugins - plugin methods
294294 */
295295 const instance = {
@@ -363,7 +363,7 @@ function analytics(config = {}) {
363363 * Track an analytics event. This will trigger `track` calls in any installed plugins
364364 * @typedef {Function } Track
365365 * @param {String } eventName - Event name
366- * @param {Object } [payload] - Event payload
366+ * @param {TrackData } [payload] - Event payload
367367 * @param {Object } [options] - Event options
368368 * @param {Function } [callback] - Callback to fire after tracking completes
369369 * @returns {Promise }
@@ -733,7 +733,7 @@ function analytics(config = {}) {
733733 /**
734734 * Storage utilities for persisting data.
735735 * These methods will allow you to save data in localStorage, cookies, or to the window.
736- * @typedef {Object } Storage
736+ * @typedef {Object } AnalyticsStorage
737737 * @property {GetItem } getItem - Get value from storage
738738 * @property {SetItem } setItem - Set storage value
739739 * @property {RemoveItem } removeItem - Remove storage value
@@ -887,7 +887,7 @@ function analytics(config = {}) {
887887 }
888888 return acc
889889 } , { } )
890-
890+
891891 const initialState = {
892892 context : initialConfig ,
893893 user : visitorInfo ,
@@ -941,7 +941,7 @@ function analytics(config = {}) {
941941
942942 const enabledPlugins = pluginKeys . filter ( ( name ) => parsedOptions . pluginEnabled [ name ] )
943943 const disabledPlugins = pluginKeys . filter ( ( name ) => ! parsedOptions . pluginEnabled [ name ] )
944-
944+
945945 /* Register analytic plugins */
946946 store . dispatch ( {
947947 type : EVENTS . registerPlugins ,
0 commit comments