1.3.1 • Published 4 years ago

save-buffer v1.3.1

Weekly downloads
29
License
MIT
Repository
github
Last release
4 years ago

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

1.3.1

4 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago