Detect the indentation of code
MIT License
Strip leading whitespace from each line in a string
Detect the dominant newline character of a string
Indent each line in a string
Strip redundant indentation and indent the string
Stringify and write JSON to a file atomically