UNPKG

543 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.toUtf8 = exports.fromUtf8 = void 0;
4const pureJs_1 = require("./pureJs");
5const whatwgEncodingApi_1 = require("./whatwgEncodingApi");
6const fromUtf8 = (input) => typeof TextEncoder === "function" ? (0, whatwgEncodingApi_1.fromUtf8)(input) : (0, pureJs_1.fromUtf8)(input);
7exports.fromUtf8 = fromUtf8;
8const toUtf8 = (input) => typeof TextDecoder === "function" ? (0, whatwgEncodingApi_1.toUtf8)(input) : (0, pureJs_1.toUtf8)(input);
9exports.toUtf8 = toUtf8;