Skip to content

doowb/dirname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dirname NPM version

Bind a directory to path.join

npm i dirname --save

Usage

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

Methods

dirname

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

dirname() returns a method that is bound to the path provided.

Use this bound in places that you would normally use path.join() to start from the provided path.

Authors

Jon Schlinkert

Brian Woodward

License

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


About

Shortcut for making sure you're bound to the directory you want.

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  
  •  

Packages

No packages published