Skip to content

Commit 94c7333

Browse files
committed
refactor: prefer map to from
1 parent 78f016d commit 94c7333

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fallback/single-byte.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function encodingMapper(encoding) {
3535
let map
3636
const mapper = (arr, start = 0) => {
3737
if (!map) {
38-
map = Uint16Array.from({ length: 256 }, (_, i) => i) // Unicode subset
38+
map = new Uint16Array(256).map((_, i) => i) // Unicode subset
3939
map.set(Uint16Array.from(codes), 128)
4040
}
4141

0 commit comments

Comments
 (0)