Skip to content

Main content

Source Map Generated Column Delta

Subtract explicit generated source-map columns within a caller-established line without encoding VLQ or carrying columns across lines.

Loading tool…

Description

Calculate a signed change between supplied generated-source columns.

Development metadata distinguishes source-map deltas, package-person formatting, executable shorthand and Git object modes. A string with package-like syntax need not satisfy the complete registry or package contract. Formatting a person, extracting a command name or mapping a mode does not inspect files or modify a repository.

Calculate a signed change between supplied generated-source columns.

When to use this tool

Use Source Map Generated Column Delta when you already have previousGeneratedColumn, currentGeneratedColumn and need to calculate a signed change between supplied generated-source columns.

How to use the tool and how it works

  1. Enter previousGeneratedColumn, currentGeneratedColumn. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read columnDelta. Use the output convention below.

Require both columns nonnegative safe integers; return currentGeneratedColumn-previousGeneratedColumn.1

Input fieldMeaning and unitsAccepted input
previousGeneratedColumnPrevious Generated ColumnRequired. Safe integer; minimum 0.
currentGeneratedColumnCurrent Generated ColumnRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
columnDeltaSigned current-previous generated column count; not VLQ output or a complete source-map segment.Required. Safe integer.
json
{
  "input": {
    "previousGeneratedColumn": 12,
    "currentGeneratedColumn": 20
  },
  "output": {
    "columnDelta": 8
  }
}

Limitations and assumptions

  • The tool does not parse a source map, choose code-unit conventions, reset line state or VLQ-encode the delta.
  • 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.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Validate the full source map, package metadata or Git object when conformance matters. Use the relevant complete format and actual file/object information; a local delta or grammar check does not establish a valid package, executable, source mapping or tree entry.

References

  1. Calculation and input contract: development/source-map-generated-column-delta — tool.io

Similar or alternative tools