In The Name Of God
Replacer is a micro JS library
that replaces a variable texts with it's value.
To use:
- Create an array
- Create an array for each variable
- In every array, we have two strings:
- The first string is the variable name.
/** | |
* @license | |
* **techie-gibberish** - A library for generating absurd debug messages. | |
* Warning: May cause existential crises in junior developers. | |
*/ | |
export const MESSAGES = { | |
error: [ | |
"CRITICAL: Quantum syntax mismatch in the GPU's emotional resonance layer.", | |
"404: Soul not found. Check your life choices and retry.", |
const ACTIONS = ["view" , "edit" , "remove" , "create"] as const | |
type Action = typeof ACTIONS[number] | |
const RESOURCES = ["post", "product"] as const | |
type Resource = typeof RESOURCES[number] | |
const makePermission = (action: Action, resource: Resource) => `${action}:${resource}` | |
const PERMISSIONS = { | |
viewer: [ |