make-mp-data 1.1.16 → 1.1.17

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/index.js CHANGED
@@ -518,8 +518,8 @@ function AKsTimeSoup(earliestTime, latestTime = NOW, peakDays = PEAK_DAYS) {
518
518
  // usually, ensure the event time is within business hours
519
519
  if (chance.bool({ likelihood: 42 })) eventTime = Math.min(Math.max(eventTime, businessStart), businessEnd);
520
520
 
521
- const compareTime = dayjs.unix(eventTime).toISOString();
522
- if (dayjs(chosenTime).isAfter(dayjs.unix(0))) validTime = true;
521
+ if (eventTime > 0) validTime = true;
522
+
523
523
  }
524
524
  chosenTime = dayjs.unix(eventTime).toISOString();
525
525
  return chosenTime;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "make-mp-data",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "builds all mixpanel primitives for a given project",
5
5
  "main": "index.js",
6
6
  "types": "types.d.ts",
@@ -10,7 +10,7 @@ require('dotenv').config();
10
10
  describe('timeSoup', () => {
11
11
  test('always positive dates', () => {
12
12
  const dates = [];
13
- for (let i = 0; i < 10000; i++) {
13
+ for (let i = 0; i < 20000; i++) {
14
14
  const earliest = dayjs().subtract(u.rand(2, 360), 'D');
15
15
  dates.push(timeSoup());
16
16
  }