@exchangedevlab/core
v1.0.0
Published
Shared, dependency-free building blocks for the @exchangedevlab packages: strict UTF-8, safe URLs, dependency policy, an import scanner/rewriter (browser-safe); hashing, path containment and TypeScript stripping (Node)
Readme
@exchangedevlab/core
Shared, dependency-free building blocks for the @exchangedevlab packages.
| Import | Environment | Provides |
|---|---|---|
| @exchangedevlab/core/text | browser + Node | strict UTF-8: isValidUtf8 (allocation-free, Unicode Table 3-7), truncateUtf8, utf8Length, decodeUtf8Strict |
| @exchangedevlab/core/url | browser + Node | isSafeUrl with browser-equivalent normalisation, URL_ATTRIBUTES |
| @exchangedevlab/core/policy | browser + Node | dependency policy: classifySpecifier, checkManifest, checkLockfile, EXACT_VERSION, … |
| @exchangedevlab/core/lexer | browser + Node | scan, findImports, findExports, rewriteSpecifiers |
| @exchangedevlab/core/hash | Node | digest, integrity, safeEqual, hashFile, writeChecksums, verifyChecksums |
| @exchangedevlab/core/fs | Node | resolveInside (traversal- and symlink-safe), walkFiles |
| @exchangedevlab/core/ts | Node | stripTypes with TypeStripError (file:line:column) |
@exchangedevlab/core itself re-exports the browser-safe modules only.
import { isSafeUrl } from "@exchangedevlab/core/url";
isSafeUrl("java\tscript:alert(1)"); // falseNo dependencies. No install scripts. Source and review notes: https://github.com/robinhood-apply/vetted-packages
