Socket
Socket
Sign inDemoInstall

observ-location-hash

Package Overview
Dependencies
5
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 1.0.0

2

package.json
{
"name": "observ-location-hash",
"main": "index.js",
"version": "0.0.4",
"version": "1.0.0",
"description": "Observable interface to the browser hash location",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -14,14 +14,12 @@ # observ-location-hash [![Build Status](https://travis-ci.org/ajoslin/observ-location-hash.svg?branch=master)](https://travis-ci.org/ajoslin/observ-location-hash)

```js
var ObservHash = require('observ-location-hash')
var observHash = require('observ-location-hash')
var hash = ObservHash('/foo')
hash(function (hash) {
observHash(function (hash) {
//=> (called on window's hashchange event)
})
hash()
observHash()
//=> returns current hash, minus '#' character
hash.set(path)
observHash.set(path)
//=> sets current hash

@@ -32,6 +30,2 @@ ```

#### `ObservHash([initialHash]) -> `observHash`
Returns an instance of an observHash observable. Optionally pass in an initial value to set the window hash to.
#### `observHash([listener])` -> `function`

@@ -38,0 +32,0 @@

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