parse-to-all
v1.0.1
Published
Parse to all possible outputs
Downloads
4
Readme
parse-to-all (parse to All Types)
This library parses all possible outputs
Return types
- integer
- float
- string
- array
- arrayInteger
- arrayFloat
- arrayString
- object
Installation
Usage
parseAll(value)
const pa = require('parse-to-all');
console.log(pa.parseAll(12.55));
// Returns:
{
integer: 12,
float: 12.55,
string: '12.55',
array: [ 12.55 ],
arrayInteger: [ 12 ],
arrayFloat: [ 12.55 ],
arrayString: [ '12.55' ],
object: { value: 12.55 }
}