Created
March 30, 2026 11:54
-
-
Save goofballLogic/9cf1c8914d92a59d734551e2de02be7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function resolvePath(fs, path) { | |
| if (!(path in fs)) return null; | |
| const { [path]: nextPath, ...others } = fs; | |
| return nextPath ? resolvePath(others, nextPath) : path; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment