observ-location-hash
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "observ-location-hash", | ||
"main": "index.js", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Observable interface to the browser hash location", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -14,12 +14,14 @@ # 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') | ||
observHash(function (hash) { | ||
var hash = ObservHash('/initial-path') | ||
hash(function (hash) { | ||
//=> (called on window's hashchange event) | ||
}) | ||
observHash() | ||
hash() | ||
//=> returns current hash, minus '#' character | ||
observHash.set(path) | ||
hash.set(path) | ||
//=> sets current hash | ||
@@ -30,2 +32,4 @@ ``` | ||
#### `ObservHash([initialPath])` -> `observHash` | ||
#### `observHash([listener])` -> `function` | ||
@@ -32,0 +36,0 @@ |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
54
2837
3
0
1