Registry / storage / azure-storage-simple

azure-storage-simple

JSON →
library1.0.0jsnpmunverified

Simplified Promise-based interface for Azure Storage Services (Tables, Queues, Blob) for Node.js. Version 1.0.0 is the latest stable release. Wraps the official azure-storage SDK with a higher-level API that auto-creates resources, uses promises/async-await, and provides simplified table/queue/blob operations. Distinct from the official azure-storage SDK by offering a more concise interface focused on common patterns. Not actively maintained; last release was in 2016. Limited to Node.js (not browser-friendly).

npm install azure-storage-simple
INSTALL
IMPORT
SIG · AZURE-STORAGE-SIMP
A
azure-storage-simple
storagejavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import storage from 'azure-storage-simple';
import { storage } from 'azure-storage-simple';
The module exports a function via default export. Named export does not exist.
azure-storage module
import azure from 'azure-storage-simple/azure-storage';
import { azure } from 'azure-storage-simple/azure-storage';
Access the underlying azure-storage module through this subpath. It is a default export.
storage via require
const storage = require('azure-storage-simple')(account, key);
const storage = require('azure-storage-simple'); storage();
The module exports a factory function; call it immediately with optional arguments. Do not separate require and invocation.

Initializes storage with environment variables, creates a queue, adds and retrieves a message.

const storage = require('azure-storage-simple')(process.env.AZURE_STORAGE_ACCOUNT, process.env.AZURE_STORAGE_ACCESS_KEY); const queue = storage.queue('myqueue'); async function main() { await queue.add({ message: 'Hello' }); const msg = await queue.one(); console.log(msg.value); // { message: 'Hello' } await queue.done(msg); } main().catch(console.error);
Debug
Known issues
gotchaWrite operations (tbl.write) use insertOrMerge semantics; to delete a property, set it to null explicitly.
fix
Set properties to null to remove them when writing a record.
affects: >=1.0.0
gotchaThe module auto-creates queues/tables on first use via createIfNotExist; this may incur extra latency and cost.
fix
Pre-create resources if you want to avoid the checks or use separate provisioning.
affects: >=1.0.0
gotchaReturned records from read/query are wrapped objects; extract the raw value using .value property.
fix
Always use record.value to get the unwrapped data.
affects: >=1.0.0
deprecatedPackage is no longer actively maintained; last release 2016. Vulnerabilities in dependency 'azure-storage' may not be patched.
fix
Consider migrating to '@azure/storage-blob', '@azure/storage-queue', '@azure/cosmos' (for tables) or the modern Azure SDK for JavaScript.
affects: >=1.0.0
gotchaQuery results with more than 1000 items require pagination via .next() method; results loop may be confusing.
fix
Check records.next existence and call await records.next() to fetch next page.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: storage is not a function
Calling require('azure-storage-simple') without immediate invocation or using default import incorrectly.
fix
Use: const storage = require('azure-storage-simple')(account, key);
Cannot find module 'azure-storage-simple/azure-storage'
Path is case-sensitive or incorrect; must be exactly 'azure-storage-simple/azure-storage'.
fix
Use: const azure = require('azure-storage-simple/azure-storage');
Error: The value for one of the XML nodes is not in the correct format.
Often due to malformed connection string or missing environment variables.
fix
Ensure AZURE_STORAGE_CONNECTION_STRING or account/key pair is correctly set and valid.
TypeError: Cannot read property 'value' of undefined
Message not found or queue empty; .one() returns undefined if no message.
fix
Check if msg is defined before accessing .value.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
azure-storagerequiredUnderlying Azure Storage SDK for all API calls
Agent activity
54 hits · last 30 days
node
46
OpenAI (training)
1
Resources
azure-storage-simple — npm install azure-storage-simple · libregistry