@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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    3

Package Sidebar

Install

npm i @f/insert-element

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • f