Ht

Htmask.js – The input masking library nobody asked for

Hacker News

Htmask.js – The input masking library nobody asked for

I built htmask.js because I was bored and all my input fields were embarrassingly unmasked. It's a dependency-free JavaScript library that does one thing: masks inputs. No npm bloat, no build step, no tests (yet). Just a script tag and some mask attributes: ```html <input mask="(00) 00000-0000"> <input mask="00/00/0000"> <input mask="AAA-0000"> ``` Where `0` = digit, `A` = letter, and everything else = "let's see what happens". I made this as a weekend boredom project because existing solutions required reading documentation, and I'm fundamentally opposed to that. It works with vanilla JS, plays nicely with htmx (shockingly), and has caused zero production incidents so far (sample size: 1). The code is probably terrible, the edge cases are definitely unhandled, but unformatted input is ugly and this library is… slightly less ugly. GitHub: https://github.com/DaviTostes/htmask Fair warning: Use at your own risk. Or better yet, don't use it at all. But if you do, let me know what breaks.

Share card

Actual performance

3points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
69%69% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: code · Missing: mac, agents, macos
52%52% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: exist, existing, ide · Missing: https docs, excited, just released
49%49% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
36%36% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
28%28% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: arr · Missing: mrr, revenue, profit
16%16% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Hu
HumanInput.js – A library for capturing human input68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

HumanInput.js – A library for capturing human input

Hacker News24
In
Input masking library57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Input masking library

Hacker News5
A
A monad transformer library in JS52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A monad transformer library in JS

Hacker News2
Wi
Wiv.js – A library for a more wiggly div68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Wiv.js – A library for a more wiggly div

Hacker News265
Me
Mechanic.js, a jQuery-esque UIAutomation library52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Mechanic.js, a jQuery-esque UIAutomation library

Hacker News5
JS
JS Cohort Viz library54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

JS Cohort Viz library

Hacker News3
Ar
AreYouSure.js, the 2Kb library for saner confirmation dialogs54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AreYouSure.js, the 2Kb library for saner confirmation dialogs

Hacker News1
Su
Superplaceholder.js – animated input placeholders52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Superplaceholder.js – animated input placeholders

Hacker News1
a
a companion library to underscore.js - f_underscore.js54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

a companion library to underscore.js - f_underscore.js

Hacker News2
A
A Simple JS Async iterator library47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Simple JS Async iterator library

Hacker News1