Description
Classify a source-map segment by its supplied field count.
A source-map segment separates field structure, signed deltas and Base64 VLQ serialization. Its sign fold is not the same as other signed integer encodings, and local field counts do not establish valid source positions.
Classify a source-map segment by its supplied field count.
When to use this tool
Use Source Map Segment Field Count when checking one explicit source-map field or sign convention.
How to use the tool and how it works
- Enter fields. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read kind. Use the output convention below.
Classify a source-map segment by its supplied field count. Accept only one, four or five fields, returning unmapped, mapped or named respectively.1
Source-map fields use signed delta values and Base64 VLQ conventions; one local field check does not validate a complete mapping.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| fields | Fields | Required. Array of safe integer; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| kind | Kind | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"fields": [
3
]
},
"output": {
"kind": "unmapped"
}
} Limitations and assumptions
- Values and deltas are not validated; a recognized count does not prove a valid mapping segment.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a conforming complete source-map parser and the actual source files when mapping generated code back to originals.
References
-
Calculation and input contract: development/source-map-segment-field-count — tool.io
-
ECMA-426: source map format — Ecma International
Similar or alternative tools
- Development: Source Map Base64 Vlq Sign Fold
Fold one signed integer for source-map Base64 VLQ.
- Development: Unified Diff Range Field Split
Parse one unified-diff range field.