taylor1791 / arbiter-subpub Goto Github PK
View Code? Open in Web Editor NEWMatt Kruse's ArbiterJS as a node module
License: The Unlicense
Matt Kruse's ArbiterJS as a node module
License: The Unlicense
Currently one test is disabled because it fails and I believe the code should work based on arbiterjs.com in the "Ignore persisted messages" section. Currently spy
is executed unless I make { persist: true }
on the line 5. If this is the expected behavior, then the docs should be updated. Can @matt-kruse verify one way or the other?
1 it( 'allows late subscribers to ignore persisted message', function() {
2 var spy = jasmine.createSpy();
3
4 this.arbiter.publish( 'msg', null, { persist: true } );
5 this.arbiter.subscribe( 'msg', { persist: false }, spy );
6
7 expect( spy ).not.toHaveBeenCalled();
8} );
You should not fail silently, makes debugging impossible when using this module.
https://github.com/taylor1791/Arbiter-SubPub-Node/blob/master/index.js#L127
In my gulp file line 76:
browser: [ 'app//*.js', '!app/lib//.js', '!app/__/.test.js' ]
This will exclude fusionchart from linting. But I lost it when I run the build task --- cyclops-crush.
If I remove the the library from this line:
browser: [ 'app//*.js', '!app//*.test.js' ]
It will be included when I ran cyclops-crush, but jsHint or JSCS is also linting the library, which makes the application extremely slow.
Should we use clearTimeout to cancel asynchronous events that were canceled?
If anyone has a use for this feature, please speak up. We can add this if there is sufficient demand.
failing test
var
spy1 = jasmine.createSpy().and.callFake( function() {
expect( spy2 ).not.toHaveBeenCalled();
} ),
spy2 = jasmine.createSpy();
this.arbiter.subscribe( 'msg/*', { priority: 1 }, spy1 );
this.arbiter.subscribe( 'msg/name', spy2 );
this.arbiter.publish( 'msg/name' );
expect( spy1 ).toHaveBeenCalled();
expect( spy2 ).toHaveBeenCalled();
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.