New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ofx-data-extractor

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ofx-data-extractor - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

16

dist/esm/index.min.js

@@ -1,11 +0,11 @@

// Ofx-data-extractor v1.2.1 Copyright (c) 2023 Fábio Pereira França
const h=/<\/\w+>/g,m=/<\w+>/g,u="<STMTTRN>",a="</STMTTRN>";function R(n){const t=n.slice(0,4),e=n.slice(4,6),s=n.slice(6,8),r=n.slice(8,10),i=n.slice(10,12),o=n.slice(12,14),[l,p]=n.slice(14).replace("[","").replace("]","").split(":");return{yyyy:t,yy:t.slice(2),y:t,MM:e,M:e,dd:s,d:s,hh:r,h:r,mm:i,m:i,ss:o,s:o,O:l,TZ:p}}function f(n,t){const e=R(n);let s=t;for(const[r,i]of Object.entries(e))s=s.replace(r,i);return s}function T(n){const t=n.replace(/(},})/g,"}}").replace(/(}")/g,'},"').replace(/(},])/g,"}]").replace(/(,})/g,"}").replace(/({")/g,`{
// Ofx-data-extractor v1.2.4 Copyright (c) 2023 Fábio Pereira França
const h=/<\/\w+>/g,m=/<\w+>/g,u="<STMTTRN>",o="</STMTTRN>";function R(n){const t=n.slice(0,4),e=n.slice(4,6),r=n.slice(6,8),s=n.slice(8,10),i=n.slice(10,12),a=n.slice(12,14),[l,p]=n.slice(14).replace("[","").replace("]","").split(":");return{yyyy:t,yy:t.slice(2),y:t,MM:e,M:e,dd:r,d:r,hh:s,h:s,mm:i,m:i,ss:a,s:a,O:l,TZ:p}}function f(n,t){const e=R(n);let r=t;for(const[s,i]of Object.entries(e))r=r.replace(s,i);return r}function T(n){const t=n.replace(/(},})/g,"}}").replace(/(}")/g,'},"').replace(/(},])/g,"}]").replace(/(,})/g,"}").replace(/({")/g,`{
"`).replace(/(})/g,`
}`).replace(/(",")/g,`",
"`).replace(/,\s*}/g,`
}`).replace(/(,",)/,",");return t.at(-1)===","?t.slice(0,-1):t}function y(n){const t=n.slice(0,12),e=n.slice(12,19),s=n.slice(19),r={date:t,transactionCode:e,protocol:s};return JSON.stringify(r)}function N(n){return n.startsWith("DT")}function w(n){return n.trim()}function S(n){return n===u?n:n.replace(/[<]/g,`
`).replace(/[>]/g,":{")}function D(n){return n===a?`
${n}`:"},"}function b(n){const t=n.search(","),e=n.search(".");return t>e?n.replace(/[.]/g,"").replace(/[,]/g,"."):n.replace(/[,]/g,"")}function g(n,t){return n.endsWith("ID")||n.endsWith("NUM")?!1:!isNaN(Number(t))}function d(n){const t=n.indexOf(u),e=n.lastIndexOf(a)+a.length,s=n.substring(t,e),r=new RegExp(u,"g"),i=new RegExp(a,"g"),o=`"STRTTRN":[${s.replace(r,"{").replace(i,"},")}]`;return{oldListText:s,newListText:o}}function E(n,t){const e={};for(const s of n){const[r,i]=s.split(":"),o=r.replace(`
`,"");e[o]=t&&g(r,i)?Number(i):i}return e}function x(n){return n.reduce((t,e)=>e.TRNTYPE.toLocaleLowerCase().startsWith("deb")?(t.amountOfDebits++,t.debit+=Number(e.TRNAMT.replace("-","")),t):(t.amountOfCredits++,t.credit+=Number(e.TRNAMT),t),{credit:0,debit:0,amountOfCredits:0,amountOfDebits:0})}function O(n){return n.toString()}async function M(n){return await new Promise((e,s)=>{import("fs").then(r=>r.readFile(n,(i,o)=>{i?s(i):e(o.toString())}))})}function _(n,t){let e=n;for(const s of t.split(".")){if(!Object.hasOwn(e,s))return;e=e[s]}return e}async function F(n){return await new Promise((e,s)=>{if(typeof window<"u"&&window.FileReader){const r=new window.FileReader;r.onload=i=>e(i.target.result),r.onerror=i=>s(i.target.error),r.readAsText(n)}else s(new Error("FileReader is not available in this environment."))})}class c{_data;_config={};constructor(t,e){e&&(this._config=e),this._data=t}static fromBuffer(t){return new c(O(t))}static async fromFilePath(t){const e=await M(t);return new c(e)}static async fromBlob(t){const e=await F(t);return new c(e)}config(t){return this._config=t,this}getHeaders(){const[t]=this._data.split("<OFX>"),e=t.split(`
`),s=i=>!!i.trim().length,r=e.filter(s);return E(r,!!this._config.nativeTypes)}getBankTransferList(){const{newListText:t}=d(this.getPartialJsonData()),e=t.slice(10),s=T(e);return JSON.parse(s)}getPartialJsonData(){const[t,e]=this._data.split("<OFX>"),s="<OFX>"+e,{sanitize:r}=this;return s.replace(h,D).replace(m,S).split(`
`).map(w).filter(Boolean).map(r,this).join("")}sanitizeValue(t,e){let s=e.replace(/[{]/g,"").replace(/(},)/g,"");return t.endsWith("AMT")&&(s=b(s)),N(t)&&(s=this.configDate(s)),t==="FITID"?this.configFinancialInstitutionTransactionId(s):this._config.nativeTypes&&g(t,s)?`${s},`:`"${s}",`}sanitize(t){let e=t;const s=e.slice(0,e.indexOf(":")),r=this.sanitizeValue,i=l=>r.call(this,s,l);return t.match(/{(\w|\W)+/)&&(e=e.replace(/({(\w|\W)+)$/,i)),e.search(/(^\w+:)/)<0?e:e.replace(s+":",`"${s}":`)}configFinancialInstitutionTransactionId(t){const{fitId:e}=this._config;return e==="separated"?y(t):`"${t}",`}configDate(t){const{formatDate:e}=this._config;return e?f(t,e):f(t,"y-M-d")}getTransactionsSummary(){const t=this.getContent(),{DTEND:e,DTSTART:s,STRTTRN:r}=t.OFX.BANKMSGSRSV1.STMTTRNRS.STMTRS.BANKTRANLIST,i=x(r);return{dateStart:s,dateEnd:e,...i}}customResponse(t,e){const s=new Map;for(const[r,i]of Object.entries(e))s.set(r,_(t,i));return Object.fromEntries(s)}getContent(){const t=this.getPartialJsonData(),{newListText:e,oldListText:s}=d(t),r=t.replace(s,e);return JSON.parse(`{${T(r)}}`)}toJson(t){const e=this.getHeaders(),s=this.getContent(),r={...e,...s};return t?this.customResponse(r,t):r}}export{c as Ofx,F as blobToString,O as bufferToString,M as fileFromPathToString,T as fixJsonProblems,f as formatDate};
}`).replace(/(,",)/,",");return t.at(-1)===","?t.slice(0,-1):t}function N(n){const t=n.slice(0,12),e=n.slice(12,19),r=n.slice(19),s={date:t,transactionCode:e,protocol:r};return JSON.stringify(s)}function w(n){return n.startsWith("DT")}function S(n){return n.trim()}function y(n){return n===u?n:n.replace(/[<]/g,`
`).replace(/[>]/g,":{")}function D(n){return n===o?`
${n}`:"},"}function x(n){const t=n.search(","),e=n.search(".");return t>e?n.replace(/[.]/g,"").replace(/[,]/g,"."):n.replace(/[,]/g,"")}function g(n,t){return n.endsWith("ID")||n.endsWith("NUM")?!1:!isNaN(Number(t))}function d(n){const t=n.indexOf(u),e=n.lastIndexOf(o)+o.length,r=n.substring(t,e),s=new RegExp(u,"g"),i=new RegExp(o,"g"),a=`"STRTTRN":[${r.replace(s,"{").replace(i,"},")}]`;return{oldListText:r,newListText:a}}function E(n,t){const e={};for(const r of n){const[s,i]=r.split(":"),a=s.replace(`
`,"");e[a]=t&&g(s,i)?Number(i):i}return e}function b(n){return n.reduce((t,e)=>e.TRNTYPE.toLocaleLowerCase().startsWith("deb")?(t.amountOfDebits++,t.debit+=Number(e.TRNAMT.replace("-","")),t):(t.amountOfCredits++,t.credit+=Number(e.TRNAMT),t),{credit:0,debit:0,amountOfCredits:0,amountOfDebits:0})}function O(n){return n.toString()}async function _(n){return await new Promise((e,r)=>{import("fs").then(s=>s.readFile(n,(i,a)=>{i?r(i):e(a.toString())}))})}async function M(n){return await new Promise((e,r)=>{if(typeof window<"u"&&window.FileReader){const s=new window.FileReader;s.onload=i=>e(i.target.result),s.onerror=i=>r(i.target.error),s.readAsText(n)}else r(new Error("FileReader is not available in this environment."))})}class c{_data;_config={};constructor(t,e){e&&(this._config=e),this._data=t}static fromBuffer(t){return new c(O(t))}static async fromFilePath(t){const e=await _(t);return new c(e)}static async fromBlob(t){const e=await M(t);return new c(e)}config(t){return this._config=t,this}getHeaders(){const[t]=this._data.split("<OFX>"),e=t.split(`
`),r=i=>!!i.trim().length,s=e.filter(r);return E(s,!!this._config.nativeTypes)}getBankTransferList(){const{newListText:t}=d(this.getPartialJsonData()),e=t.slice(10),r=T(e);return JSON.parse(r)}getPartialJsonData(){const[t,e]=this._data.split("<OFX>"),r="<OFX>"+e,{sanitize:s}=this;return r.replace(h,D).replace(m,y).split(`
`).map(S).filter(Boolean).map(s,this).join("")}sanitizeValue(t,e){let r=e.replace(/[{]/g,"").replace(/(},)/g,"");return t.endsWith("AMT")&&(r=x(r)),w(t)&&(r=this.configDate(r)),t==="FITID"?this.configFinancialInstitutionTransactionId(r):this._config.nativeTypes&&g(t,r)?`${r},`:`"${r}",`}sanitize(t){let e=t;const r=e.slice(0,e.indexOf(":")),s=this.sanitizeValue,i=l=>s.call(this,r,l);return t.match(/{(\w|\W)+/)&&(e=e.replace(/({(\w|\W)+)$/,i)),e.search(/(^\w+:)/)<0?e:e.replace(r+":",`"${r}":`)}configFinancialInstitutionTransactionId(t){const{fitId:e}=this._config;return e==="separated"?N(t):`"${t}",`}configDate(t){const{formatDate:e}=this._config;return e?f(t,e):f(t,"y-M-d")}getTransactionsSummary(){const t=this.getContent(),{DTEND:e,DTSTART:r,STRTTRN:s}=t.OFX.BANKMSGSRSV1.STMTTRNRS.STMTRS.BANKTRANLIST,i=b(s);return{dateStart:r,dateEnd:e,...i}}getContent(){const t=this.getPartialJsonData(),{newListText:e,oldListText:r}=d(t),s=t.replace(r,e);return JSON.parse(`{${T(s)}}`)}toJson(){const t=this.getHeaders(),e=this.getContent();return{...t,...e}}}export{c as Ofx,M as blobToString,O as bufferToString,_ as fileFromPathToString,T as fixJsonProblems,f as formatDate};
/// <reference types="node" />
import { OfxResponse, STRTTRN as STRTTRNType } from './types';
import { STRTTRN as STRTTRNType } from './types';
export declare function formatDate(date: string, format: string): string;

@@ -27,3 +27,2 @@ export declare function fixJsonProblems(content: string): string;

export declare function fileFromPathToString(pathname: string): Promise<string>;
export declare function getValueByKeys(objectData: OfxResponse, keys: string): OfxResponse | undefined;
export declare function blobToString(blob: Blob): Promise<string>;
export { Ofx } from './main';
export { formatDate, fixJsonProblems, blobToString, bufferToString, fileFromPathToString, } from './helpers';
export type { OfxResponse, OFXMetaData, OfxStructure, BankTransferList, } from './types';
/// <reference types="node" />
import { Format, OfxConfig, OFXMetaData, OfxStructure, STRTTRN } from './types';
import { OfxConfig, OFXMetaData, OfxResponse, OfxStructure, STRTTRN } from './types';
export declare class Ofx {

@@ -26,5 +26,4 @@ private _data;

};
private customResponse;
getContent(): OfxStructure;
toJson<T>(format: Format<T>): any;
toJson(): OfxResponse;
}

@@ -113,10 +113,3 @@ export type OFXMetaData = {

};
type OfxKeysIntermediate<T, P = ''> = {
[K in keyof T]: T[K] extends object ? `${P & string}${P extends '' ? '' : '.'}${K}` | OfxKeysIntermediate<T[K], `${P & string}${P extends '' ? '' : '.'}${K}`> : `${P & string}${P extends '' ? '' : '.'}${K}`;
}[keyof T];
export type OfxResponse = OFXMetaData & OfxStructure;
export type OfxKeys = OfxKeysIntermediate<OfxResponse>;
export type Format<T> = {
[K in keyof T]: OfxKeysIntermediate<OfxResponse>;
};
export {};

@@ -1,11 +0,11 @@

// Ofx-data-extractor v1.2.1 Copyright (c) 2023 Fábio Pereira França
(function(o,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(o=typeof globalThis<"u"?globalThis:o||self,c(o.ofx={}))})(this,function(o){"use strict";const c=/<\/\w+>/g,N=/<\w+>/g,f="<STMTTRN>",u="</STMTTRN>";function w(n){const t=n.slice(0,4),e=n.slice(4,6),s=n.slice(6,8),r=n.slice(8,10),i=n.slice(10,12),a=n.slice(12,14),[g,L]=n.slice(14).replace("[","").replace("]","").split(":");return{yyyy:t,yy:t.slice(2),y:t,MM:e,M:e,dd:s,d:s,hh:r,h:r,mm:i,m:i,ss:a,s:a,O:g,TZ:L}}function T(n,t){const e=w(n);let s=t;for(const[r,i]of Object.entries(e))s=s.replace(r,i);return s}function d(n){const t=n.replace(/(},})/g,"}}").replace(/(}")/g,'},"').replace(/(},])/g,"}]").replace(/(,})/g,"}").replace(/({")/g,`{
// Ofx-data-extractor v1.2.4 Copyright (c) 2023 Fábio Pereira França
(function(o,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(o=typeof globalThis<"u"?globalThis:o||self,c(o.ofx={}))})(this,function(o){"use strict";const c=/<\/\w+>/g,S=/<\w+>/g,u="<STMTTRN>",f="</STMTTRN>";function y(n){const t=n.slice(0,4),e=n.slice(4,6),s=n.slice(6,8),r=n.slice(8,10),i=n.slice(10,12),a=n.slice(12,14),[g,M]=n.slice(14).replace("[","").replace("]","").split(":");return{yyyy:t,yy:t.slice(2),y:t,MM:e,M:e,dd:s,d:s,hh:r,h:r,mm:i,m:i,ss:a,s:a,O:g,TZ:M}}function T(n,t){const e=y(n);let s=t;for(const[r,i]of Object.entries(e))s=s.replace(r,i);return s}function d(n){const t=n.replace(/(},})/g,"}}").replace(/(}")/g,'},"').replace(/(},])/g,"}]").replace(/(,})/g,"}").replace(/({")/g,`{
"`).replace(/(})/g,`
}`).replace(/(",")/g,`",
"`).replace(/,\s*}/g,`
}`).replace(/(,",)/,",");return t.at(-1)===","?t.slice(0,-1):t}function S(n){const t=n.slice(0,12),e=n.slice(12,19),s=n.slice(19),r={date:t,transactionCode:e,protocol:s};return JSON.stringify(r)}function b(n){return n.startsWith("DT")}function D(n){return n.trim()}function E(n){return n===f?n:n.replace(/[<]/g,`
`).replace(/[>]/g,":{")}function x(n){return n===u?`
${n}`:"},"}function O(n){const t=n.search(","),e=n.search(".");return t>e?n.replace(/[.]/g,"").replace(/[,]/g,"."):n.replace(/[,]/g,"")}function p(n,t){return n.endsWith("ID")||n.endsWith("NUM")?!1:!isNaN(Number(t))}function h(n){const t=n.indexOf(f),e=n.lastIndexOf(u)+u.length,s=n.substring(t,e),r=new RegExp(f,"g"),i=new RegExp(u,"g"),a=`"STRTTRN":[${s.replace(r,"{").replace(i,"},")}]`;return{oldListText:s,newListText:a}}function M(n,t){const e={};for(const s of n){const[r,i]=s.split(":"),a=r.replace(`
`,"");e[a]=t&&p(r,i)?Number(i):i}return e}function _(n){return n.reduce((t,e)=>e.TRNTYPE.toLocaleLowerCase().startsWith("deb")?(t.amountOfDebits++,t.debit+=Number(e.TRNAMT.replace("-","")),t):(t.amountOfCredits++,t.credit+=Number(e.TRNAMT),t),{credit:0,debit:0,amountOfCredits:0,amountOfDebits:0})}function m(n){return n.toString()}async function R(n){return await new Promise((e,s)=>{import("fs").then(r=>r.readFile(n,(i,a)=>{i?s(i):e(a.toString())}))})}function F(n,t){let e=n;for(const s of t.split(".")){if(!Object.hasOwn(e,s))return;e=e[s]}return e}async function y(n){return await new Promise((e,s)=>{if(typeof window<"u"&&window.FileReader){const r=new window.FileReader;r.onload=i=>e(i.target.result),r.onerror=i=>s(i.target.error),r.readAsText(n)}else s(new Error("FileReader is not available in this environment."))})}class l{_data;_config={};constructor(t,e){e&&(this._config=e),this._data=t}static fromBuffer(t){return new l(m(t))}static async fromFilePath(t){const e=await R(t);return new l(e)}static async fromBlob(t){const e=await y(t);return new l(e)}config(t){return this._config=t,this}getHeaders(){const[t]=this._data.split("<OFX>"),e=t.split(`
`),s=i=>!!i.trim().length,r=e.filter(s);return M(r,!!this._config.nativeTypes)}getBankTransferList(){const{newListText:t}=h(this.getPartialJsonData()),e=t.slice(10),s=d(e);return JSON.parse(s)}getPartialJsonData(){const[t,e]=this._data.split("<OFX>"),s="<OFX>"+e,{sanitize:r}=this;return s.replace(c,x).replace(N,E).split(`
`).map(D).filter(Boolean).map(r,this).join("")}sanitizeValue(t,e){let s=e.replace(/[{]/g,"").replace(/(},)/g,"");return t.endsWith("AMT")&&(s=O(s)),b(t)&&(s=this.configDate(s)),t==="FITID"?this.configFinancialInstitutionTransactionId(s):this._config.nativeTypes&&p(t,s)?`${s},`:`"${s}",`}sanitize(t){let e=t;const s=e.slice(0,e.indexOf(":")),r=this.sanitizeValue,i=g=>r.call(this,s,g);return t.match(/{(\w|\W)+/)&&(e=e.replace(/({(\w|\W)+)$/,i)),e.search(/(^\w+:)/)<0?e:e.replace(s+":",`"${s}":`)}configFinancialInstitutionTransactionId(t){const{fitId:e}=this._config;return e==="separated"?S(t):`"${t}",`}configDate(t){const{formatDate:e}=this._config;return e?T(t,e):T(t,"y-M-d")}getTransactionsSummary(){const t=this.getContent(),{DTEND:e,DTSTART:s,STRTTRN:r}=t.OFX.BANKMSGSRSV1.STMTTRNRS.STMTRS.BANKTRANLIST,i=_(r);return{dateStart:s,dateEnd:e,...i}}customResponse(t,e){const s=new Map;for(const[r,i]of Object.entries(e))s.set(r,F(t,i));return Object.fromEntries(s)}getContent(){const t=this.getPartialJsonData(),{newListText:e,oldListText:s}=h(t),r=t.replace(s,e);return JSON.parse(`{${d(r)}}`)}toJson(t){const e=this.getHeaders(),s=this.getContent(),r={...e,...s};return t?this.customResponse(r,t):r}}o.Ofx=l,o.blobToString=y,o.bufferToString=m,o.fileFromPathToString=R,o.fixJsonProblems=d,o.formatDate=T});
}`).replace(/(,",)/,",");return t.at(-1)===","?t.slice(0,-1):t}function w(n){const t=n.slice(0,12),e=n.slice(12,19),s=n.slice(19),r={date:t,transactionCode:e,protocol:s};return JSON.stringify(r)}function b(n){return n.startsWith("DT")}function D(n){return n.trim()}function x(n){return n===u?n:n.replace(/[<]/g,`
`).replace(/[>]/g,":{")}function E(n){return n===f?`
${n}`:"},"}function O(n){const t=n.search(","),e=n.search(".");return t>e?n.replace(/[.]/g,"").replace(/[,]/g,"."):n.replace(/[,]/g,"")}function p(n,t){return n.endsWith("ID")||n.endsWith("NUM")?!1:!isNaN(Number(t))}function h(n){const t=n.indexOf(u),e=n.lastIndexOf(f)+f.length,s=n.substring(t,e),r=new RegExp(u,"g"),i=new RegExp(f,"g"),a=`"STRTTRN":[${s.replace(r,"{").replace(i,"},")}]`;return{oldListText:s,newListText:a}}function _(n,t){const e={};for(const s of n){const[r,i]=s.split(":"),a=r.replace(`
`,"");e[a]=t&&p(r,i)?Number(i):i}return e}function F(n){return n.reduce((t,e)=>e.TRNTYPE.toLocaleLowerCase().startsWith("deb")?(t.amountOfDebits++,t.debit+=Number(e.TRNAMT.replace("-","")),t):(t.amountOfCredits++,t.credit+=Number(e.TRNAMT),t),{credit:0,debit:0,amountOfCredits:0,amountOfDebits:0})}function m(n){return n.toString()}async function R(n){return await new Promise((e,s)=>{import("fs").then(r=>r.readFile(n,(i,a)=>{i?s(i):e(a.toString())}))})}async function N(n){return await new Promise((e,s)=>{if(typeof window<"u"&&window.FileReader){const r=new window.FileReader;r.onload=i=>e(i.target.result),r.onerror=i=>s(i.target.error),r.readAsText(n)}else s(new Error("FileReader is not available in this environment."))})}class l{_data;_config={};constructor(t,e){e&&(this._config=e),this._data=t}static fromBuffer(t){return new l(m(t))}static async fromFilePath(t){const e=await R(t);return new l(e)}static async fromBlob(t){const e=await N(t);return new l(e)}config(t){return this._config=t,this}getHeaders(){const[t]=this._data.split("<OFX>"),e=t.split(`
`),s=i=>!!i.trim().length,r=e.filter(s);return _(r,!!this._config.nativeTypes)}getBankTransferList(){const{newListText:t}=h(this.getPartialJsonData()),e=t.slice(10),s=d(e);return JSON.parse(s)}getPartialJsonData(){const[t,e]=this._data.split("<OFX>"),s="<OFX>"+e,{sanitize:r}=this;return s.replace(c,E).replace(S,x).split(`
`).map(D).filter(Boolean).map(r,this).join("")}sanitizeValue(t,e){let s=e.replace(/[{]/g,"").replace(/(},)/g,"");return t.endsWith("AMT")&&(s=O(s)),b(t)&&(s=this.configDate(s)),t==="FITID"?this.configFinancialInstitutionTransactionId(s):this._config.nativeTypes&&p(t,s)?`${s},`:`"${s}",`}sanitize(t){let e=t;const s=e.slice(0,e.indexOf(":")),r=this.sanitizeValue,i=g=>r.call(this,s,g);return t.match(/{(\w|\W)+/)&&(e=e.replace(/({(\w|\W)+)$/,i)),e.search(/(^\w+:)/)<0?e:e.replace(s+":",`"${s}":`)}configFinancialInstitutionTransactionId(t){const{fitId:e}=this._config;return e==="separated"?w(t):`"${t}",`}configDate(t){const{formatDate:e}=this._config;return e?T(t,e):T(t,"y-M-d")}getTransactionsSummary(){const t=this.getContent(),{DTEND:e,DTSTART:s,STRTTRN:r}=t.OFX.BANKMSGSRSV1.STMTTRNRS.STMTRS.BANKTRANLIST,i=F(r);return{dateStart:s,dateEnd:e,...i}}getContent(){const t=this.getPartialJsonData(),{newListText:e,oldListText:s}=h(t),r=t.replace(s,e);return JSON.parse(`{${d(r)}}`)}toJson(){const t=this.getHeaders(),e=this.getContent();return{...t,...e}}}o.Ofx=l,o.blobToString=N,o.bufferToString=m,o.fileFromPathToString=R,o.fixJsonProblems=d,o.formatDate=T});
{
"name": "ofx-data-extractor",
"version": "1.2.3",
"version": "1.2.4",
"keywords": [

@@ -5,0 +5,0 @@ "ofx",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc