UNPKG

serverless-spy

Version:

CDK-based library for writing elegant integration tests on AWS serverless architecture and an additional web console to monitor events in real time.

6 lines (5 loc) 240 B
import { fromString } from "@smithy/util-buffer-from"; export const fromUtf8 = (input) => { const buf = fromString(input, "utf8"); return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); };