Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

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
13,780,609
decreased by-0.56%

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 11,255,821 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. It has 1 open source maintainer collaborating on the project.

Last updated on 18 Oct 2016
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