Comparing version 4.0.1 to 4.1.0
{ | ||
"name": "klaw", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "File system walker with Readable stream interface.", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -44,3 +44,3 @@ Node.js - klaw | ||
- `directory`: The directory to recursively walk. Type `string`. | ||
- `directory`: The directory to recursively walk. Type `string` or file `URL`. | ||
- `options`: [Readable stream options](https://nodejs.org/api/stream.html#stream_new_stream_readable_options) and | ||
@@ -47,0 +47,0 @@ the following: |
@@ -5,2 +5,3 @@ const { strictEqual } = require('assert') | ||
const { Readable } = require('stream') | ||
const { fileURLToPath } = require('url') | ||
@@ -13,3 +14,6 @@ class Walker extends Readable { | ||
constructor (dir, options) { | ||
strictEqual(typeof dir, 'string', '`dir` parameter should be of type string. Got type: ' + typeof dir) | ||
if (dir instanceof URL) { | ||
dir = fileURLToPath(dir) | ||
} | ||
strictEqual(typeof dir, 'string', '`dir` parameter should be of type string or file URL. Got type: ' + typeof dir) | ||
options = { | ||
@@ -16,0 +20,0 @@ queueMethod: 'shift', |
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
11838
65