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'; | ||
}; |
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2702
9
45
+ Addedfile-type@10.11.0(transitive)
- Removedfile-type@7.7.1(transitive)
Updatedfile-type@^10.4.0