
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@eternaljs/url-parser
Advanced tools
This basic package allows you to parse a URL into its singular parts, i.e protocol, username, password, hostname, port, domain, subdomain.
A URL (Uniform Resource Locator) is a unique identifier used to locate a resource on the Internet. It is also referred to as a web address. URLs consist of multiple parts -- including a protocol and domain name -- that tell a web browser how and where to retrieve a resource.
This basic tool allows you to parse a URL into its singular parts, i.e protocol, username, password, hostname, port, domain, subdomain.
Using npm:
$ npm install @eternaljs/url-parser
Using yarn:
$ yarn add @eternaljs/url-parser
These examples assume you're in node, or something similar:
// JavaScript
const { getUrlInfo } = require('@eternaljs/url-parser');
// TypeScript
import { getUrlInfo } from '@eternaljs/url-parser';
const details = getUrlInfo('https://console.cloud.google.com/welcome?project=eternaljs');
console.log(details);
The output will be URL full details like Protocol
, Hostname
, Subdomain
:
{
href: 'https://console.cloud.google.com/welcome?project=eternaljs',
protocol: 'https:',
hostname: 'console.cloud.google.com',
port: '',
pathname: '/welcome',
param: [ 'welcome' ],
query: { project: 'eternaljs' },
search: '?project=eternaljs',
hash: '',
sub_domain: 'console'
}
MIT
FAQs
This basic package allows you to parse a URL into its singular parts, i.e protocol, username, password, hostname, port, domain, subdomain.
We found that @eternaljs/url-parser demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.