
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Figure out what type a href is. Useful to help resolve URI's between assets on a site
Hreftypes helps you determine if a href is of type absolute
, protocolRelative
, rootRelative
, relative
or inline
. This can be useful while resolving URI's across different types of assets in a website dependency graph.
npm install --save- hreftypes
const assert = require('assert');
const { hrefTypes, getHrefType } = require('hreftype');
assert(getHrefType('http://foo.com') === hrefTypes.ABSOLUTE);
assert(getHrefType('https://foo.com') === hrefTypes.ABSOLUTE);
assert(getHrefType('//foo.com') === hrefTypes.PROTOCOL_RELATIVE);
assert(getHrefType('/foo.com') === hrefTypes.ROOT_RELATIVE);
assert(getHrefType('foo.com') === hrefTypes.RELATIVE);
assert(getHrefType('data:text/html,<h1>Hi</h1>') === hrefTypes.INLINE);
FAQs
Figure out what type a href is. Useful to help resolve URI's between assets on a site
The npm package hreftypes receives a total of 11 weekly downloads. As such, hreftypes popularity was classified as not popular.
We found that hreftypes demonstrated a not healthy version release cadence and project activity because the last version was released 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.