0.1.6 • Published 10 years ago

noflo-numbers v0.1.6

Weekly downloads
3
License
-
Repository
github
Last release
10 years ago

Number representation for NoFlo

Build Status npm version

This package provides utility components for number representation in NoFlo. Based on Javascript Number Methods.

Package Installation

npm install noflo-numbers --save

Component Usage

ToExponential

Converts a number into an exponential notation

PortNameDatatypeDescription
InPortinnumberInput number
InPortdigitsnumberDigits after decimal point. Integer between 0 and 20. If omitted, it is set to as many digits as necessary to represent the value
OutPortoutstringA String, representing the number as an exponential notation

ToFixed

Converts a number into a string, keeping a specified number of decimals

PortNameDatatypeDescription
InPortinnumberInput number
InPortdigitsnumberDigits after decimal point. Int from 0 to 20. Default 0
OutPortoutstringA String, representing a number, with the exact number of decimals

ToPrecision

Formats a number to a specified length

PortNameDatatypeDescription
InPortinnumberInput number
InPortdigitsnumberNumber of digits. Integer between 1 and 21. If omitted, it returns the entire number
OutPortoutstringA String, representing a number formatted to the specified precision

ToString

Converts a number into a string

PortNameDatatypeDescription
InPortinnumberInput number
InPortradixnumberBase to use. Integer between 2 and 36. Default 10. - 2: Binary value - 8: Octal value - 16: Hexadecimal value
OutPortoutstringA String, representing a number
0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago