1.0.6 • Published 10 months ago

parse-percentage v1.0.6

Weekly downloads
28
License
MIT
Repository
github
Last release
10 months 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.6

10 months ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago