Skip to content

Instantly share code, notes, and snippets.

@amayer42
amayer42 / usefulCommands.md
Last active July 28, 2022 17:09
A collection of commands that I either don't use very often or aren't documented super well (or both)

eslint

debug which files eslint is going to parse

# https://github.com/eslint/eslint/issues/2152#issuecomment-86975010
DEBUG=eslint:* eslint

# Windows
set DEBUG=eslint:* && eslint 
@amayer42
amayer42 / factorialComparison.ts
Last active March 3, 2022 17:40
Performance Comparison of Factorial Algorithms Implemented via Iteration and Recursion Over Both Numbers and BigInts
function factorialIterBigIntBackward(input: bigint): bigint {
let computedFactorial = 1n;
for (let i = input; i >= 1n; i--) {
computedFactorial *= i;
}
return computedFactorial;
}
function factorialIterBigIntForward(input: bigint): bigint {
let computedFactorial = 1n;