mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-20 05:40:17 +08:00
- Extend native FFI with additional scalar widths and writable byte spans. - Compile stored text codecs and supported bundled module patterns without a JavaScript engine. - Document supported limits.
9 lines
321 B
TypeScript
9 lines
321 B
TypeScript
import { TextEncoder as UtilEncoder } from "node:util";
|
|
import { TextDecoder as UtilDecoder } from "util";
|
|
|
|
export const sharedEncoder: UtilEncoder = new UtilEncoder();
|
|
const sharedDecoder: UtilDecoder = new UtilDecoder();
|
|
export function decodeShared(bytes: Uint8Array): string {
|
|
return sharedDecoder.decode(bytes);
|
|
}
|