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

backOpen Source→codsen-utils→Examples

Table 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
  • Check common JavaScript value types
  • Deduplicate values while preserving order
  • Match wildcard allow-lists and deny-lists
↑ back to top

Quick Take

↑ back to top

Classify individual characters

↑ back to top

Parse typed, short and repeatable CLI flags

↑ back to top

Assemble CLI help text

↑ back to top

Deeply clone a cyclic object graph

↑ back to top

Detect and resolve line endings

↑ back to top

Test whether a value exists

↑ back to top

Find overlapping substring occurrences

↑ back to top

Match a string against literal and regular-expression choices

↑ back to top

Intersect arrays in the first array's order

↑ back to top

Reject a character that is not a digit

↑ back to top

Omit keys and clone retained values

↑ back to top

Check own properties safely

↑ back to top

Distinguish plain objects from other object values

↑ back to top

Remove selected array values without mutating the input

↑ back to top

Remove one trailing slash

↑ back to top

Sort strings with the shared comparator

↑ back to top

Replace part of a string

↑ back to top

Reuse shared text symbols and HTML tag sets

↑ back to top

Check common JavaScript value types

↑ back to top

Deduplicate values while preserving order

↑ back to top

Match 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