file-lang 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -34
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,23 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
`file-lang` is a tiny utility that maps file extensions and well-known filenames to **human‑readable language names**.
|
|
6
6
|
|
|
7
|
-
No heuristics. No content parsing. No guessing.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<br />
|
|
12
|
-
|
|
13
|
-
## Why
|
|
14
|
-
|
|
15
|
-
When building tools that analyze files, repositories, you end up rewriting the same logic again and again:
|
|
16
|
-
|
|
17
|
-
- Extract extension from paths
|
|
18
|
-
- Normalize weird inputs
|
|
19
|
-
- Map extensions to language names
|
|
20
|
-
- Handle unknowns safely
|
|
21
|
-
|
|
22
|
-
`file-lang` exists so you never have to think about this again.
|
|
23
|
-
|
|
24
7
|
---
|
|
25
8
|
|
|
26
9
|
<br />
|
|
@@ -89,22 +72,6 @@ Examples:
|
|
|
89
72
|
|
|
90
73
|
<br />
|
|
91
74
|
|
|
92
|
-
## Design Principles
|
|
93
|
-
|
|
94
|
-
- Deterministic output
|
|
95
|
-
- Extension-based only
|
|
96
|
-
- Zero dependencies
|
|
97
|
-
- Minimal public API
|
|
98
|
-
- Predictable behavior
|
|
99
|
-
|
|
100
|
-
If an extension is ambiguous or unclear, `file-lang` **does not guess**.
|
|
101
|
-
|
|
102
|
-
Ambiguity resolves to `"Unknown"`.
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
<br />
|
|
107
|
-
|
|
108
75
|
## Contributing
|
|
109
76
|
|
|
110
77
|
Contributions are welcome, especially:
|
|
@@ -116,4 +83,3 @@ Guidelines:
|
|
|
116
83
|
|
|
117
84
|
- Keep changes minimal
|
|
118
85
|
- Follow existing naming conventions
|
|
119
|
-
- Do not introduce heuristics or content-based detection
|