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

corporate

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

corporate - npm Package Compare versions

Comparing version 0.0.16 to 0.1.0

26

lib/tito.js

@@ -70,6 +70,5 @@ "use strict";

function parseTito(txt) {
var headerInfo,
entries = [],
balances = [],
summaries = [];
var titos = []
, currentEntry;
txt.split("\n").forEach(function(line) {

@@ -84,4 +83,6 @@ line = line.replace(/\}/g, 'å')

if (basicInfoRe.test(line)) {
currentEntry = { entries: [], balances: [], transactionSummaries: [] }
titos.push(currentEntry);
m = XRegExp.exec(line, basicInfoRe);
headerInfo = {
currentEntry.header = {
accountName: m.accountName.trim(),

@@ -106,3 +107,3 @@ accountOwnerName: m.accountOwnerName.trim(),

m = XRegExp.exec(line, entryInfoRe);
entries.push({
currentEntry.entries.push({
additionalInformation: [],

@@ -122,3 +123,3 @@ amount: Number(m.amount) / 100 * (m.sign === '-' ? -1 : 1),

m = XRegExp.exec(line, additionalEntryInfoRe);
var entry = entries[entries.length - 1];
var entry = currentEntry.entries[currentEntry.entries.length - 1];
if (['00', '07', '06', '08'].indexOf(m.infoType) !== -1 ) {

@@ -133,3 +134,3 @@ var totalLength = Number(m.infoLength), parts = [];

m = XRegExp.exec(line, balanceRe);
balances.push({
currentEntry.balances.push({
bookingDate: stringToDateString(m.bookingDate),

@@ -141,3 +142,3 @@ amount: Number(m.amount) / 100 * (m.amountSign === '-' ? -1 : 1),

m = XRegExp.exec(line, summaryRe);
summaries.push({
currentEntry.transactionSummaries.push({
depositAmount: Number(m.depositAmount) / 100 * (m.depositAmountSign === '-' ? -1 : 1),

@@ -152,8 +153,3 @@ depositCount: Number(m.depositCount),

});
return {
header: headerInfo,
entries: entries,
balances: balances,
transactionSummaries: summaries
};
return titos;
}

@@ -160,0 +156,0 @@

{
"name": "corporate",
"version": "0.0.16",
"version": "0.1.0",
"description": "A module for parsing (mostly) ISO20022 messages",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

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