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
- Host: GitHub
- URL: https://github.com/ruslantolstov/azure-connection-parser
- Owner: ruslantolstov
- License: mit
- Created: 2020-09-24T16:57:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-24T17:36:54.000Z (almost 6 years ago)
- Last Synced: 2025-03-15T06:15:47.390Z (over 1 year ago)
- Topics: azure, cosmosdb, eventhub, parser, servicebus
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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='
}
```