{"adoption": {"forks": 394, "observed_at": "2026-08-28T04:08:41.955052+00:00", "stars": 4321}, "canonical_url": "https://ross.abutalabs.com/products/file-type", "card": {"archived": false, "artifact_type": "library", "description": "Detect the file type of a file, stream, or data", "domain": ["developer-tools", "files", "web-development"], "enriched": true, "function": ["parser", "developer-tools", "file-system"], "health_score": 99, "homepage": null, "language": "JavaScript", "license": "MIT", "license_family": "permissive", "maturity": "stable", "member_repos": ["sindresorhus/file-type"], "name": "sindresorhus/file-type", "platform": [], "pushed_at": "2026-08-15T01:40:38+00:00", "repo": "sindresorhus/file-type", "stars": 4321, "tags": ["magic-numbers", "file-type-detection", "mime-type", "uint8array", "esm", "nodejs", "javascript"], "topics": ["nodejs", "javascript", "uint8array", "buffer", "magic-numbers", "file", "magic", "file-types", "detect"], "urls": [], "use_cases": ["detect file type from uploaded file in nodejs", "get mime type from a buffer or uint8array", "identify file extension from a stream", "validate uploaded file type by magic numbers", "detect image or video format from file header bytes", "sniff file type of a fetched remote resource"], "what_it_is": "A Node.js/JavaScript library that detects the file type of a file, stream, or buffer by checking its magic number (binary signature). It returns the detected extension and MIME type for binary-based file formats.", "when_to_avoid": ["you need to detect text-based formats like .txt, .csv, or .svg", "you need guaranteed validation that a file is well-formed and not malformed", "your project is CommonJS-only and cannot consume ESM packages"], "when_to_choose": ["you need to detect binary file formats in Node.js from files, streams, or buffers", "you want a lightweight, well-maintained ESM package for MIME/extension sniffing", "you need to validate uploads by their actual binary signature rather than filename"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/file-type", "repo": "sindresorhus/file-type", "role": "main", "score": 98}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-29T18:21:43.736992+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "6d7ea735dfae74f9def73a0550523e46fc4a1e5d8fcefe79b72f73d395350c4e", "fetched_at": "2026-08-28T04:08:41.955052+00:00", "kind": "readme", "missing": false, "url": "https://github.com/sindresorhus/file-type"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-29T18:21:43.736992+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "6d7ea735dfae74f9def73a0550523e46fc4a1e5d8fcefe79b72f73d395350c4e", "fetched_at": "2026-08-28T04:08:41.955052+00:00", "kind": "readme", "missing": false, "url": "https://github.com/sindresorhus/file-type"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-29T18:21:43.736992+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "6d7ea735dfae74f9def73a0550523e46fc4a1e5d8fcefe79b72f73d395350c4e", "fetched_at": "2026-08-28T04:08:41.955052+00:00", "kind": "readme", "missing": false, "url": "https://github.com/sindresorhus/file-type"}], "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:08:41.955052+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-29T18:21:43.736992+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "6d7ea735dfae74f9def73a0550523e46fc4a1e5d8fcefe79b72f73d395350c4e", "fetched_at": "2026-08-28T04:08:41.955052+00:00", "kind": "readme", "missing": false, "url": "https://github.com/sindresorhus/file-type"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-29T18:21:43.736992+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "6d7ea735dfae74f9def73a0550523e46fc4a1e5d8fcefe79b72f73d395350c4e", "fetched_at": "2026-08-28T04:08:41.955052+00:00", "kind": "readme", "missing": false, "url": "https://github.com/sindresorhus/file-type"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-29T18:21:43.736992+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "6d7ea735dfae74f9def73a0550523e46fc4a1e5d8fcefe79b72f73d395350c4e", "fetched_at": "2026-08-28T04:08:41.955052+00:00", "kind": "readme", "missing": false, "url": "https://github.com/sindresorhus/file-type"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:08:41.955052+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-29T18:21:43.736992+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "6d7ea735dfae74f9def73a0550523e46fc4a1e5d8fcefe79b72f73d395350c4e", "fetched_at": "2026-08-28T04:08:41.955052+00:00", "kind": "readme", "missing": false, "url": "https://github.com/sindresorhus/file-type"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-29T18:21:43.736992+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "6d7ea735dfae74f9def73a0550523e46fc4a1e5d8fcefe79b72f73d395350c4e", "fetched_at": "2026-08-28T04:08:41.955052+00:00", "kind": "readme", "missing": false, "url": "https://github.com/sindresorhus/file-type"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-29T18:21:43.736992+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "6d7ea735dfae74f9def73a0550523e46fc4a1e5d8fcefe79b72f73d395350c4e", "fetched_at": "2026-08-28T04:08:41.955052+00:00", "kind": "readme", "missing": false, "url": "https://github.com/sindresorhus/file-type"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-29T18:21:43.736992+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "6d7ea735dfae74f9def73a0550523e46fc4a1e5d8fcefe79b72f73d395350c4e", "fetched_at": "2026-08-28T04:08:41.955052+00:00", "kind": "readme", "missing": false, "url": "https://github.com/sindresorhus/file-type"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 97, "longevity": 100, "rhythm": 98}, "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": 4514, "days_push": 19, "days_rel": 19, "gap_med": 14, "n_releases_24m": 22}, "score": 98, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}