
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
files-generator
Advanced tools
A tool to generate bunch of files, using different kinds of content definition and sources
A tool to generate bunch of files, using different kinds of content definition and sources
npm i files-generator
const generate = require('files-generator')();
generate({
'path/to/file': 'file content',
'path/to/file2': generate.use('other file content')
});
generate.on('finish', event => {
console.log(event.success); // ["path/to/file", "path/to/file2"]
})
Create a generate function using the defined options
Parameters
options object? An object containing the generate function options. (optional, default {})
options.eventData string Each time that generate will emit an event, the event handler will receive as first argument an event object with a data key containing this eventData option. (optional, default undefined)options.writeFile function? The function which will be used to create files and/or directories. (optional, default defaultWriteFile)options.encoding string The encoding to use when writing files. (optional, default 'utf-8')options.cwd string The cwd used if you try to generate some relative paths. Must be an absolute path. (optional, default process.cwd())Returns generate A generate function which uses by default the options provided as generateGenerate parameters
Generate files from different kinds of inputs
Parameters
generateConfig GenerateConfig The generate config contains all the file paths to generate.options object This options object can be used to overide some options defined in the generateGenerate function. (optional, default {})
options.eventData (optional, default _eventData)options.writeFile (optional, default _writeFile)options.encoding (optional, default _encoding)options.cwd (optional, default _cwd)Returns undefined
files-generator is released under MIT. Copyright (c) 2017-present Alexis Tessier
FAQs
A tool to generate bunch of files, using different kinds of content definition and sources
We found that files-generator 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.