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

hashbind

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hashbind - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

26

index.js

@@ -7,4 +7,7 @@ 'use strict';

function Hash(window) {
function Hash(window, options) {
var self = this;
if (!options) {
options = {};
}

@@ -18,2 +21,6 @@ this.window = window;

this.load();
// TODO: do we ever need to escape?
this.escape =
options.escape === undefined
? true : !!options.escape;

@@ -85,8 +92,19 @@ function onHashChange(e) {

var part = '' + escape(key);
var part = '';
if (this.escape) {
part += escape(key);
} else {
part += key;
}
if (str === undefined) {
continue;
} else if (str !== '') {
part += '=' + escape(str);
}
if (str !== '') {
part += '=';
if (this.escape) {
part += escape(str);
} else {
part += str;
}
}
parts.push(part);

@@ -93,0 +111,0 @@ }

2

package.json
{
"name": "hashbind",
"version": "2.0.0",
"version": "2.0.1",
"description": "Dual Binding Library For window.location.hash",

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

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