UNPKG

lambda-live-debugger

Version:

Debug Lambda functions locally like it is running in the cloud

5 lines (4 loc) 403 B
import { fromUtf8 as jsFromUtf8, toUtf8 as jsToUtf8 } from "./pureJs"; import { fromUtf8 as textEncoderFromUtf8, toUtf8 as textEncoderToUtf8 } from "./whatwgEncodingApi"; export const fromUtf8 = (input) => typeof TextEncoder === "function" ? textEncoderFromUtf8(input) : jsFromUtf8(input); export const toUtf8 = (input) => typeof TextDecoder === "function" ? textEncoderToUtf8(input) : jsToUtf8(input);