@adtrackify/at-tracking-event-types 1.0.31 → 1.0.34
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/build.js +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +5199 -3
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/utils/fake-tracking-event-generator.ts +3 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './types';
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './utils';
|
|
@@ -196,7 +196,9 @@ export const choasFake = <T>(input?: T): T | undefined | null => {
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
|
|
199
|
-
export function randomEnum<T
|
|
199
|
+
export function randomEnum<T extends {
|
|
200
|
+
[ s: string ]: unknown;
|
|
201
|
+
}>(anEnum: T): T[ keyof T ] {
|
|
200
202
|
const enumValues = (Object.values(anEnum) as unknown) as T[ keyof T ][];
|
|
201
203
|
const randomIndex = Math.floor(Math.random() * enumValues.length);
|
|
202
204
|
return enumValues[ randomIndex ];
|