clean utils

This commit is contained in:
ful1e5 2020-09-29 17:34:14 +05:30
parent 885f75bd80
commit bf2dff2370

View file

@ -1,15 +0,0 @@
import fs from "fs";
import path from "path";
import { Frames } from "../types";
interface SaveFramesArgs {
frames: Frames;
bitmapsDir: string;
}
export const saveFrames = ({ frames, bitmapsDir }: SaveFramesArgs) => {
for (let [fileName, { buffer }] of Object.entries(frames)) {
const out_path = path.resolve(bitmapsDir, fileName);
fs.writeFileSync(out_path, buffer, { encoding: "binary" });
}
};