JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q27595F
  • License ISC

Remove and replace special characters in this automatic string converter!

Package Exports

  • toasters.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (toasters.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Toaster

About

toasters.js is a useful string converter that gets rid of all special characters! This can help you test for specific keywords or curses much easier and efficiently. It has hundreds of different characters that it checks and replaces!

Installation

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!

Usage

This is how to use toasters.js!

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"

As I said earlier, toasters.js has over 300 different special characters that are applied onto your string when you use the toast function.

But 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!"

This is the full list of options, set to their defaults:

{
  cleanup: true, // trims the string and makes it all lowercase
  removeSpaces: false, // removes all the spaces from the string
  pi: false, // turns all pi symbols into "pi"
  infinity: false, // turns all infinity symbols into "infinity"
  ignoreCharacters: [], // characs ÏS ⎀ ⍹ei℟d ŠtRℹℕgters the toaster ignores when replacing
  replaceWith: "", // something else to replace everything with
}

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 = "wΘw thÏs ÏS ⎀ ⍹ei℟d ŠtRℹℕg";
console.log(toaster.toastBread(string));
// Outputs: "toast"

So, what are you waiting for? Try out toasters.js today and start toasting!