util.chdir
An implementation of pushd/popd for JavaScript.
Last updated 7 months ago by jmquigley .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install util.chdir 
SYNC missed versions from official npm registry.

util.chdir

An implementation of pushd/popd for JavaScript

build analysis code style: prettier testing NPM coverage

This mimics the bash pushd/popd functions. When changing a directory the pushd will place the current directory onto a stack and then change to the requested directory. When popd is called, then the previous directory is restored from the top of that stack. This is a way to simplify backtracking through a directory hierarchy.

Installation

This module uses yarn to manage dependencies and run scripts for development.

To install as a global package and cli:

$ yarn global add util.chdir

To install as a development dependency with cli:

$ yarn add --dev util.chdir

To build the app and run all tests:

$ yarn run all

Usage

const chdir = require('util.chdir');

// assume directory is /home
chdir.pushd('/tmp');
// pushes /home on the stack and changes to /tmp

chdir.popd();
// pops the top of the stack and switches to that directory

Current Tags

  • 0.0.41                                ...           latest (7 months ago)

41 Versions

  • 0.0.41                                ...           7 months ago
  • 0.0.40                                ...           7 months ago
  • 0.0.39                                ...           7 months ago
  • 0.0.38                                ...           8 months ago
  • 0.0.37                                ...           9 months ago
  • 0.0.36                                ...           9 months ago
  • 0.0.35                                ...           a year ago
  • 0.0.34                                ...           a year ago
  • 0.0.33                                ...           2 years ago
  • 0.0.32                                ...           2 years ago
  • 0.0.31                                ...           2 years ago
  • 0.0.30                                ...           2 years ago
  • 0.0.29                                ...           2 years ago
  • 0.0.28                                ...           2 years ago
  • 0.0.27                                ...           2 years ago
  • 0.0.26                                ...           2 years ago
  • 0.0.25                                ...           2 years ago
  • 0.0.24                                ...           2 years ago
  • 0.0.23                                ...           3 years ago
  • 0.0.22                                ...           3 years ago
  • 0.0.21                                ...           3 years ago
  • 0.0.20                                ...           3 years ago
  • 0.0.19                                ...           3 years ago
  • 0.0.18                                ...           3 years ago
  • 0.0.17                                ...           3 years ago
  • 0.0.16                                ...           3 years ago
  • 0.0.15                                ...           3 years ago
  • 0.0.14                                ...           3 years ago
  • 0.0.13                                ...           3 years ago
  • 0.0.12                                ...           3 years ago
  • 0.0.11                                ...           3 years ago
  • 0.0.10                                ...           3 years ago
  • 0.0.9                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 43
Last Day 0
Last Week 42
Last Month 1
Dependencies (1)
Dev Dependencies (18)
Dependents (3)

Copyright 2014 - 2016 © taobao.org |