mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-27 10:06:16 -04:00
![renovate[bot]](/assets/img/avatar_default.png)
* 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>
7 lines
177 B
TypeScript
7 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('');
|
|
}
|