Words that sound alike, but are spelled differently (usually different meanings).
- filter out dictionary words, resulting in a word list that reduces confusion for verbal password phrases
- rhymes (song lyrics, poetry)
- humor/jokes
// Demostrate `raise` action | |
const stubbornMachine = Machine({ | |
id: 'raisedmo', | |
initial: 'entry', | |
states: { | |
entry: { | |
on: { | |
STEP: { | |
target: 'middle', | |
}, |
import faker from 'faker' ; | |
function fakeOrg(){ | |
const namePersonOrOrg = (Math.random() < 0.5) | |
? faker.name.firstName() +' '+ faker.name.lastName() | |
: faker.company.companyName() | |
console.log(namePersonOrOrg) | |
return { | |
name: namePersonOrOrg, | |
// card: faker.helpers.userCard(), |
const volumeMachine = Machine({ | |
id: 'volume', | |
initial: 'init', | |
context: { | |
volume: 0.7, | |
previousVolume: 0.7, | |
isMuted: false, | |
}, | |
states:{ | |
init:{ |
/* squoosh-cli2node v0.5.0 | |
use the @squoosh/cli tool in Node via CLI API | |
@2021 Tom Byrer, #licence MIT | |
known bugs: only npm (no yarn pnpm) & bad error reporting | |
*/ | |
const { execSync } = require("child_process") | |
// find squoosh in npm global packages | |
function isFoundInCliResults(command, str){ | |
if (execSync(command).toString().search(str) === -1){ |
// volume DRY contrll | |
/* copy/paste below object into bottom of EVENTS tab | |
{ | |
"type": "VOL_CHANGE", | |
"value": 0.9 | |
} | |
*/ | |
function mute(){ | |
console.log('🔇 muted') |
// simple mute volume controll | |
function mute(){ | |
console.log('🔇 muted') | |
} | |
function unmute(){ | |
console.log('👂 unmuted') | |
} | |
const volumeMachine = Machine({ |
// volume contrll | |
/* | |
{ | |
"type": "VOL_CHANGE", | |
"value": 0.9 | |
} | |
*/ | |
function mute(){ | |
console.log('🔇 muted') |
// Master machine for radio buttons | |
const inputGroupMachine = Machine({ | |
id: 'input-group', | |
initial: 'emptied', | |
states: { | |
emptied: { | |
on: { | |
'': { | |
actions: 'loadNew', | |
target: 'pending', |
// Master machine for radio buttons | |
const inputGroupMachine = Machine({ | |
id: 'input-group', | |
initial: 'emptied', | |
states: { | |
emptied: { | |
on: { | |
FETCH: 'pending', | |
} | |
}, |