Wair
The Wair command is roughly equivalent to the UNIX 'which' command but in Javascript.
Windows, UNIX & POSIX
The default operation of the path module varies based on the operating system on which a Node.js application is running. Specifically, when running on a Windows operating system, the path module will assume that Windows-style paths are being used.
- On Windows:
- wair.basename('C:\\path\\example.html');
- // Returns: 'C:\\path\\example.html'
- wair.basename('C:\\path\\example.html');
- // Returns: 'example.html'
- On POSIX, UNIX and Windows:
- wair.win32.basename('C:\\path\\example.html');
- // Returns: 'example.html'
- To achieve consistent results when working with POSIX file paths on any operating system, use wair.posix
- On POSIX, UNIX and Windows:
- wair.posix.basename('/path/example.html');
- // Returns: 'example.html'
API Wair C9
WairCalls:
The wair method returns an object whose properties represent significant elements of the wairwair The wair method normalizes the given path segments '..' and '.' resolvingwair wair wairsepwairwair wair;wairwin32 The wairposix property provides access to POSIX specific implementations of the path methodswairposix The wairunix property provides access to UNIX specific implementations of the path methodswairunix '''