snakebyte
Version:
Convert between different byte units
9 lines (8 loc) • 363 B
TypeScript
declare type DecimalUnit = "Byte" | "Kilobyte" | "Megabyte" | "Gigabyte" | "Terabyte" | "Petabyte" | "Exabyte" | "Zettabyte" | "Yottabyte";
declare type snakebyteOptions = {
from?: DecimalUnit;
to: DecimalUnit;
fractions?: number;
};
export declare const snakebyte: ({ to, fractions, from }: snakebyteOptions) => (input: number) => number;
export {};