Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ isCurrentDirectory
Function
isCurrentDirectory
javascript/0071-simplify-path.js:27–27 ·
view source on GitHub ↗
(path)
Source
from the content-addressed store, hash-verified
25
const
canPop = (path, stack) => isParentDirectory(path) && !isEmpty(stack);
26
27
const
isCurrentDirectory = (path) => path ===
'.'
;
28
29
const
isParentDirectory = (path) => path ===
'..'
;
30
Callers
1
canPush
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected