All program examples
Permalink to all-named-html-entitiesall-named-html-entities →
Permalink to array-group-str-omit-num-chararray-group-str-omit-num-char →
Permalink to array-includes-with-globarray-includes-with-glob →
Permalink to array-pull-all-with-globarray-pull-all-with-glob →
Permalink to arrayiffy-if-stringarrayiffy-if-string →
Permalink to ast-compareast-compare →
- Quick Take
- Compare Arrays
- Compare Plain Objects
- Compare Strings
opts.arrayOrderopts.hungryForWhitespaceopts.matchStrictlyopts.useWildcardsopts.verboseWhenMismatches- Report deterministic work and elapsed time
- Report comparison progress
- Match each unordered array element only once
- Compare nested arrays without regard to order
- Match object keys using wildcards
Permalink to ast-contains-only-empty-spaceast-contains-only-empty-space →
Permalink to ast-deep-containsast-deep-contains →
Permalink to ast-delete-objectast-delete-object →
- Quick Take
- Delete empty objects throughout a tree
- Delete every object that contains the requested pair
- Delete a matching object nested under another object
- Delete the root object when it contains the requested key-value pairs
- Keep whitespace-only objects when hungry matching is disabled
opts.hungryForWhitespaceopts.matchKeysStrictly- Delete an object that contains additional keys
Permalink to ast-get-objectast-get-object →
Permalink to ast-get-values-by-keyast-get-values-by-key →
- Quick Take
- Match keys case-sensitively
- Fetch the values of several keys at once
- Replace all null's in keys
amountwith zero, but only underorders - Replace each match with the next value in the array
- A single replacement value is used only once
- Set the values of keys matched by a wildcard
- Using wildcard patterns
Permalink to ast-is-emptyast-is-empty →
- Quick Take
- Terminate on cycles and reuse completed shared subtrees
- Recognise a tree made only from empty strings and containers
- Inspect frozen completion statistics
- Compose progress reporting into a caller's range
- Return null when the tree contains an unsupported value type
- Treat whitespace-only strings as content
Permalink to ast-loose-compareast-loose-compare →
Permalink to ast-monkeyast-monkey →
- Quick Take
- Delete matches from arrays only
- Delete every object key of a given name
- Delete nodes by value
- Drop a node by its traversal index
- Find nodes matching both a key and a value
- Find nodes by value alone
- Find explicit undefined values
- Search array elements only
- Search object properties only
- Get a node by its traversal index
- Keep only the first element of every array
- Set a node's value by its traversal index
- Set a value to undefined
- Set a node using
keyinstead ofval - Delete during traversal with the collision-free token
- Traverse a tree using the re-exported
traverse
Permalink to ast-monkey-traverseast-monkey-traverse →
Permalink to ast-monkey-traverse-with-lookaheadast-monkey-traverse-with-lookahead →
Permalink to ast-monkey-utilast-monkey-util →
Permalink to charcode-is-valid-xml-name-charactercharcode-is-valid-xml-name-character →
Permalink to check-types-minicheck-types-mini →
- Quick Take
- Exclude selected paths from array acceptance
- Accept arrays of the reference value's type
- Allow any shape below a schema path
- Customise validation error context
- Ignore a key wherever it occurs
- Ignore only selected nested paths
- Validate a property whose key contains a literal dot
- Use a nested schema object
- Compose progress and inspect completion statistics
- Allow missing and additional keys
- Allow multiple types through a schema
- Validate an options object against defaults
Permalink to codsen-format-diagnostic-valuecodsen-format-diagnostic-value →
Permalink to codsen-globcodsen-glob →
- Quick Take
- Abort an asynchronous search
- Return absolute paths
- Brace expansion and extglobs
- Match without case sensitivity
- Configure directory expansion
- Return directories
- Disable symbolic-link traversal
- Include hidden entries
- Veto matches with ignore patterns
- Combine multiple patterns
- Exclude matches with a negative pattern
- Synchronous globbing
- Use a file URL as the working directory
Permalink to codsen-utilscodsen-utils →
- Quick Take
- Classify individual characters
- Parse typed, short and repeatable CLI flags
- Assemble CLI help text
- Deeply clone a cyclic object graph
- Detect and resolve line endings
- Test whether a value exists
- Find overlapping substring occurrences
- Match a string against literal and regular-expression choices
- Intersect arrays in the first array's order
- Reject a character that is not a digit
- Omit keys and clone retained values
- Check own properties safely
- Distinguish plain objects from other object values
- Remove selected array values without mutating the input
- Remove one trailing slash
- Sort strings with the shared comparator
- Replace part of a string
- Reuse shared text symbols and HTML tag sets
- Trim selected characters from both string edges
- Check common JavaScript value types
- Deduplicate values while preserving order
- Match wildcard allow-lists and deny-lists
Permalink to color-shorthand-hex-to-six-digitcolor-shorthand-hex-to-six-digit →
Permalink to csv-sortcsv-sort →
Permalink to csv-split-easycsv-split-easy →
- Quick Take
- Convert decimal commas while retaining grouping separators
- Use options created in another JavaScript realm
- Leave single decimal place numbers unpadded
- Unescape doubled-up double quotes
- Keep the thousand separators in numbers
- Preserve line breaks inside quoted fields
opts.delimiter- Pad single-digit fractions without changing longer decimal values
- Read quoted fields after record breaks
- Skip blank rows
- Convert continental number style into UK style
Permalink to detect-is-it-html-or-xhtmldetect-is-it-html-or-xhtml →
Permalink to detect-templating-languagedetect-templating-language →
- Quick Take
- Detect Jinja namespace syntax
- Detect Java Server Pages using a JSP Standard Tag Library element
- Recognize JSP standard actions through a renamed XML namespace prefix
- Report when no supported template language is present
- Shared inline conditional syntax keeps the Nunjucks fallback
- A complete template comment provides shared-family evidence
Permalink to detergentdetergent →
- Quick Take
- Insert a line break where a selected HTML tag is stripped
- Add missing spaces after sentence punctuation
- Discover which cleanup rules apply to an input
- Transform text outside HTML tags with a callback
- Normalise typographic apostrophes
- Normalise a dash according to the conversion setting
- Convert three dots to an ellipsis entity
- Choose whether to encode HTML entities
- Inspect the exported default options
- Set the end-of-line sequence inserted after HTML break tags
- Fix misspelled named HTML entities
- Choose HTML or XHTML break-tag syntax
- Keep selected tags while stripping the rest
- Preserve or encode non-Latin characters
- Preserve CSS in retained HTML
- Collapse line breaks to spaces
- Keep the last two words together
- Replace line breaks with HTML break tags
- Choose whether to strip HTML tags
Permalink to edit-package-jsonedit-package-json →
- Quick Take
- Add a key that is not there yet, at the indentation the file already uses
- Delete an array item by its dot-path index
- Delete a nested object key
- Minimal example,
del() - Minimal example,
set() - Replace an existing array item by its dot-path index
- Replace an existing nested value with null
- Set a numeric value without changing surrounding formatting
- Replace an object value while preserving outer formatting
Permalink to email-all-chars-within-asciiemail-all-chars-within-ascii →
Permalink to email-combemail-comb →
- Quick Take
- Keep classes inside backend template markers
- Keep HTML comments containing a given string
- Match decoded HTML class values
- CSS escapes identify the same class names as their decoded HTML values.
- Keep CSS comments
- Keep HTML comments
- Keep id's referenced by
forattributes - Minifies and uglifies
- Preserve CSS comment boundaries
- Unchanged short names keep the escaping required by their output context.
- Report progress within a custom range
- Remove media queries left empty
- Returns all extracted and deleted classes and id's
- Works even if
<style>is within<body>and there's no<head> - Uglify class and ID selectors with the convenience API
- Whitelist a selector from removal
- Whitelist using wildcards
Permalink to extract-search-indexextract-search-index →
- Quick Take
- Keep the first occurrence of each case-insensitive word
- Parse attribute boundaries before decoding retained text
- Strip HTML tags and decode entities
- Normalise fancy punctuation and omit digits and astral characters
- Exclude code, preformatted text, and CSS from the index
- Remove URLs and stop words from search-index text
- Preserve BMP letters while separating words around surrogate code units
Permalink to generate-atomic-cssgenerate-atomic-css →
- Quick Take
- Generate from a separate configuration string
- Wrap generated content in marker comments
- Extract a configured generation range
- Retain the generator configuration
- Access canonical marker names
- Leave CSS without generator placeholders unchanged
- Align generated declarations
- Observe generation progress in a custom interval
Permalink to html-all-known-attributeshtml-all-known-attributes →
Permalink to html-crushhtml-crush →
- Quick Take
- Configure CSS comment removal
- Insert line breaks before selected tokens
- Treat a custom element as inline
- Choose which HTML comments to remove
- Wrap minified HTML at a line-length limit
- Preserve CSS token boundaries when removing comments
- Preserve whitespace that terminates CSS escapes
- Preserve encoded inline CSS
- Observe progress in a custom interval
- Remove line indentations
- Remove HTML line breaks
- Inspect result metadata and edit ranges
Permalink to html-entities-not-email-friendlyhtml-entities-not-email-friendly →
Permalink to html-entity-codechtml-entity-codec →
Permalink to html-img-althtml-img-alt →
Permalink to html-table-patcherhtml-table-patcher →
Permalink to is-char-suitable-for-html-attr-nameis-char-suitable-for-html-attr-name →
Permalink to is-html-attribute-closingis-html-attribute-closing →
- Quick Take
- Broken #1
- Broken #2
- Broken #3
- Return false for unusable source indexes
- Recover when spaces replace attribute equals signs
- Recover when an attribute value has no opening quote
- Distinguish quotes inside a value from its closing quote
- Detect the end of a single-quoted attribute value
- Ignore quotes that belong to templating code inside a value
Permalink to is-html-tag-openingis-html-tag-opening →
Permalink to is-language-codeis-language-code →
- Quick Take
- Match registered tags without regard to letter case
- Explain a language tag containing two region subtags
- Explain an extended language subtag with the wrong prefix
- Validate an extended language subtag after its registered prefix
- Validate multiple uniquely prefixed extensions
- Accept an IANA-grandfathered language tag
- Reject text that does not resemble a language tag
- Validate a private-use language tag
- Explain why a repeated variant is invalid
- Validate language, script, region, and variant subtags together
- Explain an extension singleton without extension content
- Various examples
Permalink to is-media-descriptoris-media-descriptor →
Permalink to is-relative-uriis-relative-uri →
Permalink to js-row-numjs-row-num →
Permalink to json-comb-corejson-comb-core →
- Quick Take
- Compute a keyset from promises with a custom placeholder
- Enforce a keyset asynchronously, with options
- Mark comment keys with a custom suffix
- Enforce a keyset using a custom placeholder
- Compute a keyset using a custom placeholder
- Find unused keys marked by a custom placeholder
- Leave the chosen placeholder paths unexpanded
- Enforce a keyset computed from many objects
- Asynchronous
enforceKeyset() - Synchronous
enforceKeysetSync() - Expand a
nullvalue into the schema - Synchronous
findUnusedSync()- example #2 - Synchronous
findUnusedSync()- example #1 - Asynchronous
getKeyset() - Synchronous
getKeysetSync() - Synchronous
noNewKeysSync()- example #2 - Synchronous
noNewKeysSync()- example #1 - Sort object keys in semver order
- Synchronous
getKeysetSync()
Permalink to json-variablesjson-variables →
- Quick Take
- Allow a resolved value to be wrapped twice
- Allow variables that cannot be resolved
- Control how booleans resolve
- Use a custom data container suffix
- Use custom variable markers
- Configure markers that resolve variables without output wrapping
- Resolve variables from a data container
- Switch off all wrapping
- Ignore data containers
- Leave the selected variables unwrapped
- Skip wrapping using alternative markers
- Reject a number inserted into a string
- Reject values containing a lone marker
- Resolve booleans to empty text
- Replace unresolved variables with a fallback
- A whole number keeps its type
- Wrap the resolved values
Permalink to lerna-clean-changelogslerna-clean-changelogs →
- Quick Take
- Empty cleaned text is a valid result; retain an existing EOF newline.
- Fix SourceHut commit links
- Keep literal examples while removing unfinished changelog entries.
- Clean CR-only documents while retaining their line-ending style.
- Preserve CRLF line endings
- Retain a release heading while published changes remain beneath it.
- Normalize list markers while keeping the separator between the lists.
- Remove WIP entries and tidy the headings
- Keep the full version and date while removing its complete Markdown link.
Permalink to object-all-values-equal-toobject-all-values-equal-to →
Permalink to object-boolean-combinationsobject-boolean-combinations →
Permalink to object-delete-keyobject-delete-key →
- Quick Take
- Deletion by the key only
- Deletion by the value only
- Delete null and undefined object values
- Disable the cleanup which would otherwise happen after deletion
- Delete only when both the key and value match
- Delete matching object keys without deleting matching array values
- Compose progress and inspect completion statistics
- Wildcards
Permalink to object-fill-missing-keysobject-fill-missing-keys →
- Quick Take
- Clone a schema array when the input array is empty
- Use true as the placeholder at paths that must remain unfilled
- An option to not fill the paths if they contain placeholders
- Fill missing keys in every existing array item
- Fill null values when null is not an explicit opt-out
- Truncation upon request, to minimize the object footprint
opts.useNullAsExplicitFalse- Using placeholder to cause the value population
Permalink to object-flatten-all-arraysobject-flatten-all-arrays →
Permalink to object-flatten-referencingobject-flatten-referencing →
- Quick Take
- Wrap an already wrapped value when prevention is disabled
- Insert a break even when the previous line already contains one
- Normalise a string setting to an array
- Avoid adding a break after a line that already ends with one
- Wrap flattened string values with custom markers
- Inspect the exported flattening defaults
- Disable wrapping across the complete input tree
- Skip wrapping for keys that match a glob
- Skip wrapping only at an exact nested path
- Flatten an array with line breaks between rows
- Flatten an object's keys and values to strings
- Use HTML rather than XHTML line-break syntax
- Leave an ignored key and its nested value unchanged
- Merge array rows without inserting line breaks
- Flatten input keys even when the reference has no matching key
- Leave an unmatched input key unchanged
- Throw when an input key is absent from the reference
- Set the separator used by flattenObject
- Keep values that already contain the wrapping markers
- Leave templating statements unwrapped
Permalink to object-merge-advancedobject-merge-advanced →
- Quick Take
- Override a merge result in the callback
- Deduplicate and sort merged string arrays
- Clear an array merge when either array contains strings
- Concatenate every clashing pair of arrays
- Concatenate arrays on a selected key
- Prefer incoming values for every clash
- Take the incoming value for a selected clashing key
- Keep existing values for every clash
- Merge array values and omit duplicates instead of concatenating positions
- Merge Boolean clashes with AND instead of the default OR
- Merge positioned array objects even when their key sets differ
- Let null explicitly override another value
- Apply one array object to every object in the other array
- Reuse caller-owned inputs instead of defensively cloning them
Permalink to object-no-new-keysobject-no-new-keys →
Permalink to object-set-all-values-toobject-set-all-values-to →
Permalink to ranges-applyranges-apply →
Permalink to ranges-cropranges-crop →
Permalink to ranges-ent-decoderanges-ent-decode →
Permalink to ranges-invertranges-invert →
Permalink to ranges-is-index-withinranges-is-index-within →
Permalink to ranges-iterateranges-iterate →
Permalink to ranges-mergeranges-merge →
Permalink to ranges-process-outsideranges-process-outside →
Permalink to ranges-pushranges-push →
- Quick Take
- Add a complete array of ranges in one call
- Read the most recently gathered range
- Collapse replacement whitespace to one character
- Retain at most two line breaks in replacement whitespace
- Concatenate replacement values when same-start ranges merge
- Keep the later replacement value when same-start ranges merge
- Replace all previously gathered ranges
- Accept the string form of merge type one
- Accept the string form of merge type two
- Clear every gathered range
Permalink to ranges-regexranges-regex →
- Quick Take
- Clashing replacement values
- Give deletion precedence with a null replacement
- Require the global flag so every match can be collected safely
- Slice the source text using the returned ranges
- Merge adjacent regex matches into one range
- Nothing was found
- Replacing values
- Advance over a complete Unicode code point after an empty match
- Turn zero-width matches into insertion ranges
Permalink to ranges-sortranges-sort →
Permalink to regex-empty-conditional-commentsregex-empty-conditional-comments →
- Quick Take
- Extract the first empty conditional comment
- Find all empty conditional comments
- Ignore conditional comments that contain markup
- Collect empty conditional comments but skip populated ones
- Match the revealed form of an empty conditional comment
- Remove empty conditional comments
- Use a fresh regular expression for an independent scan
Permalink to regex-is-jinja-nunjucksregex-is-jinja-nunjucks →
Permalink to regex-is-jspregex-is-jsp →
Permalink to regex-jinja-specificregex-jinja-specific →
Permalink to rehype-responsive-tablesrehype-responsive-tables →
Permalink to remark-conventional-commit-changelog-timelineremark-conventional-commit-changelog-timeline →
Permalink to remark-typographyremark-typography →
Permalink to str-indexes-of-plusstr-indexes-of-plus →
Permalink to string-apostrophesstring-apostrophes →
Permalink to string-character-is-astral-surrogatestring-character-is-astral-surrogate →
Permalink to string-collapse-leading-whitespacestring-collapse-leading-whitespace →
- Quick Take
- Collapse boundary whitespace containing line breaks
- Preserve CRLF line endings
- Keep a chosen number of leading and trailing line breaks
- Preserve non-breaking-space boundaries
- Pass through non-string input
- Leave whitespace inside a multiline string unchanged
- Preserve a string that has no boundary whitespace
- Collapse strings containing only whitespace
Permalink to string-collapse-white-spacestring-collapse-white-space →
- Quick Take
- Minify a chunk of CSS selector
- Collapse a run containing tabs
- Replace tabs inside whitespace runs with ordinary spaces
- Keep at most one consecutive empty line
- Collapse but preserve one leading space
- Preserve one space around each line's content
- Collapse but preserve one trailing space
- Remove empty lines from multiline text
- Inspect the ranges used to produce the collapsed result
- Trim whitespace from the start and end of every line
- Trim multiline content whose boundaries contain non-breaking spaces
- Trim raw non-breaking spaces with ordinary whitespace
Permalink to string-convert-indexesstring-convert-indexes →
- Quick Take
- Convert the indexes within a plain object
- Convert an array of native indexes
- Convert a single native index
- Convert the indexes within a nested structure
- Throw on an out-of-range Unicode index
- Convert the indexes there and back
- Convert Unicode indexes into native ones
- Index a zero-width-joiner emoji sequence
Permalink to string-dashesstring-dashes →
Permalink to string-extract-class-namesstring-extract-class-names →
- Quick Take
- Extract selectors from HTML-style attribute selectors
- Non-parsing algorithm can tackle really dodgy CSS
- Decode CSS selector escapes
- Extract raw escaped selectors
- Isolate a selector prelude before extraction
- Read lexical tokens from an isolated CSS region, retaining original offsets.
- Read one selector token at an exact index
- Inspect the source ranges of extracted selectors
- Read semantic attribute selectors
- Processes whole CSS selectors
Permalink to string-extract-sass-varsstring-extract-sass-vars →
Permalink to string-find-heads-tailsstring-find-heads-tails →
- Quick Take
- Prefix validation errors with the calling library's name
- Reject an input made only from one opening marker
- Start looking for marker pairs at a selected index
- Return an empty result for unusable marker inputs
- Require each opening marker to use the tail at the same array index
- Return completed pairs without throwing on an unmatched marker
Permalink to string-find-malformedstring-find-malformed →
Permalink to string-fix-broken-named-entitiesstring-fix-broken-named-entities →
- Quick Take
- Apply the returned ranges to repair the source string
- Report healthy named-entity ranges
- Decode healthy named entities
- Decode decimal and hexadecimal numeric entities
- Map findings into custom callback results
- Repair repeatedly encoded entities
- Observe scan progress
- Access the complete public rule-name list
- Sift raw ampersands in a string from broken character references
Permalink to string-left-rightstring-left-right →
- Quick Take
- Match a character sequence without regard to letter case
- Match repeated sequences on the left and include nearby whitespace
- Control how chomp functions include surrounding whitespace
- Match repeated sequences on the right and include nearby whitespace
- Match a whitespace-tolerant character sequence on the left
- Combine optional and repeated sequence flags
- Mark one sequence value as optional with a question mark
- Match one or more repeated sequence values with an asterisk
- Match a whitespace-tolerant character sequence on the right
- Find the nearest non-whitespace character on the right
- Treat a newline as a stopping point in either direction
- Treat a raw non-breaking space as a stopping point
- Match an astral symbol as two UTF-16 code units
Permalink to string-match-left-rightstring-match-left-right →
- Quick Take
- Inspect the character and remainder after a match
- Let a callback veto an otherwise successful match
- Match without letter-case sensitivity
- The Callback Use
- Advance to the next string index
- Match the start or end of a string
- Include the indexed character in a left-side match
- Match a value immediately to the left of an index
- Include the indexed character in a right-side match
- Require boundary characters and choose hungry matching
- Tolerate a missing character
- Skip selected characters before matching
- Skip whitespace before matching
Permalink to string-process-comma-separatedstring-process-comma-separated →
Permalink to string-range-expanderstring-range-expander →
- Quick Take
- Include configured left-side marker characters in the range
- Include a configured right-side marker in the range
- Expand whitespace only on the left side
- Expand whitespace only on the right side
- Request one replacement space when deletion would join words
- Preserve a separator between international words
- Crop tightly when a configured marker appears on the left
- Include all adjacent whitespace on the left
- Include all adjacent whitespace on the right
Permalink to string-remove-duplicate-heads-tailsstring-remove-duplicate-heads-tails →
Permalink to string-remove-thousand-separatorsstring-remove-thousand-separators →
- Quick Take
- Convert decimal commas while retaining grouping separators
- Pad a single decimal digit while removing thousand separators
- Leave a single decimal place unpadded
- Convert a comma decimal separator to a dot
- Remove spaced thousand separators when no decimal separator is present
- Keep thousand separators while still normalising the outer quotes
- Leave a value unchanged when it contains non-numeric text
- Preserve a number whose separators are ambiguous
- Pad one-digit fractions without losing precision
- Remove spaces used as thousand separators
- Remove apostrophes used as thousand separators
Permalink to string-remove-widowsstring-remove-widows →
- Quick Take
- Encode the inserted non-breaking space for CSS
- Ignore a custom pair of template markers
- Keep a dash with its neighbouring words when hyphen handling is enabled
- Ignore every built-in template syntax preset
- Ignore Hexo template expressions while processing surrounding text
- Ignore Hugo template expressions while processing surrounding text
- Ignore Jinja tags while processing surrounding text
- Ignore Liquid tags while processing surrounding text
- Ignore Nunjucks tags while processing surrounding text
- Encode the inserted non-breaking space for JavaScript
- Apply widow prevention only after the minimum character count is reached
- Apply widow prevention only after the minimum word count is reached
- Inspect which transformations were applied
- Map progress reports into a caller-owned percentage range
- Insert a raw non-breaking space instead of an encoded entity
- Remove an existing widow-prevention entity
- Keep both halves of a UK postcode together
- Widow word removal from text within HTML
Permalink to string-split-by-whitespacestring-split-by-whitespace →
Permalink to string-strip-htmlstring-strip-html →
- Quick Take
- Ignores code tags and their contents
- A bypass callback and a do-nothing callback
- Strip an entire CDATA section
- Decode HTML entities before recognising and stripping encoded tags
- Keep a link destination next to its label
- Put a retained link destination on a new paragraph
- Extract HTML
<head>contents - Strip an HTML comment and prevent adjacent text from joining
- Preserve selected tags while stripping the rest
- Strip a JSX component tag from surrounding text
- Retain href and link label
- Leave only HTML
- Leave only opening
tdtags - Leave only
tdtags - Minimal example using Ranges
- Preserve indentation while collapsing whitespace around stripped tags
- Leave JSP scriptlets intact while stripping HTML
- Preserve punctuation around removed inline tags
- Preserve literal comparison brackets in plain text
- Insert spaces when removing tags between adjacent text
- Map progress reporting into a custom percentage range
- Remove all HTML from a string
- Strip script tags but retain their text when paired-content removal is disabled
- Strip HTML from a raw JSON string
- Remove a selected tag pair together with its contents
- Preserve custom elements while stripping recognised HTML tags
- Trim ordinary spaces while preserving tabs and line breaks
- Prevent widow words while preserving HTML
- Wrap a retained link destination with custom markers
Permalink to string-trim-spaces-onlystring-trim-spaces-only →
- Quick Take
- Include carriage returns in the configured trim set
- Trim every JavaScript whitespace character
- Trim tabs but preserve ordinary spaces at the edges
- Include line feeds in the configured trim set
- Preserve non-space whitespace at the trimmed boundaries
- Include raw non-breaking spaces in the configured trim set
- Return an empty ranges array when the value needs no trimming
- Include tabs in the configured trim set