Strip redundant indentation and indent the string
MIT License
Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz
Detect the indentation of code
Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}
Prepend `https://` to humanized URLs like `sindresorhus.com` and `localhost`
Normalize the newline characters in a string to `\n`
Pad each line in a stream
Repeat a string - fast
Regular expression for matching a shebang line
Detect the dominant newline character of a string
Check if your code is running as an npm or yarn script
Strip leading whitespace from each line in a string
Stringify and write JSON to a file atomically
Indent each line in a string