1.0.11 • Published 8 years ago

fallback-image v1.0.11

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

fallback-image

Load a fallback image if an image errors out.

Build Status

Installation

$ npm install fallback-image

Usage

import fallbackImage from 'fallback-image';

let imageEl = document.querySelector('img.horse-image');
fallbackImage(imageEl, './images/fallback-image.png');

Standalone

Generate a standalone build in dist (for use with <script> tags and AMD module loaders):

$ npm run build:standalone

Test

Tests are done with tape by running:

$ npm test
1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago