Skip to content

Instantly share code, notes, and snippets.

View jacksteamdev's full-sized avatar

Jack Steam jacksteamdev

View GitHub Profile
@jacksteamdev
jacksteamdev / please-include-a-repro.md
Last active October 20, 2020 19:09 — forked from Rich-Harris/please-include-a-repro.md
Please include a repro

Please include a repro

<some text explaining why we need a minimal reproduction repo: too much time, effort, etc...>

How to create a minimal reproduction

  1. Create a sample repo on GitHub
  2. Demonstrate the problem, and nothing but the problem. If the app where you're experiencing the issue happens to use Gulp, I don't care, unless the problem involves Gulp. Remove that stuff. Whittle it down to the bare minimum of code that reliably demonstrates the issue. Get rid of any dependencies that aren't directly related to the problem.
  3. Install all your dependencies to package.json. If I can't clone the repo and do npm install && npm run build (or similar – see point 4) to see the problem, because I need some globally installed CLI tool or whatever, then it's not really a minimal reproduction.
  4. Include instructions in the repo, along with a description of the expected and actual behaviour. Obviously the issue should include information about the bug as well, but it's really helpful if README.md
@jacksteamdev
jacksteamdev / rxjs-log-step-final.ts
Last active October 6, 2021 13:40 — forked from caroso1222/rxjs-log-step-final.ts
RxJS Log Operator
import { Observable } from 'rxjs'
export function log() {
return function logFn<T>(source: Observable<T>) {
const output = new Observable<T>((observer) => {
const subscription = source.subscribe({
next: (val) => {
console.log(val)
observer.next(val)
},