Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

backOpen Source→codsen-utils→Examples

Permalink to Table of ContentsTable of Contents

  • 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
↑ back to top

Permalink to Quick TakeQuick Take

↑ back to top

Permalink to Classify individual charactersClassify individual characters

↑ back to top

Permalink to Parse typed, short and repeatable CLI flagsParse typed, short and repeatable CLI flags

↑ back to top

Permalink to Assemble CLI help textAssemble CLI help text

↑ back to top

Permalink to Deeply clone a cyclic object graphDeeply clone a cyclic object graph

↑ back to top

Permalink to Detect and resolve line endingsDetect and resolve line endings

↑ back to top

Permalink to Test whether a value existsTest whether a value exists

↑ back to top

Permalink to Find overlapping substring occurrencesFind overlapping substring occurrences

↑ back to top

Permalink to Match a string against literal and regular-expression choicesMatch a string against literal and regular-expression choices

↑ back to top

Permalink to Intersect arrays in the first array's orderIntersect arrays in the first array's order

↑ back to top

Permalink to Reject a character that is not a digitReject a character that is not a digit

↑ back to top

Permalink to Omit keys and clone retained valuesOmit keys and clone retained values

↑ back to top

Permalink to Check own properties safelyCheck own properties safely

↑ back to top

Permalink to Distinguish plain objects from other object valuesDistinguish plain objects from other object values

↑ back to top

Permalink to Remove selected array values without mutating the inputRemove selected array values without mutating the input

↑ back to top

Permalink to Remove one trailing slashRemove one trailing slash

↑ back to top

Permalink to Sort strings with the shared comparatorSort strings with the shared comparator

↑ back to top

Permalink to Replace part of a stringReplace part of a string

↑ back to top

Permalink to Reuse shared text symbols and HTML tag setsReuse shared text symbols and HTML tag sets

↑ back to top

Permalink to Trim selected characters from both string edgesTrim selected characters from both string edges

↑ back to top

Permalink to Check common JavaScript value typesCheck common JavaScript value types

↑ back to top

Permalink to Deduplicate values while preserving orderDeduplicate values while preserving order

↑ back to top

Permalink to Match wildcard allow-lists and deny-listsMatch wildcard allow-lists and deny-lists

↑ back to top
back 

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab