Socket
Socket
Sign inDemoInstall

rx

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rx - npm Package Compare versions

Comparing version 2.1.16 to 2.1.17

2

bower.json
{
"name": "Rx",
"version": "2.1.16",
"version": "2.1.17",
"main": [

@@ -5,0 +5,0 @@ "rx.js",

@@ -5,3 +5,3 @@ {

"description": "Library for composing asynchronous and event-based operations in JavaScript",
"version": "2.1.16",
"version": "2.1.17",
"homepage": "http://rx.codeplex.com",

@@ -8,0 +8,0 @@ "author": {

@@ -16,9 +16,4 @@ var Rx = require('./rx');

/**
* Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
* Converts a callback function to an observable sequence.
*
* @example
* 1 - res = Rx.Node.fromCallback(function (x, y) { return x + y; })(4, 3);
* 2 - res = Rx.Node.fromCallback(function (x, y) { return x + y; }, Rx.Scheduler.timeout)(4, 3);
* 2 - res = Rx.Node.fromCallback(function (x) { this.log(x); }, Rx.Scheduler.timeout, console)('hello');
*
* @param {Function} function Function to convert to an asynchronous function.

@@ -29,4 +24,22 @@ * @param {Scheduler} [scheduler] Scheduler to run the function on. If not specified, defaults to Scheduler.timeout.

*/
fromCallback: Rx.Observable.toAsync,
fromCallback: function (func, scheduler, context) {
scheduler || (scheduler = Rx.Scheduler.timeout);
return function () {
var args = slice.call(arguments, 0),
subject = new Rx.AsyncSubject();
scheduler.schedule(function () {
function handler() {
subject.onNext(arguments);
subject.onCompleted();
}
args.push(handler);
func.apply(context, args);
});
return subject.asObservable();
};
},
/**

@@ -33,0 +46,0 @@ * Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format.

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