Nondeterministic Polynomial Munchies

    prepend-file
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    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.

    Install

    npm i prepend-file

    DownloadsWeekly Downloads

    24,568

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    5.79 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar