docs: add tsdocs

This commit is contained in:
janniks
2023-10-30 22:50:15 +01:00
committed by janniks
parent 98e395fd72
commit e70ce1b1d1

View File

@@ -386,6 +386,9 @@ export function intToBigInt(value: IntegerType, signed: boolean): bigint {
);
}
/**
* Adds a `0x` prefix to a string if it does not already have one.
*/
export function with0x(value: string): string {
return value.startsWith('0x') ? value : `0x${value}`;
}