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

image-resolver

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-resolver - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

dist/ImageResolver.0.5.4.js

2

package.json
{
"name": "image-resolver",
"version": "0.5.3",
"version": "0.5.4",
"description": "Extract main image for a given URL",

@@ -5,0 +5,0 @@ "main": "src/ImageResolver.js",

@@ -5,3 +5,3 @@ /**

var API_URL = 'http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key={{APIKEY}}&photo_id={{ID}}&format=json&nojsoncallback=1';
var API_URL = 'https://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key={{APIKEY}}&photo_id={{ID}}&format=json&nojsoncallback=1';

@@ -45,2 +45,2 @@ function Flickr(apikey) {

module.exports = Flickr;
module.exports = Flickr;

@@ -96,2 +96,6 @@ /**

if ( !img[i].attribs['src'] ) {
continue;
}
//Compute surface

@@ -143,2 +147,2 @@ var w = img[i].attribs['width'] || 1;

module.exports = Webpage;
module.exports = Webpage;

@@ -18,3 +18,3 @@ var ImageResolver = require('../../../src/ImageResolver');

runs(function(){
expect(result.image).toBe("http://farm9.staticflickr.com/8431/7543031692_494bed13d4_b.jpg");
expect(result.image).toBe("https://farm9.staticflickr.com/8431/7543031692_494bed13d4_b.jpg");
});

@@ -37,5 +37,5 @@ });

runs(function(){
expect(result.image).toBe("http://farm3.staticflickr.com/2906/14248906772_8cc69441ee_b.jpg");
expect(result.image).toBe("https://farm3.staticflickr.com/2906/14248906772_8cc69441ee_b.jpg");
});
});
});

@@ -22,1 +22,19 @@ var ImageResolver = require('../../../src/ImageResolver');

});
describe("Webpage : no image", function(){
it("should return the image URL", function(){
var result;
imageresolver.resolve(
"http://perdu.com/",
function(res){
result = ( res === null ) ? true : false;
}
);
waitsFor(function(){
return result;
}, 10000);
runs(function(){
expect(result).toBe(true);
});
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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