Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cycle-pushstate-driver

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cycle-pushstate-driver - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

12

lib/index.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc