node-dom-to-image
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

DOM to Image

What is it

node-dom-to-image is a library which converts any DOM node into a downloadable image.

Installation

NPM

npm install node-dom-to-image

Then load

/* in ES 6 */
import domtoimage from 'node-dom-to-image';
/* in ES 5 */
var domtoimage = require('node-dom-to-image');

Usage

import domToImage from 'node-dom-to-image'

const anyFunction = () => {
  const node = document.querySelector('.example')
  domToImage(node, 'example')
}

anyFunction() // This will download the image

Authors

Gabriel Cuenca

License

MIT

Package Sidebar

Install

npm i node-dom-to-image

Weekly Downloads

2

Version

1.4.0

License

MIT

Unpacked Size

18.7 kB

Total Files

8

Last publish

Collaborators

  • gcuencam