Results for “comm”
Small, practical examples. Search by task or narrow things down below.
Copy an artifact from an earlier build stage
Docker / Compose: A named stage can produce an artifact without copying its other files.
Docker / Compose✓ Tested
Copy nested structured data independently
TypeScript: structuredClone creates an independent copy of supported structured values.
TypeScript✓ Tested
Count days between UTC-midnight dates
TypeScript: A day is exactly 86400000 milliseconds for these explicitly UTC-midnight inputs.
TypeScript✓ Tested
Count lines in a file
Count newline characters in a text file, printing only the count without the filename.
lines✓ Tested
Count the items in a collection
TypeScript: Read the collection’s length instead of hard-coding the loop limit.
TypeScript✓ Tested
Count Unicode code points in a string
TypeScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.
TypeScript✓ Tested
Count words using a Map
Update a keyed counter without losing its value type.
Map✓ Tested
Create a branch at the original base of a stash
Git: stash branch checks out the stash’s base and reapplies the saved work there.
Git✓ Tested
Create a branch from a known release tag
Git: A named starting revision makes the branch’s initial commit explicit.
Git✓ Tested
Create a branch without switching to it
Git: Create a branch without switching to it inside the disposable repository created by the input setup.
Git✓ Tested
Create a compressed tar archive
Bundle a directory into a gzip-compressed tar archive, preserving the directory structure.
tar✓ Tested
Create a directory tree
Create a directory and its missing parent directories. The -p option also succeeds when the directories already exist.
directory✓ Tested