package
Prepend data to a file, creating it if it doesn't exist.
npm install prepend-fileGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 5 packages.
55.5 kB
Includes dependencies.
Prepend data to a file, creating it if it doesn't exist.
npm install prepend-fileconst prependFile = require('prepend-file');
(async () => {
await prependFile('message.txt', 'some data');
});Type: string
The file to prepend the data to.
Type: string | Buffer
The data to prepend.
hemanth
hemanth.hm@gmail.com