Socket
Socket
Sign inDemoInstall

url-assembler

Package Overview
Dependencies
2
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

4

index.js

@@ -14,2 +14,6 @@ var extend = require('extend');

this._prefix = this.pathname;
if(this._prefix === '/') {
this._prefix = '';
this.pathname = '';
}
}

@@ -16,0 +20,0 @@

2

package.json
{
"name": "url-assembler",
"version": "0.0.1",
"version": "0.0.2",
"description": "Assemble urls from route-like templates (/path/:param)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -26,2 +26,12 @@ var expect = require('chai').expect

describe('when the baseUrl stops at the port number', function () {
beforeEach(function () {
myUrl = UrlAssembler('http://domain.com:90');
})
it('does not double slash the result', function () {
expect(myUrl.segment('/hello').toString()).to.equal('http://domain.com:90/hello');
})
});
});
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