Add files via upload

This commit is contained in:
ArcaneDisgea 2021-05-25 15:22:08 -04:00 committed by GitHub
parent 37ec1750d0
commit 4a155c1059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 273 additions and 0 deletions

18
test.js Normal file
View file

@ -0,0 +1,18 @@
const fs = require("fs");
const createCard = require("./index").createCard;
createCard("9575452", (png) => {
const data = png.replace(/^data:image\/\w+;base64,/, "");
const buf = Buffer.from(data, "base64");
fs.writeFile('test.png', buf, (err) => {
console.log(err)
})
});
createCard("13821878", (png) => {
const data = png.replace(/^data:image\/\w+;base64,/, "");
const buf = Buffer.from(data, "base64");
fs.writeFile('image.png', buf, (err) => {
console.log(err)
})
});