screp-js-file

0.2.1 • Public • Published

Apache 2.0 license npm version

screp-js-file

A pure Javascript version of screp, a StarCraft: Remastered replay file parser, compiled from the original Go version using GopherJS.

screp (StarCraft: Brood War Replay Parser) is a library for extracting information from StarCraft replay files. This library uses a compiled version of the original library recompiled for Javascript. This specific library is designed to for use in Node on local files—if you need to parse file buffers directly or use screp in the browser, try screp-js.

Installation

This library can be installed through npm:

npm i --save screp-js-file

Usage

To use, run Screp.parseFile() on a path to a local file.

const Screp = require('screp-js-file')

const processRep(filepath) {
  try {
    const res = await Screp.parseFile(filepath)
    return res
  }
  catch (err) {
    // If something went wrong, 'err' will be an Error object containing a string thrown by Go.
    console.log(err)
  }
}

For more information, see the screp-js documentation.

Copyright

Apache License 2.0, as per the original screp project.

Package Sidebar

Install

npm i screp-js-file

Weekly Downloads

2

Version

0.2.1

License

Apache-2.0

Unpacked Size

15.5 kB

Total Files

5

Last publish

Collaborators

  • msikma