0.2.9 • Published 2 months ago

yeonyu-utils v0.2.9

Weekly downloads
9
License
Apache-2.0
Repository
github
Last release
2 months ago

yeonyu-utils

yeonyu's typescript(javascript) utils to use the frequently

SizeUnit

About the transformation in thousand units. It is based on the premise of a single tone, and the computed value stored in the _result is freeze.


⚠️WARNING

This conversion works within the Browser Number range calculation and does not guarantee errors.


Constructor parameters

types

UnitType

enum UnitType {
  DEFAULT, // K, M, G, T, P, E, Z, Y
  BYTE, // KB, MB, GB ...
  BIN_BYTE, // KiB, MiB, GiB ...
  BPS, // Kbps, Mbps ...
  FREQ, // KHz, MHz
}

SizeUnitOptions

interface SizeUnitOptions {
  fixedUnit?: number
/**
 * if 'true' not use Number.toFixed in the fixed parameter and instead cut off as much as fixed
 */
  isCutoffFixed?: boolean;
  isBinary?: boolean;
  customBase?: number;
  customUnits?: string[];
}
0.2.9

2 months ago

0.2.8

2 months ago

0.2.7

1 year ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.3

3 years ago

0.2.4

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago