Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-gif

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-gif - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

10

index.js
'use strict';
const fileType = require('file-type');
module.exports = input => fileType(input).ext === 'gif';
module.exports = input => {
const match = fileType(input);
if (!match) {
return false;
}
return match.ext === 'gif';
};

86

package.json
{
"name": "is-gif",
"version": "2.0.0",
"description": "Check if a Buffer/Uint8Array is a GIF image",
"license": "MIT",
"repository": "sindresorhus/is-gif",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"gif",
"graphics",
"image",
"img",
"pic",
"picture",
"photo",
"type",
"detect",
"check",
"is",
"exif",
"binary",
"buffer",
"uint8array"
],
"devDependencies": {
"ava": "*",
"xo": "*"
},
"dependencies": {
"file-type": "^7.4.0"
}
"name": "is-gif",
"version": "3.0.0",
"description": "Check if a Buffer/Uint8Array is a GIF image",
"license": "MIT",
"repository": "sindresorhus/is-gif",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"gif",
"graphics",
"image",
"img",
"pic",
"picture",
"photo",
"type",
"detect",
"check",
"is",
"exif",
"binary",
"buffer",
"uint8array"
],
"dependencies": {
"file-type": "^10.4.0"
},
"devDependencies": {
"ava": "^0.25.0",
"xo": "^0.23.0"
}
}

@@ -1,4 +0,4 @@

# is-gif [![Build Status](https://travis-ci.org/sindresorhus/is-gif.svg?branch=master)](https://travis-ci.org/sindresorhus/is-gif)
# is-gif [![Build Status](https://travis-ci.com/sindresorhus/is-gif.svg?branch=master)](https://travis-ci.com/sindresorhus/is-gif)
> Check if a Buffer/Uint8Array is a [GIF](http://en.wikipedia.org/wiki/Graphics_Interchange_Format) image
> Check if a Buffer/Uint8Array is a [GIF](https://en.wikipedia.org/wiki/Graphics_Interchange_Format) image

@@ -20,2 +20,3 @@

const buffer = readChunk.sync('unicorn.gif', 0, 3);
isGif(buffer);

@@ -22,0 +23,0 @@ //=> true

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc