Socket
Socket
Sign inDemoInstall

banking

Package Overview
Dependencies
68
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.2.2

26

lib/banking.js

@@ -11,7 +11,7 @@ var parser = require('xml2json')

exports.version = '0.2.1'
exports.version = '0.2.2';
/**
* Turn Ofx string into valid XML then parse to json if requested
*
*
* @param {String} ofxData

@@ -24,3 +24,3 @@ * @param {String} format (Options are 'xml' || 'json' if omitted defaults to 'json')

exports.parseOfxString = parseOfxString = function (ofxData, format, cb) {
var parseOfxString = exports.parseOfxString = function (ofxData, format, cb) {
if(typeof format !== 'string') cb = format, format = 'json';

@@ -31,4 +31,4 @@

var bodyXML = ('<OFX>'+ofx[1]).replace(/>\s+</g, '><').replace(/\s+</g, '<').replace(/>\s+/g, '>').replace(/<([A-Z0-9_]*)+\.+([A-Z0-9_]*)>([^<]+)/g, '<\$1\$2>\$3' ).replace(/<(\w+?)>([^<]+)/g, '<\$1>\$2</\$1>');
var header = {}
var header = {};
for(var attrs in headerString){

@@ -44,12 +44,12 @@ var headAttributes = headerString[attrs].split(/:/,2);

exports.parseOfxFile = function parseOfxFile(file, format, cb) {
fs.readFile(file, 'UTF8', function (err, data) {
if (err) throw err;
exports.parseOfxFile = function(file, format, cb) {
fs.readFile(file, 'utf8', function (err, data) {
if (err) throw new Error(err);
parseOfxString(data,format,cb);
});
}
};
/**
* Fetches Ofx String from Bank Server and parse to json or returns valid XML
*
*
* @param {JSON} o Request Config Settings

@@ -100,3 +100,3 @@ * @param {String} format (Options are 'xml' || 'json' if omitted defaults to 'json')

'</OFX>';
//Request for CreditCard Statement

@@ -134,4 +134,4 @@ var ofxReqCC = 'OFXHEADER:100\n'+

'</OFX>';
request({
request({
method: 'POST'

@@ -138,0 +138,0 @@ , url: o.url

{
"name": "banking"
, "description": "The missing Bank API for getting you statement data"
, "version": "0.2.1"
, "version": "0.2.2"
, "author": "Christian Sullivan <cs@euforic.co>"

@@ -9,5 +9,5 @@ , "keywords": ["banking", "ofx", "financial", "bank", "quickbooks"]

, "homepage": "http://euforic.github.com/banking.js"
, "dependencies": {
"xml2json": "0.2.4"
, "request": "2.1.1"
, "dependencies": {
"xml2json": ">=0.2.4"
, "request": ">=2.1.1"
}

@@ -14,0 +14,0 @@ , "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc