{"adoption": {"forks": 125, "observed_at": "2026-08-28T04:07:18.872904+00:00", "stars": 2770}, "canonical_url": "https://ross.abutalabs.com/products/magic-string", "card": {"archived": false, "artifact_type": "library", "description": "Manipulate strings like a wizard", "domain": ["developer-tools", "web-development", "parsers"], "enriched": true, "function": ["parser", "serialization", "developer-tools"], "health_score": 100, "homepage": null, "language": "TypeScript", "license": "MIT", "license_family": "permissive", "maturity": "stable", "member_repos": ["Rich-Harris/magic-string"], "name": "Rich-Harris/magic-string", "platform": ["browser"], "pushed_at": "2026-08-26T10:38:24+00:00", "repo": "Rich-Harris/magic-string", "stars": 2770, "tags": ["sourcemap-generation", "string-manipulation", "code-transformation", "esm-only", "build-tools-utility", "nodejs", "javascript"], "topics": [], "urls": [], "use_cases": ["generate source maps while patching source code strings", "make small edits to code without a full AST parser", "wrap code with a header and footer preserving sourcemap accuracy", "build a custom bundler or transpiler step", "transform non-JavaScript text files with sourcemap support", "indent or move code sections while keeping mappings valid"], "what_it_is": "A small, fast TypeScript library for editing strings in place (update, prepend, append, move, overwrite) while generating accurate v3 source maps. It is widely used by bundlers and transpilers for lightweight source-code transformations without a full AST.", "when_to_avoid": ["you need structural AST-based refactoring with formatting preservation", "you only need plain string manipulation with no sourcemaps", "your project requires CommonJS require() since it is ESM-only"], "when_to_choose": ["you need string-level code edits with sourcemap generation", "recast or a full AST toolchain is overkill for your transformation", "your source language is not JavaScript but you still need sourcemaps", "you are writing a bundler, plugin, or code-mod that patches files lightly"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/magic-string", "repo": "Rich-Harris/magic-string", "role": "main", "score": 99}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T08:16:40.271656+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "8e8a70eeeac9d2167713da1c1e1ba0581b0ea00c38b441bc62a47e626f1a2ec5", "fetched_at": "2026-08-28T04:07:18.872904+00:00", "kind": "readme", "missing": false, "url": "https://github.com/Rich-Harris/magic-string"}, {"content_hash": "87d0207f5625846c3c67f8f19ecf12664e19d79e3fac3324f320ac821e2ae523", "fetched_at": "2026-08-29T09:56:17.161026+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/magic-string"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T08:16:40.271656+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "8e8a70eeeac9d2167713da1c1e1ba0581b0ea00c38b441bc62a47e626f1a2ec5", "fetched_at": "2026-08-28T04:07:18.872904+00:00", "kind": "readme", "missing": false, "url": "https://github.com/Rich-Harris/magic-string"}, {"content_hash": "87d0207f5625846c3c67f8f19ecf12664e19d79e3fac3324f320ac821e2ae523", "fetched_at": "2026-08-29T09:56:17.161026+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/magic-string"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T08:16:40.271656+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "8e8a70eeeac9d2167713da1c1e1ba0581b0ea00c38b441bc62a47e626f1a2ec5", "fetched_at": "2026-08-28T04:07:18.872904+00:00", "kind": "readme", "missing": false, "url": "https://github.com/Rich-Harris/magic-string"}, {"content_hash": "87d0207f5625846c3c67f8f19ecf12664e19d79e3fac3324f320ac821e2ae523", "fetched_at": "2026-08-29T09:56:17.161026+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/magic-string"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T08:16:40.271656+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "8e8a70eeeac9d2167713da1c1e1ba0581b0ea00c38b441bc62a47e626f1a2ec5", "fetched_at": "2026-08-28T04:07:18.872904+00:00", "kind": "readme", "missing": false, "url": "https://github.com/Rich-Harris/magic-string"}, {"content_hash": "87d0207f5625846c3c67f8f19ecf12664e19d79e3fac3324f320ac821e2ae523", "fetched_at": "2026-08-29T09:56:17.161026+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/magic-string"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T08:16:40.271656+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "8e8a70eeeac9d2167713da1c1e1ba0581b0ea00c38b441bc62a47e626f1a2ec5", "fetched_at": "2026-08-28T04:07:18.872904+00:00", "kind": "readme", "missing": false, "url": "https://github.com/Rich-Harris/magic-string"}, {"content_hash": "87d0207f5625846c3c67f8f19ecf12664e19d79e3fac3324f320ac821e2ae523", "fetched_at": "2026-08-29T09:56:17.161026+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/magic-string"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T08:16:40.271656+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "8e8a70eeeac9d2167713da1c1e1ba0581b0ea00c38b441bc62a47e626f1a2ec5", "fetched_at": "2026-08-28T04:07:18.872904+00:00", "kind": "readme", "missing": false, "url": "https://github.com/Rich-Harris/magic-string"}, {"content_hash": "87d0207f5625846c3c67f8f19ecf12664e19d79e3fac3324f320ac821e2ae523", "fetched_at": "2026-08-29T09:56:17.161026+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/magic-string"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:07:18.872904+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T08:16:40.271656+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "8e8a70eeeac9d2167713da1c1e1ba0581b0ea00c38b441bc62a47e626f1a2ec5", "fetched_at": "2026-08-28T04:07:18.872904+00:00", "kind": "readme", "missing": false, "url": "https://github.com/Rich-Harris/magic-string"}, {"content_hash": "87d0207f5625846c3c67f8f19ecf12664e19d79e3fac3324f320ac821e2ae523", "fetched_at": "2026-08-29T09:56:17.161026+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/magic-string"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T08:16:40.271656+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "8e8a70eeeac9d2167713da1c1e1ba0581b0ea00c38b441bc62a47e626f1a2ec5", "fetched_at": "2026-08-28T04:07:18.872904+00:00", "kind": "readme", "missing": false, "url": "https://github.com/Rich-Harris/magic-string"}, {"content_hash": "87d0207f5625846c3c67f8f19ecf12664e19d79e3fac3324f320ac821e2ae523", "fetched_at": "2026-08-29T09:56:17.161026+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/magic-string"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T08:16:40.271656+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "8e8a70eeeac9d2167713da1c1e1ba0581b0ea00c38b441bc62a47e626f1a2ec5", "fetched_at": "2026-08-28T04:07:18.872904+00:00", "kind": "readme", "missing": false, "url": "https://github.com/Rich-Harris/magic-string"}, {"content_hash": "87d0207f5625846c3c67f8f19ecf12664e19d79e3fac3324f320ac821e2ae523", "fetched_at": "2026-08-29T09:56:17.161026+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/magic-string"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T08:16:40.271656+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "8e8a70eeeac9d2167713da1c1e1ba0581b0ea00c38b441bc62a47e626f1a2ec5", "fetched_at": "2026-08-28T04:07:18.872904+00:00", "kind": "readme", "missing": false, "url": "https://github.com/Rich-Harris/magic-string"}, {"content_hash": "87d0207f5625846c3c67f8f19ecf12664e19d79e3fac3324f320ac821e2ae523", "fetched_at": "2026-08-29T09:56:17.161026+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/magic-string"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 99, "longevity": 100, "rhythm": 99}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 4321, "days_push": 7, "days_rel": 7, "gap_med": 6.0, "n_releases_24m": 9}, "score": 99, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}