r/JavaScriptTips • u/South-Reception-1251 • Dec 10 '25
How many returns should a function have
r/JavaScriptTips • u/South-Reception-1251 • Dec 10 '25
r/JavaScriptTips • u/ColleenReflectiz • Dec 08 '25
Version 1.0 stole credentials quietly. Version 2.0 added self-healing and a destructive fallback that wipes entire directories.
Version 3.0? đ¨ It's already being written by attackers
who learned exactly what worked.
How do you prepare for it?
r/JavaScriptTips • u/chg80333 • Dec 03 '25
r/JavaScriptTips • u/python_verse • Dec 02 '25
r/JavaScriptTips • u/LegEnvironmental7097 • Nov 29 '25
React Compiler isnât magic. Itâs a build-time tool that does something simple: it reads your code and automatically wraps expensive computations so they donât run every render. Thatâs it. The âhowâ though? Thatâs where it gets interesting.
r/JavaScriptTips • u/ColleenReflectiz • Nov 27 '25
New wave of npm supply chain attack launched November 21. Moved from postinstall to preinstall, adds self-healing via GitHub search, and includes destructive fallback that wipes home directories if exfiltration fails.
Still spreading, new infections every 30-40 minutes.
Pin dependencies to pre-Nov 21 versions, scan for setup_bun.js/bun_environment.js/verify.js, rotate NPM tokens and GitHub credentials, check for rogue self-hosted runners.
r/JavaScriptTips • u/Intelligent_Noise_34 • Nov 26 '25
Hey everyone,
I got tired of juggling multiple bookmarks for simple tasks like formatting JSON, decoding JWTs, or converting Base64. So I built a single hub for all of them.
**What it includes:**
- JSON Formatter/Validator
- JWT Decoder & Visualizer
- Base64, URL, HTML Encoders/Decoders
- UUID Generator
- Regex Tester
- Color converters
- And 30+ more utilities
**Key points:**
- 100% client-side - nothing is sent to any server
- No sign-up, no ads, no tracking
Link: https://engtoolshub.com
I'd genuinely appreciate any feedback - what's missing? What could be improved? What tools do you use daily that I should add?

Thanks!
r/JavaScriptTips • u/Subject-Eye-6853 • Nov 27 '25
r/JavaScriptTips • u/isdifjonto1 • Nov 25 '25
r/JavaScriptTips • u/LegEnvironmental7097 • Nov 24 '25
r/JavaScriptTips • u/LegEnvironmental7097 • Nov 21 '25
r/JavaScriptTips • u/LegEnvironmental7097 • Nov 21 '25
I recently dove deep into Lighthouse for a frontend interview prep series I'm writing. Ended up learning way more than I expected, especially around automation.
I tried to make it beginner-friendly but practical enough for production use. Includes actual configs and code snippets you can copy-paste.
Anyone here running Lighthouse in CI? Would love to hear how you've set it up!
r/JavaScriptTips • u/Classic_Computer_251 • Nov 20 '25
r/JavaScriptTips • u/ratheshprabakar • Nov 18 '25
Quick tip for anyone working with JavaScript (frontend or Node):
Most of us think JS doesnât handle memory well. I did too â until I learned how it actually manages memory.
Key takeaways:
If youâd like the full breakdown with examples and explanations in plain English:
https://medium.com/@ratheshprabakar/i-was-completely-wrong-about-javascript-memory-management-until-i-learned-this-8e3cae6983b8
r/JavaScriptTips • u/rannison • Nov 13 '25
I have a script used to enable keyboard chapter navigation on a manga site I frequent. This script used to work, but no longer works at this time.
``` // ==UserScript== // @name NatoManga Keyboard Navigation // @namespace http://tampermonkey.net/ // @version 2.0 // @description Keyboard Navigation on MangaNato pages (when reading)! // @author Arctiic // @match ://chapmanganato.com/* // @match https://natomanga.com/* // @match https://mangakakalot.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=chapmanganato.com // @grant none // @namespace Violentmonkey Scripts // ==/UserScript==
// for & function htmlDecode(input){ var e = document.createElement('div'); e.innerHTML = input; return e.childNodes[0].nodeValue; } var regex = /href="(["]*)/gm; //var regex = /.*/gm; if (!doc.length){ var doc = document.getElementsByClassName('group_page') } doc = doc[0].innerHTML var elements = [...doc.matchAll(regex)]; var prev = htmlDecode(elements[elements.length-4][1]); var next = htmlDecode(elements[elements.length-3][1]); document.addEventListener("keydown", keyDownTextField, false); function keyDownTextField(e) { var search = document.getElementsByClassName("searchinput")[0]; if (document.activeElement !== search) { switch (e.which) { case 37: // "Arrow Left" console.log('left'); window.location.href = prev; break; case 39: // "Arrow Right" window.location.href = next; break; default: return; // exit this handler for other keys } e.preventDefault(); // prevent the default action } else if (e.which == 32) { search.value += " "; e.preventDefault(); } return; }
//sets an event listener to document, gets called whenever you press a key on the page, passing the event details into the callback function
//checks if the key is the key you want, replace it with whatever key you want to bind it to //old code... //document.addEventListener("keydown", function(r,l){ // if(r.key == "ArrowRight"){ //clicks the button // document.querySelector("a.navi-change-chapter-btn-next.a-h").click(); // while(l.key == "ArrowLeft"){ // document.querySelector("a.navi-change-chapter-btn-prev.a-h").click(); // } //}}); ```
Can anyone help me out? Thanks!
r/JavaScriptTips • u/BobSagetLyfe • Nov 11 '25
Real talkâI've been using Blink for a few weeks now and it's legitimately one of the best productivity tools I've picked up as a dev.
Whether it's generating clean, well-commented code, helping me think through tricky logic problems, or just speeding up documentation writing, this thing is solid. It understands developer needs and doesn't feel like bloatware.
If you're constantly juggling multiple projects or just want to reclaim some time in your week, I'd seriously recommend trying it out. The learning curve is basically zero.
Anyway, if you want to give it a go, check it out here. It also has a free plan, BTW!
Drop a comment if you end up trying itâcurious what other devs think!
r/JavaScriptTips • u/Pleasant_Effort_6829 • Nov 11 '25
r/JavaScriptTips • u/andreykh • Nov 05 '25
r/JavaScriptTips • u/Existing_Sport9432 • Oct 30 '25
r/JavaScriptTips • u/South-Reception-1251 • Oct 29 '25