Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aba-generate

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aba-generate - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

17

index.js

@@ -16,4 +16,4 @@ const moment = require('moment');

const format = bsb => {
const value = bsb.replace(/(\s|-)+/, '');
return `${value.slice(0, 3)}-${value.slice(3, 6)}`;
const value = bsb.replace(/(\s|-)+/, '').trim();
return value ? `${value.slice(0, 3)}-${value.slice(3, 6)}` : '';
};

@@ -45,3 +45,3 @@

'%(bank)-3s',
' ',
' '.repeat(7),
'%(user)-26s',

@@ -52,3 +52,3 @@ '%(userNumber)06d',

'%(time)4s',
' ',
' '.repeat(36),
].join('');

@@ -59,9 +59,9 @@

'999-999',
' ',
' '.repeat(12),
'%(net)010d',
'%(credit)010d',
'%(debit)010d',
' ',
' '.repeat(24),
'%(length)06d',
' ',
' '.repeat(40),
].join('');

@@ -80,2 +80,4 @@

bsb: format(transaction.bsb),
account: transaction.account.trim(),
traceBsb: format(transaction.traceBsb),
taxAmount: toCents(transaction.taxAmount),

@@ -96,2 +98,3 @@ })

date: time.format('DDMMYY'),
bsb: format(header.bsb),
time: header.time ? time.format('HHmm') : '',

@@ -98,0 +101,0 @@ });

{
"name": "aba-generate",
"version": "1.0.2",
"version": "1.0.3",
"description": "ABA file generation",

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

@@ -16,9 +16,10 @@ const ABA = require('../index');

const aba = new ABA({
bsb: '123123',
account: '',
bank: '',
user: '',
bsb: '012-030',
account: '111111111',
bank: 'ANZ',
user: 'A USERNAME',
userNumber: 1234,
description: 'Creditors',
});
const transaction = {

@@ -25,0 +26,0 @@ bsb: '061021',

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