gitwtfhub

wtf is de-indent?

yyx990803/de-indent — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2016-01-05

13JavaScriptAudience · developerComplexity · 1/5DormantSetup · easy

TL;DR

A tiny utility that strips uniform extra leading whitespace from code snippets while preserving their meaningful indentation.

Mindmap

mindmap
  root((repo))
    What it does
      Strips extra indentation
      Normalizes whitespace
      Preserves relative indent
    Tech stack
      JavaScript
    Use cases
      Clean template code
      Doc generators
      Code formatters
    Audience
      Developers
    Notes
      Single-purpose helper
      Lightweight

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Clean up code samples embedded in indented template strings.

REASON 2

Normalize whitespace in a documentation generator's code blocks.

REASON 3

Preprocess code snippets before displaying them in an editor.

REASON 4

Strip extra padding from code pasted into a larger document.

What's in the stack?

JavaScriptNode.js

How it stacks up

yyx990803/de-indent09catho/axonabdulrdeveloper/react--tic-tac-toe
Stars131313
LanguageJavaScriptJavaScriptJavaScript
Last pushed2016-01-05
MaintenanceDormant
Setup difficultyeasymoderateeasy
Complexity1/54/51/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Yoink these prompts

Prompt 1
Show me how to use de-indent to clean up a code snippet pulled from a template string.
Prompt 2
Help me integrate de-indent into a documentation generator that displays code blocks.
Prompt 3
Give me an example of the before-and-after output of de-indent on an indented code sample.
Prompt 4
Explain how de-indent decides what counts as the 'extra' indentation to strip.

Frequently asked questions

wtf is de-indent?

A tiny utility that strips uniform extra leading whitespace from code snippets while preserving their meaningful indentation.

What language is de-indent written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js.

Is de-indent actively maintained?

Dormant — no commits in 2+ years (last push 2016-01-05).

How hard is de-indent to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is de-indent for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.