Skip to content

Instantly share code, notes, and snippets.

@Vunovati
Vunovati / machine.js
Created January 23, 2020 12:53
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Vunovati
Vunovati / .gitignore
Last active February 21, 2020 12:02
Blog post - jsonl streams
node_modules
'use strict';
const util = require('util');
const setTimeoutPromise = util.promisify(setTimeout);
const X = 5000; // ms
function createCallBuffer(functionToCallForEachBuffer) {
const callBuffer = [];
let timeout;