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

urlgrey

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urlgrey - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

5

lib/index.js

@@ -162,4 +162,7 @@ var nodeUrl = require('url');

if (popped === ''){ // ignore trailing slash
pieces.pop();
popped = pieces.pop();
}
if (!popped){
throw new Error("The current path has no parent path");
}
return this.query(false).hash('').path(pieces.join("/"));

@@ -166,0 +169,0 @@ };

2

package.json

@@ -5,3 +5,3 @@ {

"keywords" : ["url", "uri"],
"version": "0.0.7",
"version": "0.0.8",
"bugs": {

@@ -8,0 +8,0 @@ "url": "https://github.com/cainus/urlgrey/issues"

@@ -149,2 +149,11 @@ var should = require('should');

});
it("throws an exception when no parent path exists", function(){
var url = "http://asdf.com/";
try {
urlgrey(url).parent();
should.fail("expected exception was not raised.");
} catch (ex){
ex.message.should.equal('The current path has no parent path');
}
});
});

@@ -151,0 +160,0 @@ describe("#rawChild", function(){

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