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

Function execEncode

src/utils/encodings.js:253–267  ·  view source on GitHub ↗

* Encodes text to ArrayBuffer according given encoding type * @param {string} text * @param {string} charset * @returns {Promise }

(text, charset)

Source from the content-addressed store, hash-verified

251 * @returns {Promise<ArrayBuffer>}
252 */
253function execEncode(text, charset) {
254 return new Promise((resolve, reject) => {
255 cordova.exec(
256 (buffer) => {
257 resolve(buffer);
258 },
259 (error) => {
260 reject(error);
261 },
262 "System",
263 "encode",
264 [text, charset],
265 );
266 });
267}
268
269export default encodings;

Callers 1

encodeFunction · 0.85

Calls 2

resolveFunction · 0.85
execMethod · 0.65

Tested by

no test coverage detected