0.0.43 • Published 6 years ago

util.chdir v0.0.43

Weekly downloads
107
License
MIT
Repository
github
Last release
6 years ago

util.chdir

An implementation of pushd/popd for JavaScript

build analysis code style: prettier testing NPM

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
0.0.43

6 years ago

0.0.42

6 years ago

0.0.41

6 years ago

0.0.40

6 years ago

0.0.39

6 years ago

0.0.38

6 years ago

0.0.37

6 years ago

0.0.36

6 years ago

0.0.35

7 years ago

0.0.34

7 years ago

0.0.33

8 years ago

0.0.32

8 years ago

0.0.31

8 years ago

0.0.30

8 years ago

0.0.29

8 years ago

0.0.28

8 years ago

0.0.27

8 years ago

0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

8 years ago

0.0.23

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago