npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

toasters.js

v1.2.0

Published

Remove and replace special characters in this automatic string converter!

Downloads

2

Readme

Toaster

About

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!

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

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

Toasting

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

Burning

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.

All Settings

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
}

Classes

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"

Finding Characters

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: ↨

ToastBread

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!