Wondering what’s next for npm?Check out our public roadmap! »

    @f/insert-element

    1.0.0 • Public • Published

    insert-element

    Build status Git tag NPM version Code style

    Insert an element at the specified position within a container

    Installation

    $ npm install @f/insert-element
    

    Usage

    var insertElement = require('@f/insert-element')
     
    function insertVnode (parent, vnode, pos) {
      return insertElement(parent.element, vnode.element, pos)
    }

    API

    insertElement(parent, node, pos)

    • parent - The DOM node you want to insert node into
    • node - The node you want to insert into parent
    • pos - The numerical index you want to insert node within parent

    Returns: The inserted node (node).

    License

    MIT

    Keywords

    none

    Install

    npm i @f/insert-element

    DownloadsWeekly Downloads

    18

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar