1.0.5 • Published 4 years ago

parse-percentage v1.0.5

Weekly downloads
28
License
MIT
Repository
github
Last release
4 years ago

parse-percentage

Convert an array argument, percentify each value.

bitHound Overall Score Inline docs Build Status Coverage Status

Examples

Basic

import percentify from 'parse-percentage';

const arr = [ 0.7, 0.15, 0.05, 0 ];
const newArr = percentify(arr);
console.log(newArr);
[ 0.78, 0.17, 0.05, 0 ]

Specify Precision

import percentify from 'parse-percentage';

const arr = [ 70, 15, 5, 0 ];
const newArr = percentify(arr, 3);
console.log(newArr);
[ 0.778, 0.167, 0.055, 0 ]
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago