This is a neat little function you can use as a filter in Vuejs to partially censor emails so for instance firstname.lastname@example.org will show as m****l@e*********m. In other words, show the first and last letter before and after the @ delimiter.
So to learn Vuejs I decided to make a simple idle game. You know, one of those games that kinda plays itself by upgrading stuff and increasing your income etc.
This game is inspired by the old school mafia text-based browser games, so you’ll find the usual stuff like petty crime, upgrading weapons and managing businesses.
Current state of the game is very simple and there’s no prestige system implemented yet, but I have many features planned ahead. It’s still a work in progress, but I released it on itch.io (which is also my first time so learning by doing):
That will output a number like “123456” as “123 456”. But I also want it to skip decimals. Using .toFixed(0) doesn’t work as that only accept Float variables. Casting the Intl variable to Float using parseFloat() around it didn’t work either.
The solution was to use .toLocaleString() instead, like this: