mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
996 B
18 lines
996 B
4 years ago
|
[
|
||
|
{
|
||
|
"description": "escapeFromDelimiters is declared and includes a double-quote",
|
||
|
"code": "if (typeof escapeFromDelimiters === 'undefined') {\n throw Error(\n `You didn't even define the variable... we've been through this already !`,\n )\n}\n\nif (!escapeFromDelimiters.includes('\"')) {\n throw Error('escapeFromDelimiters must include a double-quote\"')\n}"
|
||
|
},
|
||
|
{
|
||
|
"description": "escapeFromDelimiters includes a single-quote",
|
||
|
"code": "if (!escapeFromDelimiters.includes(\"'\")) {\n throw Error(\"escapeFromDelimiters must include a single-quote'\")\n}"
|
||
|
},
|
||
|
{
|
||
|
"description": "escapeFromDelimiters includes a backtick",
|
||
|
"code": "if (!escapeFromDelimiters.includes('`')) {\n throw Error('escapeFromDelimiters must include a backtick `')\n}"
|
||
|
},
|
||
|
{
|
||
|
"description": "escapeTheEscape includes a backslash",
|
||
|
"code": "if (!new TextEncoder().encode(escapeTheEscape).includes(92)) {\n throw Error('escapeTheEscape must includes a backslash')\n}"
|
||
|
}
|
||
|
]
|