Server IP : 162.213.251.212 / Your IP : 3.15.235.85 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/allssztx/www/easybuyer/node_modules/path-dirname/ |
Upload File : |
# path-dirname [![Build Status](https://travis-ci.org/es128/path-dirname.svg?branch=master)](https://travis-ci.org/es128/path-dirname) > Node.js [`path.dirname()`](https://nodejs.org/api/path.html#path_path_dirname_path) [ponyfill](https://ponyfill.com) This was needed in order to expose `path.posix.dirname()` on Node.js v0.10 ## Install ``` $ npm install --save path-dirname ``` ## Usage ```js const pathDirname = require('path-dirname'); pathDirname('/home/foo'); //=> '/home' pathDirname('C:\\Users\\foo'); //=> 'C:\\Users' pathDirname('foo'); //=> '.' pathDirname('foo/bar'); //=> 'foo' //Using posix version for consistent output when dealing with glob escape chars pathDirname.win32('C:\\Users\\foo/\\*bar'); //=> 'C:\\Users\\foo/' pathDirname.posix('C:\\Users\\foo/\\*bar'); //=> 'C:\\Users\\foo' ``` ## API See the [`path.dirname()` docs](https://nodejs.org/api/path.html#path_path_dirname_path). ### pathDirname(path) ### pathDirname.posix(path) POSIX specific version. ### pathDirname.win32(path) Windows specific version. ## License MIT