Skip to content

Conversation

@seventy6
Copy link
Contributor

  • made a few changes

featureFlagTwo: false,
},
expiry: new Date("2023-09-01 00:00:00"), // optional expiry date
expiry: "2023-09-01 00:00:00", // optional expiry date
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one works, but I'm curios on why you're favoring expiry as string instead of a date object 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The date object was causing an error when posting to the server. I removed it for speed!

customUserId: null,
})
console.log('Keys filtered using customUserId', customUserIdFilteredKey);
customUserId: "null",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think leaving this as null instead of "null" is better, it feels more natural to pass null as null instead of a string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server borked with the null value.

featureFlagOne: true,
featureFlagTwo: false,
},
expiry: new Date("2023-09-01 00:00:00"), // optional expiry date
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this works fine, expiry is expected to be a Date object, we want the users to use the library just like any other JS code, passing expiry as a date feels more natural in a JS environment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the comment before. Can you test using the JS Date object?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants