cyclic-router
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -5,8 +5,7 @@ import { StreamAdapter } from '@cycle/base'; | ||
export declare class RouterSource { | ||
private _history$; | ||
history$: any; | ||
private _namespace; | ||
private _createHref; | ||
private _runSA; | ||
constructor(_history$: any, _namespace: Pathname[], _createHref: (path: Pathname) => Pathname, _runSA: StreamAdapter); | ||
history$: any; | ||
constructor(history$: any, _namespace: Pathname[], _createHref: (path: Pathname) => Pathname, _runSA: StreamAdapter); | ||
path(pathname: Pathname): RouterSource; | ||
@@ -13,0 +12,0 @@ define(routes: RouteDefinitions): any; |
@@ -15,4 +15,4 @@ "use strict"; | ||
var RouterSource = (function () { | ||
function RouterSource(_history$, _namespace, _createHref, _runSA) { | ||
this._history$ = _history$; | ||
function RouterSource(history$, _namespace, _createHref, _runSA) { | ||
this.history$ = history$; | ||
this._namespace = _namespace; | ||
@@ -22,12 +22,5 @@ this._createHref = _createHref; | ||
} | ||
Object.defineProperty(RouterSource.prototype, "history$", { | ||
get: function () { | ||
return this._runSA.remember(this._history$); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
RouterSource.prototype.path = function (pathname) { | ||
var scopedNamespace = this._namespace.concat(util.splitPath(pathname)); | ||
var scopedHistory$ = this._runSA.remember(this._history$ | ||
var scopedHistory$ = this._runSA.remember(this.history$ | ||
.filter(function (_a) { | ||
@@ -44,3 +37,3 @@ var _path = _a.pathname; | ||
var createHref = util.makeCreateHref(namespace, _createHref); | ||
var match$ = this._runSA.remember(this._history$ | ||
var match$ = this._runSA.remember(this.history$ | ||
.map(function (location) { | ||
@@ -47,0 +40,0 @@ var filteredPath = getFilteredPath(namespace, location.pathname); |
{ | ||
"name": "cyclic-router", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "A router driver built for Cycle.js", | ||
@@ -47,3 +47,3 @@ "main": "lib/index.js", | ||
"validate-commit-message": "^3.0.1", | ||
"xstream": "^5.0.5" | ||
"xstream": "^5.0.6" | ||
}, | ||
@@ -50,0 +50,0 @@ "config": { |
@@ -25,3 +25,3 @@ # cyclic-router | ||
For API documentation pleave visit this link [here](http://tylors.github.io/cyclic-router/docs/) | ||
For API documentation pleave visit this link [here](http://cyclejs-community.github.io/cyclic-router/docs/) | ||
@@ -28,0 +28,0 @@ ## Basic Usage |
Sorry, the diff of this file is not supported yet
56
928464
7842