![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
animated-gif-detector-papandreou
Advanced tools
Detect animated GIFs from JavaScript buffers.
Detect animated GIFs from JavaScript buffers.
npm i animated-gif-detector
Given a readable stream or a buffer directly, determine if a buffer of data is an animated GIF. This helps determine if a document contains cat pics or LOLz.
This module is intended to be used as a Writable stream:
var fs = require('fs')
, animated = require('animated-gif-detector')
;
fs.createReadStream('file.gif')
.pipe(animated())
.on('animated', function() {
console.log('detected animation!');
});
;
Particularly, you may want to determine animate as early as possible in a given HTTP request, and abort the request as soon as you know:
var http = require('http')
, animated = require('animated-gif-detector')
;
var req = http.get('http://domain.com/file.gif')
.pipe(animated())
.once('animated', function() {
req.abort();
// do something else!
})
;
If an img is loaded as a buffer directly, a sync function is also available:
var fs = require('fs')
, animated = require('animated-gif-detector')
;
animated(fs.readFileSync('file.gif')) // => true!
This should work as a client-side package if Browersified.
npm test
runs the tests.
Please contribute weird animated GIFs to the repository to add to the test cases.
Thanks to hard work from the following contributors:
FAQs
Detect animated GIFs from JavaScript buffers.
The npm package animated-gif-detector-papandreou receives a total of 1 weekly downloads. As such, animated-gif-detector-papandreou popularity was classified as not popular.
We found that animated-gif-detector-papandreou demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.