Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gb-opcodes

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gb-opcodes - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

23

index.js

@@ -53,3 +53,2 @@ 'use strict';

const URL = 'http://www.pastraiser.com/cpu/gameboy/gameboy_opcodes.html';
const FILE_OUT = './opcodes.json';

@@ -64,16 +63,14 @@ request(URL, function (err, response, body) {

const $ = cheerio.load(body);
const tables = $('table').slice(0, 2);
const tables = $('table').splice(0, 2);
const insts = {
unprefixed: parseTable($, tables[0]),
cbprefixed: parseTable($, tables[1])
};
const data = [
'unprefixed',
'cbprefixed'
]
.reduce((p, c, i) => {
p[c] = parseTable($, tables[i]);
return p;
}, {});
fs.writeFile(FILE_OUT, JSON.stringify(insts, null, 4), (err) => {
if (err) {
console.error(`Unable to write file on ${FILE_OUT}`, err);
process.exit(1);
}
console.info(`Opcodes written on ${FILE_OUT}`);
});
process.stdout.write(JSON.stringify(data, null, 4));
});
{
"name": "gb-opcodes",
"version": "1.0.1",
"version": "2.0.0",
"description": "generate gameboy opcodes table in JSON format",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,5 +7,6 @@ # gb-opcodes

`$ npm i && npm start`
`$ npm start`
Opcodes will output in the file `opcodes.json` also included on the [repo](https://github.com/dmacosta/gb-opcodes/blob/master/opcodes.json).
Program output is on the [opcodes.json](https://github.com/dmacosta/gb-opcodes/blob/master/opcodes.json)
file included on this repo.

@@ -12,0 +13,0 @@ ## References

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc