cycle-pushstate-driver
Advanced tools
Comparing version 2.0.0 to 3.0.0
@@ -8,11 +8,15 @@ 'use strict'; | ||
var _cycleCore = require('@cycle/core'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
var _rx = require('rx'); | ||
var _rx2 = _interopRequireDefault(_rx); | ||
function noPushStateDriver(navigate$) { | ||
navigate$.subscribe(); | ||
return _cycleCore.Rx.Observable.never().startWith(global.location.pathname); | ||
return _rx2['default'].Observable.never().startWith(global.location.pathname); | ||
} | ||
function pushStateDriver(navigate$) { | ||
var popState$ = _cycleCore.Rx.Observable.fromEvent(global, 'popstate').map(function (e) { | ||
var popState$ = _rx2['default'].Observable.fromEvent(global, 'popstate').map(function (e) { | ||
return global.location.pathname; | ||
@@ -25,3 +29,3 @@ }); | ||
return _cycleCore.Rx.Observable.merge(navigate$, popState$).startWith(global.location.pathname).distinctUntilChanged(); | ||
return _rx2['default'].Observable.merge(navigate$, popState$).startWith(global.location.pathname).distinctUntilChanged(); | ||
} | ||
@@ -28,0 +32,0 @@ |
{ | ||
"name": "cycle-pushstate-driver", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "A Cycle.js driver for working with the current URL", | ||
@@ -30,4 +30,4 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"@cycle/core": "^4.0.0" | ||
"rx": "^4.0.6" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5865
24