@gesslar/toolkit 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # npm i @gesslar/toolkit
1
+ # `npm i @gesslar/toolkit`
2
2
 
3
3
  This package is intended to be a collection of useful utilities for any
4
4
  project's consumption. Not the kind that gives you bleeding, hacking coughs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gesslar/toolkit",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Get in, bitches, we're going toolkitting.",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -209,18 +209,17 @@ export default class DirectoryObject extends FS {
209
209
  /**
210
210
  * Lists the contents of a directory.
211
211
  *
212
- * @param {DirectoryObject} directory - The directory to list.
213
212
  * @returns {Promise<{files: Array<FileObject>, directories: Array<DirectoryObject>}>} The files and directories in the directory.
214
213
  */
215
- async read(directory) {
214
+ async read() {
216
215
  const found = await fs.readdir(
217
- new URL(directory.uri),
216
+ new URL(this.uri),
218
217
  {withFileTypes: true}
219
218
  )
220
219
 
221
220
  const results = await Promise.all(
222
221
  found.map(async dirent => {
223
- const fullPath = path.join(directory.path, dirent.name)
222
+ const fullPath = path.join(this.path, dirent.name)
224
223
  const stat = await fs.stat(fullPath)
225
224
 
226
225
  return {dirent, stat, fullPath}