npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

imagepreloader

0.0.3 • Public • Published

imagepreloader

The same file works in both places.

In Node

You can either

var Preload = require('imagepreloader');
var Image = require('canvas').Image;
var preload = new Preload({Image:Image});

Or,

In your browser

Just copy the index.js file so that you can load it from HTML. Feel free to rename it.

<script src='index.js'></script>
<script>
    var Preload = new Preload;
</script>

How To Use

Just open your browser to

example/browser/index.html

Or cd /example/node and run

node test.js

install

npm i imagepreloader

Downloadsweekly downloads

6

version

0.0.3

license

MIT/X11

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability