(index)
| 20 | } |
| 21 | |
| 22 | function _parseStackIndex(index) { |
| 23 | if (_isStackIndex(index)) { |
| 24 | if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd |
| 25 | return (/^-/).test(index) ? Number(index) - 1 : Number(index); |
| 26 | } |
| 27 | common.error(index + ': directory stack index out of range'); |
| 28 | } else { |
| 29 | common.error(index + ': invalid number'); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | function _actualDirStack() { |
| 34 | return [process.cwd()].concat(_dirStack); |
no test coverage detected
searching dependent graphs…