observ-location-hash
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -6,8 +6,10 @@ 'use strict' | ||
module.exports = HashHistory() | ||
module.exports = HashHistory | ||
function HashHistory () { | ||
function HashHistory (initialHash) { | ||
observable.set = set | ||
var listen = hashChangeEvent() | ||
if (initialHash) set(initialHash) | ||
return observable | ||
@@ -14,0 +16,0 @@ |
{ | ||
"name": "observ-location-hash", | ||
"main": "index.js", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Observable interface to the browser hash location", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -31,2 +31,6 @@ # observ-location-hash [![Build Status](https://travis-ci.org/ajoslin/observ-location-hash.svg?branch=master)](https://travis-ci.org/ajoslin/observ-location-hash) | ||
#### `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` | ||
@@ -33,0 +37,0 @@ |
3760
31
56