
Security News
Python Adopts Standard Lock File Format for Reproducible Installs
Python has adopted a standardized lock file format to improve reproducibility, security, and tool interoperability across the packaging ecosystem.
@retro_ig/file-execute
Advanced tools
Tired of using require? I got you! Use this package to easily read files and transfer data between them
npm i @retro_ig/file-execute
const { FileExecute } = require('@retro_ig/file-execute')
const fileExecute = new FileExecute('path/to/your/folder') //path to your folder with all your js files
async function exampleFunction() {
await fileExecute.execute('testFile')
}
exampleFunction()
In testFile.js
module.exports = {
name: 'testFile', //we will use the name to call the execute function in the main file
async execute() {
try {
console.log('Hello World!')
} catch (error) {
console.log(error)
}
}
}
Now file Execute package doesn't just run files. That's too borning. It has its own module for global data. We will go back to the first Example and add the module there!
const { FileExecute, dataTransferer } = require('@retro_ig/file-execute')
const fileExecute = new FileExecute('path/to/your/folder') //path to your folder with all your js files
async function exampleFunction() {
await dataTransferer.setData({
foo: 'bar' // The data must be an object!
})
await fileExecute.execute('testFile')
}
exampleFunction()
In testFile.js
const { dataTransferer } = require('@retro_ig/file-execute')
module.exports = {
name: 'testFile', //we will use the name to call the execute function in the main file
async execute() {
try {
const transferedData = await dataTransferer.getData()
console.log(transferedData.foo) //expected output: "bar"
} catch (error) {
console.log(error)
}
}
}
Open an issue at our github page!
FAQs
A module to easily get and execute files in a folder
We found that @retro_ig/file-execute 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
Python has adopted a standardized lock file format to improve reproducibility, security, and tool interoperability across the packaging ecosystem.
Security News
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.