Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Enhancement: Parsed connection strings proxy

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale

Research direction

Start with the parseSqlConnectionString entry point and review the linked MDN Proxy reference. The requested result should support the shown host, port, proto, alias, and case-insensitive property access while retaining the original connection-string values; the issue does not name any files or tests.

Written by the indexing model from the issue text.

Description

see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy

Ideally a connection object should add some layer of abstraction around the parsed connection string. This would result in more than a simple map of key value pairs being returned and instead the object being queried and parsed in a more helpful way.

eg:


const { parseSqlConnectionString } = require('@tediousjs/connection-string');
const connStr = "Data Source=tcp:mydomain.com,1433";

const connectionObj = parseSqlConnectionString(connStr);

console.log(connectionObj.host); // mydomain.com
console.log(connectionObj.port); // 1433
console.log(connectionObj.proto); // tcp
console.log(connectionObj['data source']); // tcp:mydomain.com,1433
console.log(connectionObj.Addr); // tcp:mydomain.com,1433

This could be implemented as

const connStr = "Data Source=tcp:mydomain.com,1433";
const connectionObj = parseSqlConnectionString(connStr);
return new Proxy(connectionObj, {
    get: (target, prop, receiver) => {
        // special handling for some cases like alias props
        // special handling for computed props (eg: host, proto, port)
        // return case insensitive look up
    }
});
Dominant language
TypeScript
Stars
9
Forks
6
Avg merge
1d 6h
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tediousjs/connection-string

All issues in tediousjs/connection-string

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.