Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

path-dirname

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Issues
File Explorer

Advanced tools

path-dirname

Node.js path.dirname() ponyfill

    1.0.2latest

Version published
Maintainers
1
Weekly downloads
12,303,234
increased by0.21%

Weekly downloads

Readme

Source

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

Keywords

FAQs

What is path-dirname?

Node.js path.dirname() ponyfill

Is path-dirname popular?

The npm package path-dirname receives a total of 10,662,011 weekly downloads. As such, path-dirname popularity was classified as popular.

Is path-dirname well maintained?

We found that path-dirname demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 18 Oct 2016

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc