Provides a minimal Storage interface and a local filesystem implementation for Node.js, enabling dynamic storage switching. Version 0.7.2 is stable, with slow release cadence (last update 2022). Key differentiator: abstract base class that third-party packages (AWS S3, Azure Blob, GCP) implement, making it easy to swap storage backends without changing application code. Ships TypeScript types for type safety.
npm install storage-coreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to instantiate LocalStorage, write, read, delete, and check file existence.
Update your implementation to match the new interface: `read()` now returns Buffer | undefined instead of string.
Use the async `exists()` method instead.
Use path.resolve() or path.join with process.cwd() to resolve an absolute path.
Add a null-check: `const data = await storage.read('file'); if (!data) throw new Error('Not found');`Run `npm install storage-core`. If using TypeScript, ensure `moduleResolution` is set to `node16` or `bundler`.
Upgrade to >=0.7.0 or check the API: earlier versions used `upload()` and `download()`.
Create the directory manually or use `mkdirSync` with `recursive: true` before constructing LocalStorage.
No dependency data recorded yet.