Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedwatson/aba
Deprecated; use aba-generator instead
https://github.com/jedwatson/aba
Last synced: 21 days ago
JSON representation
Deprecated; use aba-generator instead
- Host: GitHub
- URL: https://github.com/jedwatson/aba
- Owner: JedWatson
- License: mit
- Created: 2015-09-07T05:21:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-03-29T02:56:36.000Z (over 4 years ago)
- Last Synced: 2024-10-04T02:41:15.111Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://github.com/koresar/aba-generator
- Size: 5.86 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deprecation Notice
This repository contains work that was unfinished, and this code is not the same as the published `aba` package on npm.
I recommend using [aba-generator](https://www.npmjs.com/package/aba-generator) by @koresar, the source for which is at [koresar/aba-generator](https://github.com/koresar/aba-generator).
---
# ABA Generator
Creates Australian Bank Payment Files (ABA / Cemtex / Australian Bankers Association format).
ABA files are used by Australian banks to facilitate batch transactions.
For more information on the format, see [cemtexaba.com](https://www.cemtexaba.com/aba-format)
## Usage
Install the package:
```
npm install aba --save
```Create a new ABA file:
```
var ABA = require('aba');
var fs = require('fs');var file = new ABA(descriptor, [...records]);
file.add(record, ...record);if (file.isValid()) {
var contents = file.generate(); // will throw an error if the file is not valid
var filename = 'file.aba';
var totals = file.getTotals();
fs.writeFile(filename, contents, function (err) {
if (err) throw err;
console.log('ABA file saved to ' + filename);
});
} else {
console.log('File has validation errors:', file.getValidationErrors());
}
```