Thursday, 6 June 2019

Having trouble finding a module that can help tell me if the "type" of a string, as in whether it's just a Boolean, an Int (and more info on numbers), etc. Does anyone know if something like this exists?

So before I continue writing code myself, does anyone know of a module that tells me if a string contains (or rather is) another type from the more traditional strongly typed languages e.g. int, boolean, long, float, etc.Obviously there's a TON of ambiguity with looking at the different types of numbers but honestly anything that might be a good starting point is greatly appreciated before I start writing 50 if-else if-else statements.Possibly more a JS question than node so I apologize if this was a bad place to post. Thanks for any tips!

Submitted June 06, 2019 at 11:11PM by questioningCoder

No comments:

Post a Comment