Displaying 1 to 7 from 7 results

strip-indent - Strip leading whitespace from each line in a string

  •    Javascript

The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove.Useful for removing redundant indentation.

add-line-numbers - adds line numbers to a source string

  •    Javascript

Adds line numbers to a source string, padding left and starting at the given offset.Adds a number to the start of each line in the str text.

detect-indent - Detect the indentation of code

  •    Javascript

Pass in a string of any kind of text and get the indentation.The current algorithm looks for the most common difference between two consecutive non-empty lines.




min-indent - Get the shortest leading whitespace from lines in a string

  •    Javascript

The line with the least number of leading whitespace, ignoring empty lines, determines the number. Useful for removing redundant indentation.