# stampit-org/stampit

OOP is better with stamps: Composable object factories.

Repository: https://github.com/stampit-org/stampit
Canonical: https://ross.abutalabs.com/products/stampit
Homepage: https://stampit.js.org
Language: TypeScript
License: MIT
License Family: permissive
Topics: javascript, oop, stamps, object-oriented, dependency-injection, factory, class, composition
Last push: 2026-07-17T04:05:22+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 93, release rhythm 67, longevity 100
- inputs: {"age_days": 4952, "days_push": 47, "days_rel": 62, "gap_med": 134.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3009, forks 102 (observed 2026-08-28T04:07:37.745365+00:00)

## What it is
Stampit is a tiny (1.3KB gzipped) JavaScript/TypeScript library for building composable object factories called 'stamps', which merge methods, properties, deep properties, initializers, and statics via a standardized composition algorithm. It serves as a flexible alternative to ES6 classes, combining delegation, concatenation, and functional prototypal inheritance without class inheritance chains.

## Use cases
- compose objects from reusable behaviors in javascript
- replace class inheritance with object composition
- create factory functions with mixin-like behavior merging
- implement multiple inheritance in javascript without prototype chains
- do dependency injection through composable factories
- share stateful behavior between browser and node code

## When to choose
- You want composition over inheritance with a standardized, well-specified algorithm and a <2KB footprint
- You need to merge methods, properties, and initializers from many behaviors without class-chain coupling
- You need a single module that works in browsers, Node, and bundlers with both ESM and CJS

## When to avoid
- Your codebase is firmly TypeScript class-based and you don't need runtime behavior composition
- You expect framework-level features like reactive state, rendering, or lifecycle hooks beyond initializers
- Your team is unwilling to learn the stamps specification and its composition semantics

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: developer-tools, web-development
- platform: browser
- tags: oop, object-composition, factory-functions, stamps, mixins, prototypal-inheritance, dependency-injection, composition-over-inheritance, typescript, esm, nodejs

## Member repositories
- stampit-org/stampit (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:37.745365+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:47:23.017770+00:00, confidence not recorded.
  - readme: https://github.com/stampit-org/stampit (fetched 2026-08-28T04:07:37.745365+00:00, sha d171dacb5b47)
  - homepage: https://stampit.js.org (fetched 2026-08-29T09:45:52.776874+00:00, sha eeccd7eb72b0)
  - site_page: https://stampit.js.org/essentials/installation (fetched 2026-08-29T09:45:52.786268+00:00, sha 74bf1bc1c781)
  - registry_npm: https://registry.npmjs.org/stampit (fetched 2026-08-29T09:45:52.791244+00:00, sha 001e5732bb35)
  - site_page: https://stampit.js.org/essentials/faq (fetched 2026-08-29T09:45:52.789114+00:00, sha 2990eacf6596)
- Data as of 2026-08-30T08:39:29.467469+00:00.
