@f/insert-element

Insert an element at the specified position within a container

Stats

StarsIssuesVersionUpdatedCreatedSize
@f/insert-element
001.0.06 years ago6 years agoMinified + gzip package size for @f/insert-element in KB

Readme

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.