Del is a JavaScript package for deleting files and directories through glob patterns with both asynchronous and synchronous APIs. It supports multiple targets in a single operation and can exclude files or folders through negative glob patterns. The package protects the current working directory and parent locations from deletion unless force mode is explicitly enabled. A dry-run option reports what would be removed without changing the file system. Dotfile matching and other glob behavior can be customized through supported options. Deleted paths are returned to the caller, making it easy to log or inspect the result. It is useful for build scripts, cleanup tasks, generated assets, and other automated file-management workflows.
Features
- Asynchronous and synchronous deletion APIs
- Multiple file and directory targets
- Glob and negative-glob support
- Working-directory deletion protection
- Dry-run deletion previews
- Customizable dotfile and glob behavior