Skip to content

sundowatch/parse-to-all

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

parse-to-all (parse to All Types)

This library parses all possible outputs

Return types

  • integer
  • float
  • string
  • array
  • arrayInteger
  • arrayFloat
  • arrayString
  • object

Installation

npm install parse-to-all

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 }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published