@@ -5,7 +5,7 @@ import { IRequestInfo } from "./models/IRequestInfo.js";
55import { IUserInfo } from './models/IUserInfo.js' ;
66import { ContextData } from './plugins/ContextData.js' ;
77import { EventPluginContext } from './plugins/EventPluginContext.js' ;
8- import { Utils } from ' ./Utils.js' ;
8+ import { addRange , stringify , isEmpty } from " ./Utils.js" ;
99
1010export class EventBuilder {
1111 public target : IEvent ;
@@ -148,6 +148,11 @@ export class EventBuilder {
148148 return this ;
149149 }
150150
151+ /**
152+ * Sets the event value.
153+ * @param value The value of the event.
154+ * @returns {EventBuilder }
155+ */
151156 public setValue ( value : number ) : EventBuilder {
152157 if ( value ) {
153158 this . target . value = value ;
@@ -157,7 +162,7 @@ export class EventBuilder {
157162 }
158163
159164 public addTags ( ...tags : string [ ] ) : EventBuilder {
160- this . target . tags = Utils . addRange < string > ( this . target . tags , ...tags ) ;
165+ this . target . tags = addRange < string > ( this . target . tags , ...tags ) ;
161166 return this ;
162167 }
163168
@@ -178,8 +183,8 @@ export class EventBuilder {
178183 this . target . data = { } ;
179184 }
180185
181- const result = JSON . parse ( Utils . stringify ( value , this . client . config . dataExclusions . concat ( excludedPropertyNames || [ ] ) , maxDepth ) ) ;
182- if ( ! Utils . isEmpty ( result ) ) {
186+ const result = JSON . parse ( stringify ( value , this . client . config . dataExclusions . concat ( excludedPropertyNames || [ ] ) , maxDepth ) ) ;
187+ if ( ! isEmpty ( result ) ) {
183188 this . target . data [ name ] = result ;
184189 }
185190
0 commit comments