parsethat
v1.2.0
Published
Parses a string input into some other type of data. Useful for interpreting real values from a string.
Downloads
2
Readme
ParseThat
Did you want to parse that?
Now you can!
const parse = require("parsethat")
// String - Literally does nothing you buffoon
parse("This is just boring, boring, lame text") // -> This is just boring, boring, lame text
// Numbers - Parses stinky text into numbers, int and float
parse("3.14") // -> Takes string and parses the number, almost as if there was a function for that
// JSON - Parses strings as JSON objects. WOWzers
parse("{\"this\":\"is\",\"json\":\"example\"}")
This nifty little thing is pretty useful if you are given lame strings and don't know what to do with them.
Like for example, from HTML query data.
Thanks for coming to my TED Talk.