MCPcopy
hub / github.com/prettier/prettier / indent

Function indent

tests/format/js/directives/comments/format.test.js:2–6  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

1import { outdent } from "outdent";
2const indent = (text) =>
3 text
4 .split("\n")
5 .map((line) => (line ? ` ${line}` : line))
6 .join("\n");
7
8const snippets = [
9 "/* comment */ 'use strict';",

Callers 9

doc-builders.jsFile · 0.90
format.test.jsFile · 0.70
doc-trim.jsFile · 0.50
doc-builders.jsFile · 0.50
debug-api.jsFile · 0.50
range.jsFile · 0.50

Calls 2

splitMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…