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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@contensu/directus-extension-masked-value-interface

v1.0.1

Published

A Directus interface that masks a stored value in the form (e.g. *****786), with a configurable number of visible characters, mask character, and an optional reveal toggle.

Readme

@contensu/directus-extension-masked-value-interface

A Directus interface for string / text fields that masks the stored value in the form — e.g. *****786 — while keeping the real value untouched in the database.

The field at rest, masked to the last three characters

The same field after clicking the reveal toggle

Install

Open Settings → Marketplace in Directus, search for @contensu/directus-extension-masked-value-interface, and press Install. Directus unpacks the extension and reloads on its own — no restart required.

If a self-hosted instance refuses the install, it is running the default MARKETPLACE_TRUST=sandbox; set MARKETPLACE_TRUST=all to allow it.

Then create or edit a field and pick Masked Value under Interface.

Behavior

  • At rest the input shows the masked value.
  • Focusing the input reveals the real value (editing a mask would corrupt the data), and blurring masks it again.
  • The optional eye icon toggles a persistent reveal without focusing.
  • Edits are only emitted while the real value is shown, so the mask can never be written back.

Options

| Option | Default | Description | | --- | --- | --- | | Visible Characters | 4 | How many characters stay readable | | Visible Position | end | end → *****786, start → 786***** | | Mask Character | * | First character is used | | Preserve Length | true | Off: fixed 5-character mask, hides the real length | | Allow Reveal Toggle | true | Show the eye icon | | Monospace Font | false | Render the value in a monospace font | | Placeholder | — | Translated string — literal text, or a $t: reference to a custom translation string, exactly like core's Input interface |

Notes

  • This is presentation-level masking only — anyone with read permission on the field can still see the raw value via the API or a different interface. For real secrecy use Directus's hash special or field-level permissions.
  • List views are unaffected; masking values in layouts would require a companion display extension.

Versions

Every dependency is pinned to an exact version — no ^ ranges. Two of them are load-bearing:

  • vue must match the copy @directus/extensions-sdk resolves internally (3.5.24 for SDK 18.0.2). A caret lets a newer vue in alongside it, and vue-tsc then compares component types across the two instances and crashes mid-elaboration instead of reporting an error. pnpm why vue must say Found 1 version.
  • typescript stays on 5.x — vue-tsc 3.x cannot drive TS 6 (internal tsc crash) or TS 7 (no ./lib/tsc export). The extension build itself uses esbuild and does not care; only pnpm typecheck does.

The directus:extension.host field is deliberately still a range: it declares which Directus versions this extension supports, not a dependency to install.

Development

A Docker Compose stack runs the extension inside a real Directus while you build it:

pnpm install
pnpm dev            # rebuilds dist/ on every save
docker compose up   # http://localhost:8055 — [email protected] / d1r3ctu5

dist/ and package.json are mounted into the container's extensions folder and EXTENSIONS_AUTO_RELOAD is on, so saving a file rebuilds the bundle and Directus reloads it — refresh the browser to see the change.

Then create a field using the Masked Value interface to try it out.

pnpm typecheck      # vue-tsc
pnpm validate       # directus-extension validate

CI & Releases

Every push runs typecheck, build, and extension validation via GitHub Actions. Releases are published to npm manually:

pnpm build
npm publish --access public

Contributing

Pull requests are welcome. Please open an issue first to discuss what you would like to change.


License

MIT © Contensu