Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@tediousjs/connection-string
Advanced tools
Readme
This node library is designed to allow the parsing of Connection Strings see https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.connectionstring
The library also provides the ability to parse SQL Connection Strings.
The library comes with a generic connection string parser that will parse through valid connections strings and produce a key-value map of the entries in that string. No additional validation is performed.
const { parseConnectionString } = require('@tediousjs/connection-string');
const connectionString = 'User ID=user;Password=password;Initial Catalog=AdventureWorks;Server=MySqlServer';
const parsed = parseConnectionString(connectionString);
console.log(parsed);
Output to the console will be:
{
"User id": "user",
"password": "password",
"initial catalog": "AdventureWorks",
"server": "MySqlServer"
}
There is a specific helper for parsing SQL connection strings and this comes with a value normaliser and validation. It also has an option to "canonicalise" the properties. For many properties in an SQL connections string, there are aliases, when canonical properties are being used, these aliases will be returned as the canonical property.
const { parseSqlConnectionString } = require('@tediousjs/connection-string');
const connectionString = 'User ID=user;Password=password;Initial Catalog=AdventureWorks;Server=MySqlServer';
const parsed = parseSqlConnectionString(connectionString, true);
console.log(parsed);
Output to console will be:
{
"user id": "user",
"password": "password",
"initial catalog": "AdventureWorks",
"data source": "MySqlServer"
}
NB: The Server
property from the connection string has been re-written to the value Data Source
FAQs
SQL ConnectionString parser
The npm package @tediousjs/connection-string receives a total of 385,135 weekly downloads. As such, @tediousjs/connection-string popularity was classified as popular.
We found that @tediousjs/connection-string demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.