auto-parse any value you happen to send in (String, Number, Boolean,Array, Object, Function, undefined and null). You send it we will try to find a way to parse it.support sending in a string of what type (e.g. boolean) or constructor (e.g. Boolean)
What is Auto Parse
auto-parse
any value you happen to send in (String
, Number
, Boolean
, Array
, Object
, Function
, undefined
and null
). You send it we will try to find a way to parse it. We now support sending in a string of what type (e.g. “boolean”) or constructor (e.g. Boolean)
Installation
npm install auto-parse –save
Documentation
autoParse(input, type)
Params
- Anything
input
: The input value you want parsed - Constructor|String
type
: The type. It could be a string (e.g. “array”) or a constructor (e.g. Array).
Return
- Parsed Value Could return String, Number, Boolean, Object, Array, Null, NaN, Undefined & Date