Skip to content

Instantly share code, notes, and snippets.

View tivac's full-sized avatar
💭
👋🏻🙃

Pat Cavit tivac

💭
👋🏻🙃
View GitHub Profile
@tivac
tivac / index.html
Last active June 8, 2022 18:24
inner vs outer fn #jsbench #jsperf (http://jsbench.github.io/#8b564bf629879c3e243bc62943981cc1) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>inner vs outer fn #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@tivac
tivac / index.html
Last active May 12, 2022 20:41
bind vs wrapper #jsbench #jsperf (http://jsbench.github.io/#d23342c3271dc8cb8fc624d39038a7fb) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>bind vs wrapper #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@tivac
tivac / machine.js
Last active May 28, 2021 22:04
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tivac
tivac / machine.js
Last active May 27, 2021 19:52
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tivac
tivac / machine.js
Created May 5, 2021 17:51
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tivac
tivac / machine.js
Created March 18, 2021 22:06
Generated by XState Viz: https://xstate.js.org/viz
const gameMachine = Machine(
{
id: 'game',
initial: 'playing',
context: {
points: 0
},
states: {
playing: {
// Eventless transition
@tivac
tivac / machine.js
Last active March 9, 2021 19:36
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tivac
tivac / machine.js
Created October 7, 2020 21:11
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Object vs Map</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@tivac
tivac / machine.js
Created July 29, 2020 19:26
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions