MCPcopy 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

25const canPop = (path, stack) => isParentDirectory(path) && !isEmpty(stack);
26
27const isCurrentDirectory = (path) => path === '.';
28
29const isParentDirectory = (path) => path === '..';
30

Callers 1

canPushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected