Socket
Socket
Sign inDemoInstall

@danmasta/walk

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@danmasta/walk - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

8

lib/walk.js

@@ -330,2 +330,10 @@ const Readable = require('stream').Readable;

then (...args) {
return this.promise().then(...args);
}
catch (fn) {
return this.promise().catch(fn);
}
static factory () {

@@ -332,0 +340,0 @@ let Fn = this;

2

package.json
{
"name": "@danmasta/walk",
"version": "4.0.1",
"version": "4.1.0",
"author": "Daniel Smith <dannmasta@gmail.com>",

@@ -5,0 +5,0 @@ "description": "Directory and file walking utility for node apps",

@@ -29,3 +29,3 @@ # Walk

```
*By default walk returns a readable stream interface. You can use the methods: `map()`, `each()`, and `promise()` to iterate file objects and return promises*
*By default walk returns a readable stream interface. You can use the methods: `map()`, `each()`, `promise()`, `then()`, and `catch()` to iterate file objects and return promises*

@@ -49,2 +49,4 @@ ### Options

`promise` | Returns a promise that resolves with an `array` of file objects
`then(fn)` | Run a callback when the promise is fulfilled. Returns a promise that resolves with an `array` of file objects
`catch(fn)` | Run a callback when the promise is rejected. Returns a promise that resolves with an `array` of file objects

@@ -110,3 +112,3 @@ ### File Objects

```js
walk('./', { src: '**/*.!(json)' }).promise().then(res => {
walk('./', { src: '**/*.!(json)' }).then(res => {
console.log('files:', res);

@@ -117,3 +119,3 @@ });

```js
walk('./config', { src: '**/*.json' }).promise().then(res => {
walk('./config', { src: '**/*.json' }).then(res => {
console.log('files:', res);

@@ -124,3 +126,3 @@ });

```js
walk('/usr/local').promise().then(res => {
walk('/usr/local').then(res => {
console.log('files:', res);

@@ -127,0 +129,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc