Complete residential site build with Docker Compose & Gitea Actions deployment

This commit is contained in:
CalebLewallen
2026-05-13 17:31:20 -04:00
parent f9c4e13a50
commit 3c22823f72
19354 changed files with 2097331 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# common-ancestor-path
Find the common ancestor of 2 or more paths on Windows or Unix
## USAGE
Give it two or more path strings, and it'll do the thing.
```ts
import { commonAncestorPath } from 'common-ancestor-path'
// or:
// const { commonAncestorPath } = require('common-ancestor-path')
// output /a/b
console.log(commonAncestorPath('/a/b/c/d', '/a/b/x/y/z', '/a/b/c/i/j/k'))
// normalizes separators, but NOT cases, since it matters sometimes
console.log(commonAncestorPath('C:\\a\\b\\c', 'C:\\a\\b\\x'))
// no common ancestor on different windows drive letters
// so, this returns null
console.log(commonAncestorPath('c:\\a\\b\\c', 'd:\\d\\e\\f'))
```
## API
`commonAncestorPath(...paths)`
Returns the nearest (deepest) common ancestor path, or `null` if on
different roots on Windows.