@aws/cloudfront-hosting-toolkit
Version:
CloudFront Hosting Toolkit offers the convenience of a managed frontend hosting service while retaining full control over the hosting and deployment infrastructure to make it your own.
5 lines (4 loc) • 403 B
JavaScript
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);