Socket
Book a DemoInstallSign in
Socket

dirname

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dirname

Bind a directory to path.join

Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
20
11.11%
Maintainers
1
Weekly downloads
 
Created
Source

dirname NPM version

{%= description %}

npm i {%= name %} --save

Usage

var dirname = require('dirname');
var utils = dirname('./utils');
var foo = require(utils.dir('foo'));
var bar = require(utils.dir('bar'));

Methods

dirname

By default the dirname() method expects a string. The string is the path to the directory to bind to.

dirname() returns an object with one method called dir(). dir() is bound to the path provided earlier.

Use dir() in places that you would normally use path.join() but it will start from the provided path

Authors

Jon Schlinkert

Brian Woodward

License

Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors. Released under the MIT license

Keywords

assemble

FAQs

Package last updated on 06 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts