results-parser
v1.1.4
Published
Results parsing module for bridge formats
Downloads
30
Readme
Results parser
How to use the package
Install the package:
$ npm install --save results-parser@beta
Using PBN parsers
- Use pairs parser this way:
import { PbnPairsParser } from 'results-parser'
import fs from 'fs'
const pbnReadStream = fs.createReadStream('example.pbn')
const pairsParser = new PbnPairsParser(pbnReadStream)
pairsParser.process()
.on('finish', parsedData => {
console.log(parsedData)
})
- Use teams parser this way
import { PbnTeamsParser } from 'results-parser'
import fs from 'fs'
const pbnReadStream = fs.createReadStream('example.pbn')
const teamsParser = new PbnTeamsParser(pbnReadStream)
teamsParser.process()
.on('finish', parsedData => {
console.log(parsedData)
})
Developing the library
- Build the library:
npm run build
- Run the tests:
npm run tests
- Publish beta version (first update the version in package.json)
npm run release:beta