GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — msgpack-javascript/src/encode.ts at main · msgpack/msgpack-javascript Expand file tree/ Copy pathencode.tsMore file actions 17 lines (16 loc) · 660 Bytes / Copy pathencode.tsFile metadata and controls17 lines (16 loc) · 660 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 import { Encoder } from "./Encoder.ts"; import type { EncoderOptions } from "./Encoder.ts"; import type { SplitUndefined } from "./context.ts"; /** * It encodes `value` in the MessagePack format and * returns a byte buffer. * * The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`. */ export function encode<ContextType = undefined>( value: unknown, options?: EncoderOptions<SplitUndefined<ContextType>>, ): Uint8Array<ArrayBuffer> { const encoder = new Encoder(options); return encoder.encodeSharedRef(value); } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |