
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@small-web/kitten
Advanced tools
Adds type safety to global kitten object in Kitten.
npm install @small-web/kitten
Kitten has a global kitten namespace that makes it easy to get started building Small Web sites and apps with it.
If you’re building something quick, that might be all you need.
e.g., In a quick Hello World example, your index.page.js might look like this:
export default () => kitten.html`
<h1>Hello, world!</h1>
`
While that works, if you use JSDoc to implement type checking for your larger projects, and you use an editor with language intelligence (like Helix) and have static type checking turned on (e.g., as shown below or in a jsconfig.json file) you will get a “Cannot find name ‘kitten’” error.
// @ts-check
export default () => kitten.html` ← Cannot find name 'kitten'
<h1>Hello, world!</h1>
`
To fix that, simply install the module and import the default export and it will behave exactly like the default global kitten namespace but with type safety and language intelligence while authoring.
// @ts-check
import kitten from '@small-web/kitten'
export default () => kitten.html`
<h1>Hello, world!</h1>
`
💡 You can also import specific exports from the package, e.g.,
import { html } from '@small-web/kitten'.
🔗 For more help in using this module, please see the Kitten Type Safety Tutorial.
Kitten by default has at least two databases per project:
An internal database called _db and a custom one for you to use in your project called db.
This package provides a type-safe _db export for the internal database as the structure is well known.
If you want type safety for your custom project database, please create and use a type-safe database app module.
🔗 For a more in-depth look into database type safety, please see the Database App Modules Kitten Tutorial.
Small Technology Foundation is a tiny, independent not-for-profit.
We exist in part thanks to patronage by people like you. If you share our vision and want to support our work, please become a patron or donate to us today and help us continue to exist.
Copyright © 2023-present Aral Balkan, Small Technology Foundation Released under AGPL 3.0.
FAQs
Type-safe global Kitten namespace.
We found that @small-web/kitten demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.