save-buffer

1.3.1 • Public • Published

save-buffer

Build Status

Turn a buffer into a file

Install

npm install --save save-buffer

Usage

const imageDownload = require('image-download');
const saveBuffer = require('save-buffer');
 
(async () => {
  const buffer = await imageDownload('https://www.fillmurray.com/g/200/300');
  const result = await saveBuffer(buffer, './new/file/path.jpg');
})();

API

saveBuffer(buffer, filePath)

Returns a Promise. The returned value is undefined or an error message.

buffer

Type: Buffer

filePath

Type: string

Related

License

MIT © Patrick Tone

/save-buffer/

    Package Sidebar

    Install

    npm i save-buffer

    Weekly Downloads

    12

    Version

    1.3.1

    License

    MIT

    Unpacked Size

    3.1 kB

    Total Files

    4

    Last publish

    Collaborators

    • the-pat