This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const resolveExpression = exp => { | |
const resolved = typeof exp === "function" ? exp() : exp; | |
return Array.isArray(resolved) | |
? resolved.join("") | |
: typeof resolved !== "undefined" ? resolved : ""; | |
}; | |
const html = (strings, ...exps) => { | |
return strings.reduce((acc, str, i) => { | |
return `${acc}${resolveExpression(exps[i - 1])}${str}`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reach | |
Register | |
Login | |
processMobileNumber -> Is Returning User? | |
Is Returning User? | |
pass -> Search | |
fail -> Authentication | |
Authentication | |
processToken -> Is Token Valid? | |
Is Token Valid? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async function generateReplies(document) { | |
// https://conventionalcomments.org/#labels | |
const LABEL = { | |
praise: "praise", | |
nitpick: "nitpick", | |
suggestion: "suggestion", | |
issue: "issue", | |
todo: "todo", | |
question: "question", | |
thought: "thought", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const USER_TYPE = { | |
new_customer_hto: "new_customer_hto", | |
new_customer_rx_retail: "new_customer_rx_retail", | |
new_customer_rx: "new_customer_rx", | |
returning_customer_hto: "returning_customer_hto", | |
returning_customer_saved_expired_rx: "returning_customer_saved_expired_rx", | |
returning_customer_saved: "returning_customer_saved", | |
returning_customer_saved_expired_payment: | |
"returning_customer_saved_expired_payment", | |
returning_customer_saved_expired_rx_payment: |
OlderNewer