Skip to main content

ByteTo()

바이트를 특정 바이트 단위로 변환합니다.

Signature

byteTo: (to: ByteUnit, value: number) => number

Parameters

Parameter

Type

Description

to

ByteUnit

변환할 바이트 단위

value

number

변환할 값

Returns

number

변환된 바이트 값

Example

byteTo('KB', 1024) // 1
byteTo('KB')(1024) // 1