UNPKG

cione-comp-lib

Version:

`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`

24 lines (23 loc) 687 B
import { __exports as strings } from "../../../../../_virtual/strings.mjs"; export { __exports as default } from "../../../../../_virtual/strings.mjs"; Object.defineProperty(strings, "__esModule", { value: true }); strings.decodeUTF8 = decodeUTF8; strings.encodeUTF8 = encodeUTF8; function decodeUTF8(utf8string) { var allowLatin1 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; try { return decodeURIComponent(escape(utf8string)); } catch (e) { if (e instanceof URIError) { if (allowLatin1) { return utf8string; } } throw e; } } function encodeUTF8(DOMString) { return unescape(encodeURIComponent(DOMString)); }