npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

azure-table-promise

v1.2.0

Published

Promisified functionality for Azure Storage Tables.

Downloads

41

Readme

azure-table-promise

Since Midrosoft is dropping support for library azure-storage, they've been slow to provide an updated, promise-based library for tables. With Azure Storage Tables being widely used, a promise-wrapper seemed like a good idea to reduce code redundancy between projects. We were wrapping methods left and right, project by project, and sometimes not doing a great job of being consistent and re-using code. This module allows users to consistently access the TableService API without further dependencies beyond just azure-storage.

Usage

  1. Install from NPM: npm install --save azure-table-promise
  2. Import it into your project using require
  3. Profit

API

class PromiseTableService

Wraps class TableService and provides the exact same API with every callback-style function wrapped in a promise.

See the docs for azure-storage for complete details of each function and its arguments. Always omit the callback, as the promise automatically will either resolve with the response of the callback, or reject with the callback error.

function PromiseTableService~queryEntitiesAll<T>(table: string, tableQuery: TableQuery, options?: TableService.TableEntityRequestOptions): Promise<TableService.QueryEntitiesResult<T>>

Adds support for a fetch-all query by paging through results of method queryEntities.

function entityResolver

Method which may be used to resolve table entities from typed EDM properties to plain JavaScript objects.

function createPromiseTableService

Method which wraps createTableService for API completeness.

function createTableService (alias of createPromiseTableService)

See function createPromiseTableService.

Property azure

Exports the azure namespace for convenience, which includes all untouched functions, classes, and constants from library azure-storage.

Option extensions

Adds option resolveEntity: boolean to options for retrieveEntity, queryEntities, and queryEntitiesAll methods; automatically uses internal entityResolver function when set to true.

Tests and Code Coverage

This library features 100% code coverage, but this is more a feature of the dynamic instantiation of functions than it is an indicator of test completeness. The tests rely on Azurite V2 for validating that the promises work; once Azurite V3 supports Storage Tables it is expected that Microsoft will have released a promise-based library, which in turn removes the need for this library.

Contributors

  • Aaron Huggins