MCPcopy
hub / github.com/webpack/webpack / formatPosition

Function formatPosition

lib/util/formatLocation.js:16–25  ·  view source on GitHub ↗
(pos)

Source from the content-addressed store, hash-verified

14 * @returns {string} formatted position
15 */
16const formatPosition = (pos) => {
17 if (pos && typeof pos === "object") {
18 if ("line" in pos && "column" in pos) {
19 return `${pos.line}:${pos.column}`;
20 } else if ("line" in pos) {
21 return `${pos.line}:?`;
22 }
23 }
24 return "";
25};
26
27/**
28 * Returns formatted location.

Callers 1

formatLocationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected