You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Takes a path string or array of path strings and a callback function. Checks if the given paths are empty and passes any `error` and an `isEmpty` flag to the callback. Optionally takes a filter function before the callback to filter out files that cause false positives.
40
+
Takes a path string or array of path strings and returns a Promise. Checks if the given paths are empty and resolves with a boolean indicating if the paths are empty directories. Optionally takes a filter function to filter out files that cause false positives. Also, can take a node-style callback function instead of returning a Promise.
@@ -60,6 +66,20 @@ var isEmpty = emptyDir.sync('./test/empty', filter);
60
66
console.log('Directory is empty:', isEmpty);
61
67
```
62
68
69
+
#### Promises
70
+
71
+
Global promises are required for this module. If you are using a platform that doesn't have promise support, you'll need to polyfill Promise on the global.
0 commit comments