observ-location-hash
Advanced tools
Comparing version 0.0.4 to 1.0.0
{ | ||
"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 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
3694
50