Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

goodcodes-parser

jbdemonte30MIT2.5.0TypeScript support: included

ROM name parser for GoodCodes

typescript, goodcode, goodcodes, rom, emulation, retro, retrogaming, game

readme

goodcodes-parser

travis build Coverage Status node (tag)

Description

This tools extracts GoodCodes from ROM names and returns a structured dataset.

Installation

npm install --save goodcodes-parser

or

yarn add goodcodes-parser

Usage

import { parse } from 'goodcodes-parser';
const result = parse('Zoop (U) [!].gen');
console.log(result);
{
    "file": "Zoop (U) [!].gen",
    "cleaned": "Zoop.gen",
    "rom": "Zoop",
    "codes": {
        "countries": [
            { "code": "U", "name": "USA" }
        ],
        "good": true
    }
}

Have a look on the typing or on the tests to see the result keys.