tenebrous-dicebot/api/node_modules/path-dirname
projectmoon f9d6b7b827 Working grpc-web. Needs tonic master. Next step: attempt same shit with web assembly 2021-06-02 22:52:01 +00:00
..
index.js Working grpc-web. Needs tonic master. Next step: attempt same shit with web assembly 2021-06-02 22:52:01 +00:00
license Working grpc-web. Needs tonic master. Next step: attempt same shit with web assembly 2021-06-02 22:52:01 +00:00
package.json Working grpc-web. Needs tonic master. Next step: attempt same shit with web assembly 2021-06-02 22:52:01 +00:00
readme.md Working grpc-web. Needs tonic master. Next step: attempt same shit with web assembly 2021-06-02 22:52:01 +00:00

readme.md

path-dirname Build Status

Node.js path.dirname() ponyfill

This was needed in order to expose path.posix.dirname() on Node.js v0.10

Install

$ npm install --save path-dirname

Usage

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.

pathDirname(path)

pathDirname.posix(path)

POSIX specific version.

pathDirname.win32(path)

Windows specific version.

License

MIT