toasters.js is a useful and powerful string converter that gets rid of any special characters! This can help you test for specific keywords or strings much easier and efficiently. It has thousands of different characters that it checks for!
To install Toasters.js, just do:
npm i toasters.js
This will add toasters.js to your project! Now that you have it, you can use it's extraordinary toasting powers!
The 2 main ways to use toaster.js are to toast or burn.
- Toasting a string will convert any special characters that resemble letters into their default QWERTY letters
- Burning a string will straight-up remove any special characters in the string, no exceptions
How to toast a string:
const toaster = require("toasters.js");
const string = "í'm g∅ing to be @way for ₳ bit";
console.log(toaster.toast(string));
// Outputs: "i'm going to be away for a bit"
toasters.js has over 500 different special characters that are applied onto your string when you use the toast function. You can also change the settings to your preference:
const toaster = require("toasters.js");
const string = "goodbŸe! $ee you $ooñ!";
console.log(toaster.toast(string, {ignoreCharacters: ["Ÿ"]}));
// Outputs: "goodbŸe! see you soon!"
const toaster = require("toasters.js");
const string = "goodbŸe! $ee you $ooñ!";
console.log(toaster.toast(string, {replaceWith: "lol"}));
// Outputs: "goodblole! lolee you loloon!"
How to burn a string:
const toaster = require("toasters.js");
const string = "hi ⇲how ♬ are┗ you?Ͷ";
console.log(toaster.burn(string));
// Outputs: "hi how are you?"
The burn function checks for and removes over 1500 different special characters that may be in your string! This checks for any characters that aren't on a standard QWERTY keyboard. Just like toasting a string, you can change any of the settings to your preference.
This is the full list of options for both functions, set to their defaults:
{
cleanup: true, // trims the string and makes it all lowercase
removeSpaces: false, // removes all the spaces from the string
ignoreCharacters: [], // characters the toaster ignores when replacing
replaceWith: "", // something else to replace everything with
}
You can also use the Toaster
class to access your toasting functions if you'd like:
const toaster = require("toasters.js");
const Toaster = new toaster.Toaster();
const string = "wΘw thÏs ÏS ⎀ ⍹ei℟d ŠtRℹℕg";
console.log(Toaster.toast(string));
// Outputs: "wow this is a weird string"
If you want to get any of the thousands of the special characters we have, you can find them in the toaster!
const toaster = require("toasters.js");
console.log(toaster.letterCharacters[3][7]);
// Outputs: ↁ
const toaster = require("toasters.js");
console.log(toaster.allCharacters[23]);
// Outputs: ↨
And don't forget the toastBread
function, which turns any string at all into the word "toast"! Who wouldn't want that?
const toaster = require("toasters.js");
const string = "hello world!";
console.log(toaster.toastBread(string));
// Outputs: "toast"
So, what are you waiting for? Try out toasters.js
today and start toasting!