0.0.5 • Published 8 years ago

parse-this v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Cast stringified values (in an object or array) back to native types

When sending formData to the server, data types may get cast to strings. i.g. true because 'true' 1 '1' and so on. This librairy aim is to cast back those value to their original type.

I couldn't find anything out there in under 5 minutes so I've started this implementation. It very barebone and probably very flawed but I will polish it in the next few days. I'll appreciate any feedback / PR that may help to make this more robust.

install

npm install --save(-dev) parse-this

usage

import {objectParser, arrayParser} from 'parse-this';
const parsedData = objectParser(formData)
0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago