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

animated-gif-detector

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animated-gif-detector - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

test/files/240px-Felis_silvestris_silvestris_small_gradual_decrease_of_quality.png

4

package.json
{
"name": "animated-gif-detector",
"version": "0.1.0",
"description": "animated-gif-detector --- Detect animated GIFs from JavaScript buffers.",
"version": "0.1.1",
"description": "Detect animated GIFs from JavaScript buffers.",
"main": "index.js",

@@ -6,0 +6,0 @@ "directories": {

@@ -91,2 +91,21 @@ var path = require('path')

t.end();
});
test('sync => false (non-GIF)', function(t) {
var filePath = path.join(process.cwd(), 'test', 'files', '240px-Felis_silvestris_silvestris_small_gradual_decrease_of_quality.png');
var buffer = fs.readFileSync(filePath);
t.notOk(new A().sync(buffer), 'is NOT animated');
t.end();
});
test('sync => false (non-image)', function(t) {
var filePath = path.join(process.cwd(), 'test', 'files', 'file.txt');
var buffer = fs.readFileSync(filePath);
t.notOk(new A().sync(buffer), 'is NOT animated');
t.end();
});
test('sync => false (non-buffer)', function(t) {
t.notOk(new A().sync({foo: 'bar' }), 'is NOT animated');
t.end();
});
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