1.0.11 • Published 9 years ago

fallback-image v1.0.11

Weekly downloads
2
License
MIT
Repository
github
Last release
9 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

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

11 years ago

1.0.7

11 years ago

1.0.6

11 years ago

1.0.5

11 years ago

1.0.4

11 years ago

1.0.3

11 years ago

1.0.2

11 years ago