Scan your whole stack
Are you using on_the_money?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.16.0
on_the_money was last scanned on 24 Nov 2026 at version 0.16.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.16.0 LATEST | 24 Nov 2026 | No rules fired |
| 0.15.0 | 20 Nov 2026 | No rules fired |
| 0.14.0 | 20 Nov 2026 | No rules fired |
| 0.13.0 | 20 Nov 2026 | Not shown |
| 0.12.0 | 13 Nov 2026 | Not shown |
Findings for v0.16.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.16.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
_This README is the authoring context for AI agents using
on_the_money. Read top-to-bottom for a complete picture; everything you need to write an OTM app is here. No satellite docs._
Opinionated, attribute-driven, standards-oriented modern framework for the web. Native browser APIs only. ESNext.
UI signal state — theme, page, modal-open, form-error, the boolean and enum flags that drive visual transitions — lives in DOM attributes; structured data (lists of records, collections, async results) lives in JS like everywhere else. Reactivity is delegated to the platform, not reimplemented: CSS attribute selectors respond to state visually, [data-text] projects state into text, and MutationObserver fans state into imperative calls — the framework adds no reactive machinery of its own. Events use one delegated listener per (parent, type) pair. Routing uses the History API. Localization uses Intl. There is no virtual DOM, no JSX, no transpilation step, no proprietary tooling. The framework is a thin layer of conventions over the platform.
npm install on_the_money
A complete two-file app. index.html carries semantic structure, app.js carries behavior.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title data-i18n="app_title">My App</title>
<link rel="stylesheet" href="./substrate.css">
<script type="module" src="./app.js"></script>
</head>
<body>
<main>
<h1 data-i18n="app_title">My App</h1>
<p data-text="greeting">Press the button.</p>
<button data-action="greet" data-i18n="btn_greet">Greet</button>
</main>
</body>
</html>
// app.js
import { on, the } from "on_the_money";
await the.boot();
on("main", "click", '[data-action="greet"]', () => {
the("greeting", "Hello, Alice!");
});
Localizable interface copy uses data-i18n; UI state mirrors use data-text, with source-language fallback text when practical. Ordinary document content needs neither marker nor attribute mirror (see Literal document content). This source-only document needs no translation endpoint or dictionary files, including for visitors requesting another language: the rendered English remains available. On boot, keys opted in via persistKeys replay from localStorage onto body data-* and [data-text] mirrors; by default nothing persists.
The lint stack bans class selectors, so an OTM site rides on a classless substrate — a stylesheet satisfying four contract clauses:
<main>, <nav>, <article>, <form>, <button>, <input> with <label>).[aria-invalid], [aria-busy], [disabled], <dialog open>).--otm-*), so style.css themes by variable override.[data-theme="dark"] / [data-theme="light"]), so the("theme", ...) switches it.on_the_money ships a distilled, zero-class, modern-CSS foundation derived from Pico Classless (MIT) plus all 20 Pico color schemes as CSS subpath exports (0 bytes to the JS core bundle):
/* Default: classless schema + azure scheme */
@import "on_the_money/css";
/* Or pick any of the 20 Pico schemes explicitly */
@import "on_the_money/css/schema";
@import "on_the_money/css/schemes/jade";
Available schemes: amber, azure, blue, cyan, fuchsia, green, grey, indigo, jade, lime, orange, pink, pumpkin, purple, red, sand, slate, violet, yellow, zinc. Any other contract-satisfying classless stylesheet remains swappable.
Both this framework's conventions and its dictatorial Stylelint rules enforce a five-layer CSS cascade, ordered explicitly via native @layer:
@layer schema, scheme, structure, style, state;
on_the_money/css/
├── schema.css # @layer schema — classless semantic HTML + ARIA foundation
└── schemes/<name>.css # @layer scheme — Pico color palette tokens (light & dark)
styles/ (app-authored)
├── structure.css # @layer structure — layout scaffolding only: grid, flex, gap, landmarks
├── style.css # @layer style — brand skin only: --otm-* overrides, fonts, surfaces
└── state.css # @layer state — the ONLY OTM-aware layer: [data-*] / [aria-*] rules
Because cascade precedence follows @layer schema, scheme, structure, style, state;, there are zero specificity wars and zero !important hacks: state.css always beats style.css and structure.css. Each 5-S file wraps its rules in its own @layer <name> { ... } block (unlayered CSS beats every @layer in browsers). otm/layer-discipline enforces those @layer wrappers, rejects layout rules and DOM state selectors in style.css (while keeping ephemeral interaction pseudos like :hover and :focus-visible in style.css), rejects skin/state rules in structure.css, and rejects unconditional baseline rules in state.css. Keeping state.css isolated keeps the state vocabulary greppable and auditable by otm-lint (HTML-106/107) and the deletion test.
import { on, the, _t, route, $, $$ } from "on_the_money";
Aliases on the: the.t === _t, the.route === route, the.form(formEl), the.flat(obj, sep?), the.match(pattern, path?), the.boot(options?). On on: on.emit(el, event, detail?), on.target(target, event, fn, options?). On route: route.go(path, options?). Live accessors on the: the.dictionary, the.locale.
For tests: import { setupDOM } from "on_the_money/test" (see Testing your app).
on(parent, event, selector, fn) — event delegation| Arg | Type | Notes |
|---|---|---|
parent |
Element \| string \| null |
If string, resolved via document.querySelector. If falsy, defaults to document.body. |
event |
string |
Any DOM event name ("click", "submit", "mounted", etc.). |
selector |
string |
CSS selector matched via event.target.closest(selector). |
fn |
(event, target) => void |
target is the element the selector matched. |
Returns an () => void unsubscribe function. All four arguments are required; for a form's own submission, use on(form, "submit", "form", handler). A missing selector or handler fails at registration, and otm/prefer-on diagnoses incomplete calls.
const off = on("#list", "click", "[data-action='delete']", (e, target) => {
target.closest("[data-item]").remove();
});
off(); // detaches the listener
on.emit(el, event, detail) — CustomEvent dispatchDispatches a bubbling, cancelable CustomEvent on el. el may be an element or a selector string.
on.emit("#cart", "items-changed", { count: 3 });
on.target(target, event, fn, options?) — shared non-Element EventTargetsSubscribes to a non-Element EventTarget (window, document lifecycle events, visualViewport, AbortSignal, MediaQueryList) without overwriting sibling modules' handlers. Throws a TypeError if target is a DOM Element — DOM elements always use delegated on(parent, event, selector, fn). Accepts { signal, once, passive, capture } and returns an () => void unsubscribe function (also detaching automatically when signal aborts, or no-opping when signal.aborted is already true).
const stopResize = on.target(window, "resize", () => syncViewport(), {
signal: page.signal,
});
stopResize();
the(...) — statePolymorphic on a single disambiguator: args[0] instanceof Element. Three call shapes per scope (get, set, batch).
| Call | Behavior | Returns |
|---|---|---|
the(key) |
Read body data-KEY. |
string \| null |
the(key, val) |
Write body attribute + [data-text="key"] mirrors document-wide. Persists to localStorage only if key is in persistKeys. |
document.body |
the(key, null) |
Delete: remove the attribute, clear [data-text] mirrors, remove the persisted entry. |
document.body |
the({ k: v, ... }) |
Batch global write; null values delete. |
document.body |
the(el, key) |
Read scoped attribute on el (or aria-mapped equivalent). |
string \| null |
the(el, key, val) |
Write scoped attribute on el + descendant [data-text="key"]. |
el |
the(el, key, null) |
Delete the scoped attribute, clear descendant mirrors. | el |
the(el, { k: v, ... }) |
Batch scoped write; null values delete. |
el |
Key naming. State keys MUST be canonical lowercase kebab-case (^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$) — e.g. "theme", "model-offline", "post-url". There is no silent camelCase or snake_case conversion: one literal spelling holds across HTML (data-model-offline, data-text="model-offline"), CSS ([data-model-offline]), JS (the("model-offline", "1"), the({ "model-offline": "1" })), and localStorage. Non-kebab keys throw a TypeError at runtime and fail otm/kebab-state-keys in ESLint.
Projection is idempotent per target. Every write visits its live bindings in one combined [data-text],[data-bind] scan, changing text or an attribute only when that target's current value differs from the normalized output. Equal [data-text] content retains its existing nodes and native selection; new or externally changed bindings still hydrate even when the owner's state is unchanged. Empty strings remain distinct from null deletion. Opted-in storage writes and their errors are unaffected. For high-frequency regions (streaming status bars, timers, counters on large transcripts), prefer scoped the(containerEl, "status", val) so DOM lookup stays $O(1)$ within that container rather than walking the full document.
Persistence is opt-in. Default behavior writes attributes only — nothing persists to localStorage. Declare the.boot({ persistKeys: ["theme", "lang"] }) to opt specific keys in. The boot replay loads only those keys back. Common persistKeys for an i18n + theme app: ["theme", "lang"].
Deletion is null. the(key, null) removes the attribute, clears every [data-text="key"] mirror to empty, and removes the persisted localStorage entry if the key is in persistKeys. undefined still throws — a missing value is a bug, an explicit null is a delete.
ARIA mapping is element-scoped only (closed 4-key set, key → attribute): expanded, selected, checked, disabled → aria-* when writing via the(el, ...). Criterion: HTML5 widget/form boolean states only. hidden is deliberately not mapped — aria-hidden="true" hides from screen readers without visually hiding the element, so the(el, "hidden", true) writes data-hidden="true" just like global the("hidden", true). Use native [hidden] (or CSS [data-hidden="true"] { display: none; }) to hide visually, and el.setAttribute("aria-hidden", "true") explicitly for decorative icons. Other ARIA attributes (aria-invalid, aria-controls, etc.) also use el.setAttribute(...).
Dynamic <title> and other <head> slots: global the(key, val) writes walk the entire document for [data-text="key"] matches, not just body. Put <title data-text="page-title">Default</title> in <head> and the("page-title", "X") updates it.
Global and scoped keys share one [data-text] namespace. A global write updates every matching slot in the document — including slots inside cloned components and [data-otm-scope] subtrees. Never reuse a global key as a scoped slot key inside a <template> or [data-otm-scope]; otm-lint flags both as HTML-104.
Nested scope boundaries (data-otm-scope). Scoped writes (the(el, ...)) stop at any nested descendant carrying data-otm-scope (including self-scoped child roots such as <a data-otm-scope data-text="name">), so composing nested cards or nested $.reconcile() lists never clobbers child slots that share key names (name, url, status) with their parent. Works uniformly across SSR markup, $.clone(), $.cloneEach(), and $.reconcile().
<article id="workspace-card" data-otm-scope>
<a data-text="name" data-bind="href:url">Workspace</a>
<section id="session-card" data-otm-scope>
<a data-text="name" data-bind="href:url">Session</a>
</section>
</article>
the($("#session-card"), { name: "Session A", url: "/sessions/a" });
the($("#workspace-card"), { name: "Core", url: "/workspaces/core" });
// #session-card's name/url slots stay untouched.
Attribute projection: data-bind="attr:key". The attribute-space sibling of [data-text] — state projects into plain attributes (href, src, datetime, value, title) declaratively. Space-separate multiple bindings; keys are kebab-case like every slot key; the(el, { key: null }) removes the bound attribute.
<template id="profile-card">
<article data-item>
<a data-text="name" data-bind="href:profile-url">@someone</a>
<time data-text="joined" data-bind="datetime:joined-at">recently</time>
</article>
</template>
const card = $.clone("#cards", "#profile-card");
the(card, { name: "@alice", "profile-url": "/@alice", joined: "May 2026", "joined-at": "2026-05-01" });
Truly one-off attributes still use el.setAttribute(name, val) directly, colocated with the write (Discipline #2). data-bind is for attributes that carry per-element state-derived data (every card's link); setAttribute is for structural one-offs. If you're writing the same setAttribute line in every clone loop, that's a data-bind.
Booleans coerce to "true"/"false" inside the setter. the(el, "checked", true) writes "true".
Values MUST be strings, finite numbers, booleans, or null. Numbers and booleans stringify; null deletes. Objects, arrays, functions, symbols, bigint, NaN, and infinities throw at runtime. Pass nested objects through the.flat(...) first.
the(key, undefined) throws. Two args means set; missing val is a contract violation.
the.form(formEl) — form extractionWalks input, select, textarea descendants. Skips unnamed, disabled, submit/button/reset controls, file inputs, and unchecked checkboxes/radios. Parses bracket-notation names into a nested object. Unsafe path segments (__proto__, prototype, constructor) throw instead of entering the result graph:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.