cycle-hashchange-driver
Advanced tools
Comparing version 4.0.0 to 5.0.0
@@ -8,4 +8,8 @@ '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 normalizeHash(hash) { | ||
@@ -16,7 +20,7 @@ return hash.split('#').slice(1).join('#'); | ||
function noHashChangeDriver() { | ||
return _cycleCore.Rx.Observable.just(global.location.hash).map(normalizeHash); | ||
return _rx2['default'].Observable.just(global.location.hash).map(normalizeHash); | ||
} | ||
function hashChangeDriver() { | ||
return _cycleCore.Rx.Observable.fromEvent(global, 'hashchange').pluck('newURL').startWith(global.location.hash).map(normalizeHash).distinctUntilChanged(); | ||
return _rx2['default'].Observable.fromEvent(global, 'hashchange').pluck('newURL').startWith(global.location.hash).map(normalizeHash).distinctUntilChanged(); | ||
} | ||
@@ -23,0 +27,0 @@ |
{ | ||
"name": "cycle-hashchange-driver", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "A Cycle.js driver for the hashchange event", | ||
@@ -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
3157
20