Package Exports
- prepend-file
- prepend-file/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (prepend-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
prepend-file

Prepend data to a file, creating it if it doesn't exist.
Install
npm install prepend-file
Usage
const prependFile = require('prepend-file');
(async () => {
await prependFile('message.txt', 'some data');
});
API
prependFile(filename, data)
prependFile.sync(filename, data)
filename
Type: string
The file to prepend the data
to.
data
Type: string | Buffer
The data to prepend.