@f/replace-element

    1.0.0 • Public • Published

    replace-element

    Build status Git tag NPM version Code style

    Replace a DOM element with another DOM element

    Installation

    $ npm install @f/replace-element
    

    Usage

    var replaceElement = require('@f/replace-element')
     
    function replaceVnode (newVnode, oldVnode) {
      return replaceElement(newVnode.element, oldVnode.element)
    }

    API

    replaceElement(newNode, oldNode)

    • newNode - The new node that you want to replace oldNode with
    • oldNode - The node you want to replace

    Returns: The replaced node (oldNode).

    License

    MIT

    Keywords

    none

    Install

    npm i @f/replace-element

    DownloadsWeekly Downloads

    7

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • f