cash-tokenizer-client
Advanced tools
Comparing version 0.0.2 to 0.0.3
24
index.js
@@ -34,18 +34,18 @@ const EventSource = require('eventsource') | ||
function subscribeToExecutedRedemptionsPubSub(fn){ | ||
const uri = config.apiServerAddress+'/redemptions/subscribeToExecutedPubSub' | ||
const es = new EventSource(uri) | ||
es.addEventListener('executedRedemption', function (e) { | ||
if(!e.close){ | ||
e.close = function (){ | ||
es._close() | ||
function subscribeToExecutedRedemptionsPubSub(fn){ | ||
const uri = config.apiServerAddress+'/redemptions/subscribeToExecutedPubSub' | ||
const es = new EventSource(uri) | ||
es.addEventListener('executedRedemption', function (e) { | ||
if(!e.close){ | ||
e.close = function (){ | ||
es._close() | ||
} | ||
} | ||
} | ||
fn(e) | ||
}) | ||
} | ||
fn(e) | ||
}) | ||
} | ||
return { | ||
isAPIRunning, | ||
subscribeToExecutedPubSub | ||
} | ||
@@ -52,0 +52,0 @@ } |
{ | ||
"name": "cash-tokenizer-client", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A nodejs client for the cash-tokenizer API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3024
48