virtualcontent
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    VirtualContent

    VirtualContent - is a browser tool designed for handling large text/html content.

    Installation

    npm i --save virtualcontent

    Usage

    import "VC" from "virtualcontent";
     
    VC.create(options).setText(str).renderTo($container);

    Options

    ParameterAcceptsDefault valueDescription
    appendBoolfalseSwitch to Append mode (Replace mode is the default)
    chunkPreProcessorFunctionnullSet function which receives chunk (String) as a first argument, and returns String.
    delayInteger100Delay scroll processing.
    lengthNumber10240Set maximum length for a chunk string
    scrollableParentNode/jQueryEl/selectorundefinedSet scrollable parent node.
    thresholdNumber2It defines how much chunks are shown at once in Replace mode (default)

    API

    MethodArgumentsReturnsDescription
    create (static)optionsNew instanceCreate new VC instance
    destroynoneselfDestroy VC instance
    renderToNode/jQueryElselfRender to node or $el
    setHtmlStringselfSet HTML content
    setTextStringselfSet text content

    Install

    npm i virtualcontent

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    18.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • vkrepkiy