Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

fixture-images

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fixture-images

Animated GIF/PNG/WEBP and Static GIF/PNG/WEBP/BMP/JPG/JXR/PSD/TIF

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

Fixture images

  • animated.GIF

  • animated.PNG

  • animated.WEBP

  • still.GIF

  • still.PNG

  • still.WEBP

  • still.JPG

  • still.JXR(JPEG-XR)

  • still.BMP

  • still.PSD

  • still.TIF

Usage

Via npm

$ npm install fixture-images --save-dev
var animated= require('fixture-images').animated;

console.log(animated.gif);// [47,49,46,38,39,61,...]

Via bower

$ bower install fixture-images --save-dev
<script src="/bower_components/fixture-images/all.min.js"></script>
<script>
var animated= fixtureImages.animated;

console.log(animated.gif);// [47,49,46,38,39,61,...]
</script>

Via http/https

in Node.js

$ npm install request --save-dev
var url= 'http://cdn.rawgit.com/59naga/fixture-images/master/animated.GIF';

var request= require('request');
request.get({url:url,encoding:null},function(error,response,buffer){
  console.log(buffer);// [47,49,46,38,39,61,...]
});

in Browser

<script>
var url= 'https://cdn.rawgit.com/59naga/fixture-images/master/animated.GIF';

var xhr= new XMLHttpRequest;
xhr.open('GET',url,true);
xhr.responseType= 'arraybuffer';
xhr.send();

xhr.onload= function(){
  var binary= new Uint8Array(xhr.response);
  var blob= new Blob([binary],{type:'image/gif'});
  window.open(URL.createObjectURL(blob));
}
</script>

License

MIT

Keywords

fixture

FAQs

Package last updated on 01 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts