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

vue-rx

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-rx - npm Package Compare versions

Comparing version 2.1.3 to 2.2.0

2

package.json
{
"name": "vue-rx",
"version": "2.1.3",
"version": "2.2.0",
"description": "RxJS bindings for Vue",

@@ -5,0 +5,0 @@ "main": "vue-rx.js",

@@ -30,3 +30,3 @@ # vue-rx

import { Observable } from 'rxjs/Observable'
import { Subscription } from 'rxjs/Subscription'
import { Subscription } from 'rxjs/Subscription' // Disposable if using RxJS4

@@ -114,2 +114,16 @@ // tada!

#### `$subscribeTo(observable, next, error, complete)`
This is a prototype method added to instances. You can use it to subscribe to an observable, but let VueRx manage the dispose/unsubscribe.
``` js
var vm = new Vue({
mounted () {
this.$subscribeTo(Rx.Observable.interval(1000), function (count) {
console.log(count)
})
}
})
```
#### `$fromDOMEvent(selector, event)`

@@ -116,0 +130,0 @@

@@ -108,3 +108,3 @@ (function () {

if (typeof window === 'undefined') {
return Rx.Observable.create(() => {})
return Rx.Observable.create(function () {})
}

@@ -137,2 +137,8 @@

}
Vue.prototype.$subscribeTo = function(observable, next, error, complete) {
var obs$ = observable.subscribe(next, error, complete)
;(this._obSubscriptions || (this._obSubscriptions = [])).push(obs$)
return obs$
}
}

@@ -139,0 +145,0 @@

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