An open API service indexing awesome lists of open source software.

https://github.com/ruslantolstov/azure-connection-parser

Azure connection string parser
https://github.com/ruslantolstov/azure-connection-parser

azure cosmosdb eventhub parser servicebus

Last synced: about 2 months ago
JSON representation

Azure connection string parser

Awesome Lists containing this project

README

          

# azure-connection-parser

## What is it
Simple module to parse Azure Cosmos, SB, EH `Connection String` into set of parameters.

### For example:
```js
`Endpoint=sb://foo.servicebus.windows.net/;SharedAccessKeyName=ReadSharedAccessKey;SharedAccessKey=xmbhJlj7/W8t/avPwTev4JVzF4tdfhORdsJy8NcxtmA=`
```

## Install
```
# npm install azure-connection-parser
```

## Usage

### Parse params from ServiceBus Connection String:
```js
const azureConnectionParser = require('azure-connection-parser')

const params = azureConnectionParser('Endpoint=sb://foo.servicebus.windows.net/;SharedAccessKeyName=ReadSharedAccessKey;SharedAccessKey=xmbhJlj7/W8t/avPwTev4JVzF4tdfhORdsJy8NcxtmA=')
console.log(params)
```
will output:
```
{
Endpoint: 'sb://foo.servicebus.windows.net/',
SharedAccessKeyName: 'ReadSharedAccessKey',
SharedAccessKey: 'xmbhJlj7/W8t/avPwTev4JVzF4tdfhORdsJy8NcxtmA='
}
```