
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
A library that facilitates the use of many things that Node.js includes and including new functions and methods. (And recycle libraries)
npm install udirp
import dirp from "udirp";
//Or you can also get the properties independently.
const dirp = require("udirp");
//Or you can also get the properties independently.
/*
Suppose this is my folder where my project is:
- node_modules
- src
+ index.ts
- schools
- json
+ students.json
+ schools.json
And I want to get my JSON where is the information of my students (students.json). Im in index.ts and the content of the json is
{
"luis":{
"math":10,
"science":8
},
"tom":{
"math":7,
"science":9
}
}
*/
//The first parameter will be the name of our file to obtain information, in this case it will be "students". Then open options in the form of an object, these options will be, the file extension, if it is outside the directory, and if it is inside other directories. Finally, this method expects a promise, so we will use .then to obtain the read data.
import { file } from "udirp";
file
.getContent("students", { extension: "json", directory: "src/schools/json" })
.then((response) => {
response.data;
//This return <Buffer 7b 0d 0a 20 20 20 20 22 6c 75 69 73 22 3a 7b 0d 0a 20 20 20 20 20 20 20 20 22 6d 61 74 68 22 3a 31 30 2c 0d 0a 20 20 20 20 20 20 20 20 22 73 63 69 65 ... 77 more bytes>
response.data.toString();
/*This return {
"luis":{
"math":10,
"science":8
},
"tom":{
"math":7,
"science":9
}
}
*/
});
import { ram } from "udirp";
ram.get().then((res) => {
console.log(`
It is in use ${res.ram_usage_mb} MB
There is free ${res.free_ram_mb} MB
There are in total ${res.total_ram_mb} MB
`);
});
/*
This return
It is in use 7029.5 MB
There is free 9286.88 MB
There are in total 16316.38 MB
*/
import { computer, utils } from "./lib/index";
computer.uptime().then((res) => {
utils.getTime(res.data).then((res) => {
console.log(res.date);
});
});
//This return 7 Hours, 23 Minutes And 19 Seconds
| Property | Function | Result in object |
|---|---|---|
| getAllInfo | { } | |
| name_gpu | ||
| vram | ||
| temperature_gpu | ||
| total_memory_mb_gpu | ||
| free_memory_mb_gpu | ||
| use_memory_mb_gpu | ||
| system_info | ||
| cpu_model | ||
| cores | ||
| cpu_usage | ||
| ram_usage | ||
| total_ram | ||
| free_ram_mb | ||
| free_ram_porcent | ||
| ip | ||
| max_temperature_cpu | ||
| uptime | ||
| voltage | ||
| platform | ||
| max_speed_cpu | ||
| min_speed_cpu | ||
| speed_cpu | ||
| temperature_cpu | ||
| getIp | ip:string | |
| uptime | uptime:number |
| Property | Function | Result in object |
|---|---|---|
| get | { } | |
| free_ram_mb | ||
| free_ram_porcent | ||
| total_ram_mb |
| Property | Function | Result in object |
|---|---|---|
| get | { } | |
| name | ||
| use_memory_md | ||
| free_memory_md | ||
| total_memory_md | ||
| temperature | ||
| vram |
| Property | Function | Result in object |
|---|---|---|
| get | { } | |
| voltage | ||
| cpu_model | ||
| cpu_usage | ||
| max_temperature | ||
| max_speed | ||
| min_speed | ||
| speed | ||
| temperature |
| Property | Function | Result in object |
|---|---|---|
| getTime | { } | |
| data |
| Property | Method | Principal parameter and type | Options parameters and type | Promise ? | Returns ? |
|---|---|---|---|---|---|
| getContent | name_file:string | directory: string; thisDirectory: boolean; extension: string | Yes | object: data | |
| create | name_file:string | filename_extension: string; content: string; directory: string; thisDirectory: boolean; | No | Nothing | |
| delete | name_file: string, | directory: string; thisDirectory: boolean; | No | Nothing | |
| clone | name_file: string | directory: string; filename_extension: string; thisDirectory: boolean; | No | Nothing | |
| getInfo | name_file:string | extension: string, directory: string, thisDirectory: boolean | Yes | object:content, extension, name and directory |
| Property | Method | Principal parameter and type | Options parameters and type | Promise ? | Returns ? |
|---|---|---|---|---|---|
| create | name_folder: string | Dont have | No | Nothing | |
| delete | name_folder: string | Dont have | No | Nothing |
FAQs
A library that facilitates the use of many things that Node.js includes and including new functions and methods. (And recycle libraries)
We found that udirp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.