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

sp-nacha

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sp-nacha - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

lib/entry-adv/fields.js

1

index.js

@@ -6,2 +6,3 @@ module.exports.File = require('./lib/file');

module.exports.EntryIAT = require('./lib/entry-iat');
module.exports.EntryADV = require('./lib/entry-adv');
module.exports.Utils = require('./lib/utils');

@@ -8,0 +9,0 @@ module.exports.Validate = require('./lib/validate');

21

lib/batch-iat/index.js

@@ -11,3 +11,3 @@ // Batch

function Batch(options) {
function BatchIAT(options) {
this._entries = [];

@@ -79,3 +79,2 @@

this.control.serviceClassCode.value = this.header.serviceClassCode.value;
// this.control.companyIdentification.value = this.header.companyIdentification.value;
this.control.originatingDFI.value = this.header.originatingDFI.value;

@@ -89,3 +88,3 @@

Batch.prototype._validate = function () {
BatchIAT.prototype._validate = function () {

@@ -114,3 +113,3 @@ // Validate required fields have been passed

Batch.prototype.addEntry = function (entry) {
BatchIAT.prototype.addEntry = function (entry) {
let self = this;

@@ -154,3 +153,3 @@

Batch.prototype.generateHeader = function (cb) {
BatchIAT.prototype.generateHeader = function (cb) {
utils.generateString(this.header, function (string) {

@@ -161,3 +160,3 @@ cb(string);

Batch.prototype.generateControl = function (cb) {
BatchIAT.prototype.generateControl = function (cb) {
utils.generateString(this.control, function (string) {

@@ -168,3 +167,3 @@ cb(string);

Batch.prototype.generateEntries = function (cb) {
BatchIAT.prototype.generateEntries = function (cb) {
let result = '';

@@ -182,3 +181,3 @@

Batch.prototype.generateString = function (cb) {
BatchIAT.prototype.generateString = function (cb) {
let self = this;

@@ -195,3 +194,3 @@

Batch.prototype.get = function (field) {
BatchIAT.prototype.get = function (field) {

@@ -209,3 +208,3 @@ // If the header has the field, return the value

Batch.prototype.set = function (field, value) {
BatchIAT.prototype.set = function (field, value) {

@@ -223,2 +222,2 @@ // If the header has the field, set the value

module.exports = Batch;
module.exports = BatchIAT;

@@ -63,3 +63,3 @@ module.exports = {

required: true,
type: 'numeric'
type: 'alphanumeric'
},

@@ -66,0 +66,0 @@

@@ -10,3 +10,3 @@ // Entry

function IATEntry(options) {
function EntryIAT(options) {
this._addendas = [];

@@ -49,3 +49,3 @@

IATEntry.prototype.addAddenda = function (entryAddenda) {
EntryIAT.prototype.addAddenda = function (entryAddenda) {

@@ -63,7 +63,7 @@ // Add indicator to Entry record

IATEntry.prototype.getRecordCount = function () {
EntryIAT.prototype.getRecordCount = function () {
return this._addendas.length + 1;
};
IATEntry.prototype.generateString = function (cb) {
EntryIAT.prototype.generateString = function (cb) {
let self = this;

@@ -81,3 +81,3 @@ async.map(self._addendas, function (entryAddenda, done) {

IATEntry.prototype._validate = function () {
EntryIAT.prototype._validate = function () {

@@ -100,3 +100,3 @@ // Validate required fields

IATEntry.prototype.get = function (category) {
EntryIAT.prototype.get = function (category) {

@@ -109,3 +109,3 @@ // If the header has it, return that (header takes priority)

IATEntry.prototype.set = function (category, value) {
EntryIAT.prototype.set = function (category, value) {

@@ -118,2 +118,2 @@ // If the header has the field, set the value

module.exports = IATEntry;
module.exports = EntryIAT;

@@ -113,3 +113,3 @@ // File

async.each(batch._entries, function (entry, done3) {
entry.fields.traceNumber.value = (entry.fields.traceNumber.value ? entry.fields.traceNumber.value : self.header.immediateOrigin.value.slice(0, 8)) + utils.pad(addendaCount, 7, false, '0');
if (Object.keys(entry.fields).indexOf('sequenceNumberWithinBatch') === -1) entry.fields.traceNumber.value = (entry.fields.traceNumber.value ? entry.fields.traceNumber.value : self.header.immediateOrigin.value.slice(0, 8)) + utils.pad(addendaCount, 7, false, '0');
async.each(entry._addendas, function (addenda, done4) {

@@ -116,0 +116,0 @@ addenda.fields.entryDetailSequenceNumber.value = entry.fields.traceNumber.value.slice(0 - addenda.fields.entryDetailSequenceNumber.width);

{
"name": "sp-nacha",
"description": "NACHA file format is a set of instructions that, when uploaded into a bank portal, successfully initiates a batch of ACH payments. NACHA file format is the protocol for structuring those instructions in a way that successfully initiates the payments. NACHA is a highly customizable Node.js module exposing a high & low-level API for generating ACH files for use within the ACH network.",
"version": "1.1.1",
"version": "1.1.2",
"keywords": [

@@ -6,0 +6,0 @@ "Seerportal Nacha",

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