
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
lds_dev_client
Advanced tools
A lightweight utility package that extracts the hostname and port from the current URL.
npm install lds_dev_client
// ES6 import
import { HostAddress, HostPort } from 'lds_dev_client';
// Example: If the page URL is "https://localhost:3000"
console.log(HostAddress); // Outputs: "localhost"
console.log(HostPort); // Outputs: 3000
// If the page URL is "https://example.com/"
console.log(HostAddress); // Outputs: "example.com"
console.log(HostPort); // Outputs: 443 (default HTTPS port)
// If the page URL is "http://localhost/"
console.log(HostAddress); // Outputs: "localhost"
console.log(HostPort); // Outputs: 80 (default HTTP port)
You can also use the functions directly for more flexibility:
import { getHost, getPort } from 'lds_dev_client';
const host = getHost();
const port = getPort();
MIT
Your Name
Here's a simple example showing how to use the package in a React application:
import React from 'react';
import { HostAddress, HostPort } from 'lds_dev_client';
function ServerInfo() {
return (
<div className="server-info">
<h3>Server Information</h3>
<p>Connected to: {HostAddress}</p>
<p>Port: {HostPort}</p>
</div>
);
}
export default ServerInfo;
Name | Type | Description |
---|---|---|
HostAddress | String | The hostname from the current URL (e.g., "localhost", "example.com") |
HostPort | Number | The port number from the URL, or default port (80 for HTTP, 443 for HTTPS) |
Name | Return Type | Description |
---|---|---|
getHost() | String | Function to get the hostname dynamically |
getPort() | Number | Function to get the port dynamically |
This package is designed for browser environments and has been tested with:
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
FAQs
LearningDeck_dev_client Package
The npm package lds_dev_client receives a total of 4 weekly downloads. As such, lds_dev_client popularity was classified as not popular.
We found that lds_dev_client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.