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

rxjs-marbles

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rxjs-marbles - npm Package Compare versions

Comparing version 2.3.3 to 2.4.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

<a name="2.4.0"></a>
## [2.4.0](https://github.com/cartant/rxjs-marbles/compare/v2.3.3...v2.4.0) (2018-04-11)
### Features
* **reframe**: Add `reframe` to the `Context` to allow the number of frames per character to be specified. ([15ef0e9](https://github.com/cartant/rxjs-marbles/commit/15ef0e9))
<a name="2.3.3"></a>

@@ -2,0 +9,0 @@ ## [2.3.3](https://github.com/cartant/rxjs-marbles/compare/v2.3.2...v2.3.3) (2018-03-29)

3

context.d.ts

@@ -13,2 +13,4 @@ import { Observable } from "rxjs/Observable";

private bindings_;
private frameTimeFactor_;
private reframable_;
constructor(scheduler: TestScheduler);

@@ -33,4 +35,5 @@ bind(...schedulers: IScheduler[]): void;

}, error?: any): HotObservable<T>;
reframe(framesPerCharacter: number, maxFrames?: number): void;
teardown(): void;
time(marbles: string): number;
}

@@ -0,1 +1,2 @@

import { VirtualTimeScheduler } from "rxjs/Scheduler/VirtualTimeScheduler";
import { animationFrame } from "rxjs/scheduler/animationFrame";

@@ -5,2 +6,3 @@ import { asap } from "rxjs/scheduler/asap";

import { queue } from "rxjs/scheduler/queue";
import { TestScheduler } from "rxjs/testing/TestScheduler";
import { argsSymbol } from "./args";

@@ -16,2 +18,4 @@ import { assertArgs, assertSubscriptions } from "./assert";

this.bindings_ = [];
this.frameTimeFactor_ = undefined;
this.reframable_ = true;
}

@@ -40,2 +44,3 @@ Context.prototype.bind = function () {

var scheduler = this.scheduler;
this.reframable_ = false;
var observable = scheduler.createColdObservable(marbles, values, error);

@@ -75,2 +80,3 @@ observable[argsSymbol] = { error: error, marbles: marbles, values: values };

var scheduler = this.scheduler;
this.reframable_ = false;
scheduler.flush();

@@ -85,2 +91,3 @@ };

var scheduler = this.scheduler;
this.reframable_ = false;
var observable = scheduler.createHotObservable(marbles, values, error);

@@ -90,2 +97,15 @@ observable[argsSymbol] = { error: error, marbles: marbles, values: values };

};
Context.prototype.reframe = function (framesPerCharacter, maxFrames) {
if (!this.reframable_) {
throw new Error("Cannot reframe; scheduler already used.");
}
if (maxFrames === undefined) {
maxFrames = framesPerCharacter * 75;
}
this.frameTimeFactor_ = VirtualTimeScheduler.frameTimeFactor;
VirtualTimeScheduler.frameTimeFactor = framesPerCharacter;
TestScheduler.frameTimeFactor = framesPerCharacter;
var scheduler = this.scheduler;
scheduler.maxFrames = maxFrames;
};
Context.prototype.teardown = function () {

@@ -113,2 +133,6 @@ try {

});
if (this.frameTimeFactor_) {
VirtualTimeScheduler.frameTimeFactor = this.frameTimeFactor_;
TestScheduler.frameTimeFactor = this.frameTimeFactor_;
}
}

@@ -118,2 +142,3 @@ };

var scheduler = this.scheduler;
this.reframable_ = false;
return scheduler.createTime(marbles);

@@ -120,0 +145,0 @@ };

6

marbles.js

@@ -15,4 +15,3 @@ import { TestScheduler } from "rxjs/testing/TestScheduler";

try {
var result = func.apply(void 0, [context, first].concat(rest));
return result;
return func.apply(void 0, [context, first].concat(rest));
}

@@ -32,4 +31,3 @@ finally {

try {
var result = func.apply(void 0, [context].concat(rest));
return result;
return func.apply(void 0, [context].concat(rest));
}

@@ -36,0 +34,0 @@ finally {

@@ -43,4 +43,4 @@ {

"unpkg": "./bundles/rxjs-marbles.umd.js",
"version": "2.3.3",
"version": "2.4.0",
"ava": {}
}

@@ -287,2 +287,3 @@ # rxjs-marbles

hot<T = any>(marbles: string, values?: any, error?: any): HotObservable<T>;
reframe(framesPerCharacter: number, maxFrames?: number): void;
readonly scheduler: TestScheduler;

@@ -289,0 +290,0 @@ teardown(): void;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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