mirror of
https://github.com/Hopiu/postal.js.git
synced 2026-03-17 06:30:23 +00:00
13 lines
No EOL
327 B
JavaScript
13 lines
No EOL
327 B
JavaScript
module.exports = function(postal) {
|
|
postal.addWireTap(function(data) {
|
|
if(!JSON) {
|
|
throw "This browser or environment does provide JSON support";
|
|
}
|
|
try {
|
|
console.log(JSON.stringify(data));
|
|
}
|
|
catch(exception) {
|
|
console.log("Unable to parse data to JSON: " + exception);
|
|
}
|
|
});
|
|
}; |