results-parser

1.1.4 • Public • Published

Results parser

How to use the package

Install the package:

$ npm install --save results-parser@beta
Using PBN parsers
  1. 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)
  })
  1. 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

  1. Build the library:
npm run build
  1. Run the tests:
npm run tests
  1. Publish beta version (first update the version in package.json)
npm run release:beta

Readme

Keywords

Package Sidebar

Install

npm i results-parser

Weekly Downloads

1

Version

1.1.4

License

ISC

Unpacked Size

953 kB

Total Files

101

Last publish

Collaborators

  • kaukov
  • zdraganov