@konforti/wasm-truncate
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.3 • Public • Published

    wasm truncate

    truncate texts by number of lines using wasm-bindgen.

    Installation

        npm i -S @konforti/wasm-truncate

    Usage

    const truncate = async (elementId: string, lines: number) => {
        const module = await import('@konforti/wasm-truncate');
        module.run(elementId, lines);
    };
    
    truncate('long-text', 1);

    Development

    # Once
    rustup target add wasm32-unknown-unknown
    cargo +nightly install wasm-bindgen-cli
    # Run example
    npm start

    Install

    npm i @konforti/wasm-truncate

    DownloadsWeekly Downloads

    4

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    137 kB

    Total Files

    6

    Last publish

    Collaborators

    • konforti