0.0.5 • Published 10 months ago

@jiangweiye/cloudflare-shared v0.0.5

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
10 months ago

@jiangweiye/cloudflare-shared

install

with pnpm

pnpm add @jiangweiye/cloudflare-shared

with yarn

yarn add @jiangweiye/cloudflare-shared

with npm

npm install @jiangweiye/cloudflare-shared

type

export declare class TextCode {
    /**
     * @description Base64 decode a string
     * @param {string} s Encoded string
     * @returns {string} - Decoded string
     */
    static base64Encode(s: string): string;
    /**
     * @description Base64 decode a string
     * @param {string} s Encoded string
     * @returns {string} - Decoded string
     */
    static base64Decode(s: string): string;
    /**
     * @description Convert a stream to text
     * @param {ReadableStream} stream - ReadableStream
     * @returns {Promise<string>} - Promise<string>
     */
    static streamToText(stream: ReadableStream): Promise<string>;
    /**
     * @description Convert a blob to text
     * @param {Blob} blob - Blob
     * @returns {Promise<string>} - Promise<string>
     */
    static blobToText(blob: Blob): Promise<string>;
    /**
     * @description Convert an array buffer to text
     * @param {ArrayBuffer} buffer - ArrayBuffer
     * @returns {string} - Text
     */
    static arrayBufferToText(buffer: ArrayBuffer): string;
}
0.0.5

10 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago