A Highly Experimental and evolving JavaScript based library to read full S19 strings and create them from an input buffer. The codebase is still under development and is provided without any guarantee, so feel free to contribute to help make it better.
import fs from 'fs-extra';
const file = await fs.readFile(`/path/to/my-s19-file.s19`, 'utf8);
const response: ReadS19Response = readS19(file, file.length);
console.log(response.success ? 'Successful!' : `Unsuccesful - ${response.message}`);
console.log(response.payload?.sRecords);
const inputContent = "Hello, this is a test of the writeS19 method. This buffer will be converted into an S19 file";
const inputDataBuffer = Buffer.alloc(128);
inputDataBuffer.write(inputContent, "utf8");
const response = writeS19(inputDataBuffer, inputDataBuffer.length, 48, false); // 48 is the length I specified for the data in each S1-3 record (must be between 1-255)
console.log(response.success ? "Successful!" : `Unsuccesful - ${response.message}`);
console.log("S-Record Data:", response.payload);
- latest: Under active development. Code for the latest release is in the branch for its major version number.
- alpha: Releases that are used solely to test upcoming features and changes. These cannot be guaranteed to be compatible with current releases
Current and LTS releases follow Semantic Versioning.
See Releases section
Ensure you authorise NPM to read from the GitHub Package Registry. The easiest way is to npm login --registry=npm.pkg.github.com
, but you can also create an .npmrc
file with the following contents:
@rsispal:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN_HERE
You can also just directly install the Git repository
Run npm install --save https://github.com/rsispal/srecord-js
- Clone the project
- Run
npm install
- Run
npm run build
(production) - Run
npm run build:dev
(non-production)
Create a PR if there's any changes and features you can contribute.
Looking for help? Create an issue and i'll get to you as soon as I can.
LICENSE for the full license text.