Comparing version 0.1.0 to 1.0.0
{ | ||
"name": "rrdir", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "The fastest recursive readdir in town", | ||
@@ -5,0 +5,0 @@ "author": "silverwind <me@silverwind.io>", |
@@ -10,9 +10,9 @@ # rrdir | ||
|---------------------|-----------------|--------------|---------| | ||
| rrdir sync | Node.js 10.10.0 | Linux 4.18.4 | 0.289s | | ||
| rrdir sync | Node.js 8.11.4 | Linux 4.18.4 | 0.383s | | ||
| rrdir async | Node.js 10.10.0 | Linux 4.18.4 | 0.400s | | ||
| node-walkdir sync | Node.js 8.11.4 | Linux 4.18.4 | 0.416s | | ||
| **rrdir** sync | Node.js 10.10.0 | Linux 4.18.4 | 0.289s | | ||
| **rrdir** async | Node.js 10.10.0 | Linux 4.18.4 | 0.400s | | ||
| node-walkdir sync | Node.js 10.10.0 | Linux 4.18.4 | 0.423s | | ||
| rrdir async | Node.js 8.11.4 | Linux 4.18.4 | 1.148s | | ||
| node-walkdir async | Node.js 10.10.0 | Linux 4.18.4 | 1.557s | | ||
| **rrdir** sync | Node.js 8.11.4 | Linux 4.18.4 | 0.383s | | ||
| node-walkdir sync | Node.js 8.11.4 | Linux 4.18.4 | 0.416s | | ||
| **rrdir** async | Node.js 8.11.4 | Linux 4.18.4 | 1.148s | | ||
| node-walkdir async | Node.js 8.11.4 | Linux 4.18.4 | 1.813s | | ||
@@ -40,18 +40,20 @@ | ||
## `rrdir(dir, [options])` | ||
## `rrdir.sync(dir, [options])` | ||
### `rrdir(dir, [options])` | ||
### `rrdir.sync(dir, [options])` | ||
Recursively searches a directory for `entries` contained within. `rrdir` returns a Promise while `rrdir.sync` synchronously returns `entries` with is an array of `entry`. Both functions will throw/reject on unexpected errors, but can optionally ignore errors encountered on individual files. | ||
Recursively searches a directory for `entries` contained within. Both functions will reject or throw on unexpected errors, but can optionally ignore errors encountered on individual files. | ||
### `entry` | ||
Returns: `entries`, and Array of `entry`. | ||
- entry.path *string*: The path to the entry, will be relative if `dir` is given relative. | ||
- entry.directory *boolean*: Boolean indicating whether the entry is a directory. | ||
- entry.symlink *boolean*: Boolean indicating whether the entry is a symbolic link. | ||
#### `entry` | ||
### Options | ||
- `entry.path` *string*: The path to the entry, will be relative if `dir` is given relative. | ||
- `entry.directory` *boolean*: Boolean indicating whether the entry is a directory. | ||
- `entry.symlink` *boolean*: Boolean indicating whether the entry is a symbolic link. | ||
- options.strict *boolean*: Whether to throw errors when reading fails. Default: `false`. | ||
- options.encoding *string*: The encoding to use in the entry's path. Default: `'utf8'`. | ||
#### Options | ||
- `options.strict` *boolean*: Whether to throw errors when reading fails. Default: `false`. | ||
- `options.encoding` *string*: The encoding to use in the entry's path. Default: `'utf8'`. | ||
© [silverwind](https://github.com/silverwind), distributed under BSD licence |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
58
6907