prepend-file
Prepend data to a file, creating it if it doesn't exist.
Last updated 2 months ago by hemanth .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install prepend-file 
SYNC missed versions from official npm registry.

prepend-file Build Status Code Coverage

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.

Current Tags

  • 2.0.2                                ...           latest (2 months ago)

13 Versions

  • 2.0.2                                ...           2 months ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           6 years ago
  • 1.3.1                                ...           10 years ago
  • 1.3.0                                ...           12 years ago
  • 1.2.1                                ...           12 years ago
  • 1.2.0                                ...           12 years ago
  • 1.1.0                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
  • 0.2.0                                ...           12 years ago
  • 0.1.2                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Downloads
Total 37
Today 0
This Week 4
This Month 22
Last Day 0
Last Week 0
Last Month 9
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE