@f/empty-element

Remove all of a DOM element's children

Stats

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

Readme

empty-element

Build status Git tag NPM version Code style

Remove all of a DOM element's children

Installation

$ npm install @f/empty-element

Usage

var empty = require('@f/empty-element')

empty(document.body)
document.body.children.length === 0

API

empty(node)

  • node - The DOM node you want to empty

Returns: node (the node you passed in)

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.