Skip to content

Commit

Permalink
$mol_tree2_bin: default span
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Dec 2, 2023
1 parent d1227dd commit af12660
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tree2/bin/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace $ {
}

export function $mol_tree2_bin_from_bytes(
bytes : ArrayLike< number > ,
span : $mol_span ,
bytes : ArrayLike< number >,
span = $mol_span.unknown,
) {

return $mol_tree2.list( Array.from( bytes , code => {
Expand All @@ -15,7 +15,10 @@ namespace $ {

}

export function $mol_tree2_bin_from_string( str : string , span : $mol_span ) {
export function $mol_tree2_bin_from_string(
str : string,
span = $mol_span.unknown,
) {
return $mol_tree2_bin_from_bytes( [ ... new TextEncoder().encode( str ) ] , span )
}

Expand Down

0 comments on commit af12660

Please sign in to comment.