cheminfo / biologic-converter

MIT License
1 stars 1 forks source link

biologic-converter

NPM version build status Test coverage npm download

Convert BioLogic file format.

There are 3 possible extensions:

Other files: sometimes the data may be in a .txt file. This is very rare but if this is the case, report it and we will add support for these. Other files created by the software are ignored by the parser.

Installation

npm i biologic-converter

Usage

import { readFileSync as rfs } from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';

// import the parser you need
import { parseMPR, /*parseMPT, parseMPS*/ } from 'biologic-converter';

// build the path
const __dirname = dirname(fileURLToPath(import.meta.url))
// get buffer
const mpr = rfs(join(__dirname, 'testDirectory/ca/ca.mpr'));
const result = parseMPR(mpr); //JSON-like object
console.log(result)
**Sample output**

License

MIT

Test files from https://github.com/dgbowl/yadg