Socket
Socket
Sign inDemoInstall

photon

Package Overview
Dependencies
4
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

5

History.md

@@ -0,2 +1,7 @@

2.0.1 / 2017-11-08
==================
* Update to support Node.js version 7+ due to changes in `url.format` (#6, @DanReyLop)
* Update dependencies
2.0.0 / 2016-02-02

@@ -3,0 +8,0 @@ ==================

3

index.js

@@ -68,3 +68,4 @@

}
params.pathname = url.format( parsedUrl ).substring(1);
var formattedUrl = url.format( parsedUrl );
params.pathname = 0 === formattedUrl.indexOf( '//' ) ? formattedUrl.substring(1) : formattedUrl;
params.hostname = serverFromPathname( params.pathname );

@@ -71,0 +72,0 @@ if ( wasSecure ) {

{
"name": "photon",
"version": "2.0.0",
"version": "2.0.1",
"description": "JavaScript library for the WordPress.com Photon image manipulation service",

@@ -35,9 +35,9 @@ "main": "index.js",

"crc32": "0.2.2",
"debug": "2",
"debug": "3.1.0",
"seed-random": "2.2.0"
},
"devDependencies": {
"browserify": "8.1.1",
"mocha": "2.4.5"
"browserify": "14.5.0",
"mocha": "3.5.3"
}
}

@@ -67,3 +67,3 @@ # photon.js

MIT – Copyright 2014 Automattic
MIT – Copyright 2014-2017 Automattic

@@ -70,0 +70,0 @@ [Node.js]: http://nodejs.org

@@ -82,2 +82,10 @@

it('should handle blob: URLs', function() {
var url = 'blob:http://example.com/ddd1d6b0-f31b-4937-ae9e-97f1d660cf71';
var photonedUrl = photon(url);
assertHostedOnPhoton( photonedUrl );
assertPathname(photonedUrl, '/http//example.com/ddd1d6b0-f31b-4937-ae9e-97f1d660cf71');
});
it('should strip existing size params from photoned URLs', function () {

@@ -84,0 +92,0 @@ var url = 'https://i0.wp.com/www.gravatar.com/avatar/693307b4e0cb9366f34862c9dfacd7fc?resize=120';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc