UNPKG

json-as

Version:

The only JSON library you'll need for AssemblyScript. SIMD enabled

9 lines (7 loc) 258 B
import { bs } from "../../../lib/as-bs"; import { dtoa_buffered } from "util/number"; // @ts-ignore: inline @inline export function serializeFloat<T extends number>(data: T): void { bs.ensureSize(64); bs.offset += dtoa_buffered(bs.offset, data) << 1; }