comicgen
Version:
Add comics to your website or app with an API. Choose a character, angle, emotion and pose. Embed on your page.
22 lines (16 loc) • 469 B
JavaScript
const comicdata = require("../dist/fs.json");
function readFileSync(path) {
return comicdata[normalize(path)];
}
function existsSync(path) {
return normalize(path) in comicdata;
}
function lstatSync(path) {
return { isDirectory: () => comicdata[normalize(path)] == "" };
}
function normalize(path) {
return path.replace(/\\/g, "/").split("svg/").pop();
}
exports.readFileSync = readFileSync;
exports.existsSync = existsSync;
exports.lstatSync = lstatSync;