Add files via upload
This commit is contained in:
parent
37ec1750d0
commit
4a155c1059
43 changed files with 273 additions and 0 deletions
18
test.js
Normal file
18
test.js
Normal 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)
|
||||
})
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue