4 ms·
We do it like this: https://imgur.com/a/AdeRncw https://imgur.com/a/AdeRncw Just a simple function (ensureType) that checks primitive types (angle brackets for
by davidzweig 4y ago
We do it like this:
https://imgur.com/a/AdeRncw https://imgur.com/a/AdeRncw
Just a simple function (ensureType) that checks primitive types (angle brackets for min length). You reconstruct the object using ensureType, writing it back into itself. EnsureType returns what is passed in, with the corresponding type. Has worked well.