A nicer git log --oneline --graph --decorate --all
in rust.
https://github.com/mlange-42/git-graph

import * as pdfjsLib from 'pdfjs-dist'; | |
import * as pdfjsWorker from "pdfjs-dist/build/pdf.worker.mjs"; | |
export default async function pdfToImg(pdfFile) { | |
const reader = new FileReader(); | |
reader.readAsArrayBuffer(pdfFile); | |
const data = await new Promise((resolve) => { | |
reader.onload = () => { | |
resolve(reader.result); | |
}; |
/** | |
* @param {string} rootPath | |
* @returns {Generator<string>} | |
*/ | |
function* walk(rootPath) { | |
for (const entry of fs.readdirSync(rootPath, { withFileTypes: true })) { | |
const filePath = path.join(rootPath, entry.name); | |
if (entry.isDirectory()) yield* walk(filePath); | |
else yield filePath; |
import { Minipass } from "minipass"; | |
export class RegexPipe extends Minipass<string, string> { | |
public regex: RegExp; | |
protected hasGroup: boolean; | |
private buffer: string = ""; | |
constructor({ regex, hasGroup }: { regex: RegExp; hasGroup: boolean }) { |
A nicer git log --oneline --graph --decorate --all
in rust.
https://github.com/mlange-42/git-graph
If you're concerned about the extra weight that lodash will add to your bundle you can install babel-plugin-lodash
npm install --save-dev babel-plugin-lodash
and add it to your .babelrc