Skip to content

Feature Request #121

@branewyn

Description

@branewyn

Hi. First off. this is an awesome library. thank you very much for you hard work on this. it is amazing.

i would like to log 4 feature requests. i believe it would help quite a bit with the library.
the first would be to initialize the ISOPack library with a buffer. the current solution only allows it to be created via JSON as per your basic usage example.
the current way i use this is as per below

  const jsonData = new iso8583().getIsoJSON(bufferData);
  const isopack = new iso8583(jsonData);

this would allow me to perform functions on the message

the second request would be to set fields to whatever i want. the current use case i have would be for example to set the response code. i have copied your attachTimeStamp function and updated the magic sauce to below.

this.Msg['39'] = code

it would be useful to do this with other fields as well.

the third request would be to show the contents of a specific field. i have added the below function to do that.

getField(field) {
    if (this.Msg[field]) return this.Msg[field]
    else return T.toErrorObject(['field not defined in message']);
  }

the last request would be to decode 127.22
this is a postilion specific request. the field works much like 127.25

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions