mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-23 02:38:00 +00:00
15 lines
383 B
JavaScript
15 lines
383 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.TextEncoder = void 0;
|
|
class TextEncoder {
|
|
encode(value) {
|
|
const count = value.length;
|
|
const u8a = new Uint8Array(count);
|
|
for (let i = 0; i < count; i++) {
|
|
u8a[i] = value.charCodeAt(i);
|
|
}
|
|
return u8a;
|
|
}
|
|
}
|
|
exports.TextEncoder = TextEncoder;
|