Comparing version 1.1.0 to 1.1.1
@@ -10,4 +10,14 @@ 'use strict' | ||
* @example | ||
* > walkBack = require('walk-back') | ||
* const walkBack = require('walk-back') | ||
*/ | ||
module.exports = walkBack | ||
/** | ||
* Returns an absolute file path (if found) else `null`. | ||
* | ||
* @param {string} - the directory to start in | ||
* @param {string} - the path we're looking for | ||
* @return {string} | ||
* @alias module:walk-back | ||
* @example | ||
* > walkBack(process.cwd(), 'package.json') | ||
@@ -28,12 +38,2 @@ * '/Users/lloyd/Documents/75lb/walk-back/package.json' | ||
*/ | ||
module.exports = walkBack | ||
/** | ||
* Returns an absolute file path (if found) else `null`. | ||
* | ||
* @param {string} - the directory to start in | ||
* @param {string} - the path we're looking for | ||
* @return {string} | ||
* @alias module:walk-back | ||
*/ | ||
function walkBack (startAt, lookingFor) { | ||
@@ -40,0 +40,0 @@ var dirs = path.resolve(startAt).split(path.sep) |
{ | ||
"name": "walk-back", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Walk up the directory tree until the specified path is found.", | ||
@@ -16,3 +16,4 @@ "repository": "https://github.com/75lb/walk-back.git", | ||
"find", | ||
"file" | ||
"file", | ||
"system" | ||
], | ||
@@ -28,4 +29,4 @@ "engines": { | ||
"jsdoc-to-markdown": "^1.3.3", | ||
"tape": "^4.2.0" | ||
"tape": "^4.4.0" | ||
} | ||
} |
[![view on npm](http://img.shields.io/npm/v/walk-back.svg)](https://www.npmjs.org/package/walk-back) | ||
[![npm module downloads per month](http://img.shields.io/npm/dm/walk-back.svg)](https://www.npmjs.org/package/walk-back) | ||
[![npm module downloads](http://img.shields.io/npm/dt/walk-back.svg)](https://www.npmjs.org/package/walk-back) | ||
[![Build Status](https://travis-ci.org/75lb/walk-back.svg?branch=master)](https://travis-ci.org/75lb/walk-back) | ||
@@ -13,4 +13,17 @@ [![Dependency Status](https://david-dm.org/75lb/walk-back.svg)](https://david-dm.org/75lb/walk-back) | ||
```js | ||
> walkBack = require('walk-back') | ||
const walkBack = require('walk-back') | ||
``` | ||
<a name="exp_module_walk-back--walkBack"></a> | ||
### walkBack(startAt, lookingFor) ⇒ <code>string</code> ⏏ | ||
Returns an absolute file path (if found) else `null`. | ||
**Kind**: Exported function | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| startAt | <code>string</code> | the directory to start in | | ||
| lookingFor | <code>string</code> | the path we're looking for | | ||
**Example** | ||
```js | ||
> walkBack(process.cwd(), 'package.json') | ||
@@ -31,16 +44,5 @@ '/Users/lloyd/Documents/75lb/walk-back/package.json' | ||
``` | ||
<a name="exp_module_walk-back--walkBack"></a> | ||
### walkBack(startAt, lookingFor) ⇒ <code>string</code> ⏏ | ||
Returns an absolute file path (if found) else `null`. | ||
**Kind**: Exported function | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| startAt | <code>string</code> | the directory to start in | | ||
| lookingFor | <code>string</code> | the path we're looking for | | ||
* * * | ||
© 2015 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown). | ||
© 2015-16 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6374
47