MCPcopy Create free account
hub / github.com/ajlopez/SimpleBus / makeObjectPredicate

Function makeObjectPredicate

lib/simplebus.js:35–48  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

33}
34
35function makeObjectPredicate(obj)
36{
37 return function(msg) {
38 for (var name in obj)
39 if (typeof obj[name] == 'function') {
40 if (!obj[name](msg[name],msg))
41 return false;
42 }
43 else if (msg[name] != obj[name])
44 return false;
45
46 return true;
47 };
48}
49
50function RemoteServer(bus, clients) {
51 this.post = function (msg) {

Callers 1

BusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected