UNPKG

@midlandsbank/node-nacha

Version:

NACHA ACH EFT File Parser/Formatter for CCD+ / PPD+ / CTX+

29 lines (22 loc) 948 B
function jsonFormatterTransform(data) { return JSON.stringify(data, null, 2); } module.exports = jsonFormatterTransform; /* // Generated by CoffeeScript 1.11.1 var JsonFormatter, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; module.exports = JsonFormatter = (function(superClass) { extend(JsonFormatter, superClass); function JsonFormatter() { JsonFormatter.__super__.constructor.call(this, { readableObjectMode: false, writableObjectMode: true }); } JsonFormatter.prototype._transform = function(data, encoding, done) { return done(null, JSON.stringify(data, null, 2)); }; return JsonFormatter; })(require('stream').Transform); */