bunnycdn-storage

a small wrapper for the bunnycdn storage api
Building
install dependencies with npm/yarn and then run npm build
or yarn build
Usage
const BunnyStorage = require('bunnycdn-storage').default;
const bunnyStorage = new BunnyStorage('API-KEY', 'STORAGE-ZONE-NAME');
const bunnyStorageRegion = new BunnyStorage('API-KEY', 'STORAGE-ZONE-NAME', 'ny');
const files = await bunnyStorage.list();
const filesInDir = await bunnyStorage.list('/images');
bunnyStorage.upload('/tmp/bunny.jpg');
bunnyStorage.upload(fs.readFileSync('/tmp/bunny.jpg'), 'bunny.jpg')
bunnyStorage.download('bunny.jpg');
bunnyStorage.download('bunny.jpg', 'arraybuffer');
bunnyStorage.download('bunny.jpg', 'stream');
bunnyStorage.delete('bunny.jpg');
Disclaimer
Note that this project and the maintainer(s) of this repository are in no way, shape or form affiliated with BunnyCDN.