This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// construct an object | |
// that will work with | |
// node-ctype from a c struct string: | |
var struct = new Struct('struct { int8_t r, g, b; }'); | |
var rgb = struct.parse(buf); | |
console.log(rgb.r, rgb.b, rgb.b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require.extensions[".json"] = function (module, filename) { | |
module.exports = JSON.parse(require("fs").readFileSync(filename, "utf8")) | |
} |
NewerOlder