* chore(deps): update dependency @antfu/eslint-config to ^0.40.0 * chore(deps): updated eslint --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
8 lines
177 B
TypeScript
8 lines
177 B
TypeScript
export function convertHexToBin(hex: string) {
|
|
return hex
|
|
.trim()
|
|
.split('')
|
|
.map(byte => Number.parseInt(byte, 16).toString(2).padStart(4, '0'))
|
|
.join('');
|
|
}
|