pgnify
TypeScript icon, indicating that this package has built-in type declarations

1.1.6 • Public • Published

PGNify

A lightning fast PGN parser.

Usage

import { parse, GameResults, type PGNify } from "pgnify";

const PGN = `
  [Result "1-0"]

  1.e4 e5 2.Qh5 Nc6 3.Bc4 Nf6 $4 4.Qxf7# 1-0
`;
const parseResult = parse(PGN);
console.log(parseResult);

Benchmarks

benchmark time (avg) (min ... max) p75 p99 p995
Parse 820-ply game 588.9 µs/iter (505.2 µs … 2.63 ms) 574.3 µs 1.49 ms 1.52 ms

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i pgnify

    Weekly Downloads

    6

    Version

    1.1.6

    License

    MIT

    Unpacked Size

    32.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • melvdouc