Product
Introducing Java Support in Socket
We're excited to announce that Socket now supports the Java programming language.
This module builds upon the existing URL module in NodeJS, but adds
relative(source, target)
which returns the shortest relative path
between any two equally qualified URL’s. If the paths are not equally
qualified, it returns the target.
In addition, this package augments the URL object definition as returned
by parse
and consumed by format
.
pathname
is broken down into
root
: whether the path is qualified from the root of the
domain.relative
: the relative path, from the root if pathname
is
qualified from the domain root.
directories
: an array of path componentsfile
: the name of the file, or null if the URL points to a
directory, indicated by a final slash.Additionally, format
uses the path
property if it exists, instead of
pathname
and search
.
Based on my earlier work for Narwhal.
Copyright 2012 Kristopher Michael Kowal. All rights reserved. MIT License
FAQs
Node's URL module plus relative pathing
The npm package url2 receives a total of 44,012 weekly downloads. As such, url2 popularity was classified as popular.
We found that url2 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.
Product
We're excited to announce that Socket now supports the Java programming language.
Security News
Socket detected a malicious Python package impersonating a popular browser cookie library to steal passwords, screenshots, webcam images, and Discord tokens.
Security News
Deno 2.0 is now available with enhanced package management, full Node.js and npm compatibility, improved performance, and support for major JavaScript frameworks.