MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / initEncodings

Function initEncodings

src/utils/encodings.js:204–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202}
203
204export async function initEncodings() {
205 return new Promise((resolve, reject) => {
206 cordova.exec(
207 (map) => {
208 Object.keys(map).forEach((key) => {
209 const encoding = map[key];
210 encodings[key] = encoding;
211 });
212 resolve();
213 },
214 (error) => {
215 alert(strings.error, error.message || error);
216 reject(error);
217 },
218 "System",
219 "get-available-encodings",
220 [],
221 );
222 });
223}
224
225/**
226 * Decodes arrayBuffer to String according given encoding type

Callers 1

onDeviceReadyFunction · 0.90

Calls 3

resolveFunction · 0.85
alertFunction · 0.85
execMethod · 0.65

Tested by

no test coverage detected