mirror of
https://github.com/gleam-lang/gleam.git
synced 2025-12-23 09:47:08 +00:00
toBitString
This commit is contained in:
parent
27954f55b8
commit
fe508a3ab9
1 changed files with 3 additions and 0 deletions
|
|
@ -190,6 +190,9 @@ export function toBitArray(segments) {
|
|||
return new BitArray(new Uint8Array(view.buffer));
|
||||
}
|
||||
|
||||
// TODO: remove after next version
|
||||
export const toBitString = toBitArray;
|
||||
|
||||
// Derived from this answer https://stackoverflow.com/questions/8482309/converting-javascript-integer-to-byte-array-and-back
|
||||
export function sizedInt(int, size) {
|
||||
let value = int;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue