🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@mojojs/path

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mojojs/path - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+1
-1
package.json
{
"name": "@mojojs/path",
"version": "1.0.0",
"version": "1.0.1",
"description": "File system paths made fun",

@@ -5,0 +5,0 @@ "keywords": [

@@ -100,2 +100,7 @@ <p align="center">

const readable = new Path('test.txt').createReadStream({encoding: 'utf8'});
// Read lines from file
for await (const line of new Path('test.txt').lines({encoding: 'UTF-8'})) {
console.log(line);
}
```

@@ -156,2 +161,12 @@

new Path('test').rmSync({recursive: true});
// List files in directory
for await (const file of new Path('test').list()) {
console.log(file.toString());
}
// List files recursively
for await (const file of new Path('test').list({recursive: true})) {
console.log(file.toString());
}
```

@@ -177,2 +192,14 @@

```js
// Check is file is a directory (async)
const stat = await new Path('test').stat();
const isDirectory = stat.isDirectory();
const lstat = await new Path('test').lstat();
const isDirectory = lstat.isDirectory();
// Check is file is a directory (sync)
const isDirectory = new Path('test').statSync().isDirectory();
const isDirectory = new Path('test').lstatSync().isDirectory();
```
## Installation

@@ -179,0 +206,0 @@