Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

fd-insert-before

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fd-insert-before

insert-before a DOM element in a functional way.

Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

fd-insert-before

Build Status npm version

insert-before DOM element in a functional way.

Installation

npm install fd-insert-before --save

Usage

let insert-before = require('fd-insert-before')
    , elem = require('fd-elem')
    , insert-beforetoBody = insert-before(document.body);

let p = elem('p', 'Meow');

insert-beforetoBody(p);

assert.equal(document.body.lastChild.innerText, 'Meow'); // true.

API

insert-before :: parent -> child

A curried function that takes in:

  • parent -> DOM element to which the child must be insert-beforeed.

  • child -> DOM element that needs to be insert-beforeed.

Keywords

fp-dom

FAQs

Package last updated on 15 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts