ascii-captcha
🤖 A simple captcha system based on ASCII
Example
For example, run the following:
$ deno run --allow-net https://deno.land/x/ascii_captcha/test.ts
You should see something like the following:
this
_ _ _
| | | | (_)
| |_ | |__ _ ___
| __|| '_ \ | |/ __|
| |_ | | | || |\__ \
\__||_| |_||_||___/
eeqTBh
_____ ______ _
|_ _|| ___ \| |
___ ___ __ _ | | | |_/ /| |__
/ _ \ / _ \ / _` | | | | ___ \| '_ \
| __/| __/| (_| | | | | |_/ /| | | |
\___| \___| \__, | \_/ \____/ |_| |_|
| |
|_|
Note: The first one (
this
) is a generated based on a string. While the second one is generaed randomly
Web
For usage in the browser, check the build
file directory
API
function generateFromString(text: string): Promise<ASCII>
text
- The string to generate ASCII from
function generateRandom(length: number, digits?: boolean): Promise<ASCII>
length
- Length of the desire stringdigits?
- Include digits to the string
interface ASCII
interface ASCII {
ascii: string;
text: string;
}
License
This project is licensed under the MIT License