1.0.19 • Published 2 years ago

percentize v1.0.19

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Description

Percentize helps to calculate percent from numbers array with minValue to show. Useful for labels. Avoid zero labels

Install

npm install percentize

Examples

import percentize from 'percentize';

const percentArray = percentize([0.1, 20, 20]);
// [1, 49, 49]

const percentArray = percentize([200, 1, 500], 4);
// [27, 1, 72]

const percentArray = percentize([200, 1, 500]);
// [28, 1, 71]

const percentArray = percentize([200, 0, 500]);
// [29, 71]

const percentArray = percentize([55.755814,37.617635, 5, 33]);
// [42, 29, 4, 25]
1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago