
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.
@smithy/util-uri-escape
Advanced tools
[](https://www.npmjs.com/package/@smithy/util-uri-escape) [](https://www.npmjs.com/package/@smithy/ut
@smithy/util-uri-escape is a utility package designed to handle URI escaping and unescaping. It provides functions to ensure that URIs are properly encoded and decoded, which is essential for web development and API interactions.
escapeUri
The `escapeUri` function takes a URI string and returns an escaped version of it, ensuring that all special characters are properly encoded.
const { escapeUri } = require('@smithy/util-uri-escape');
const escapedUri = escapeUri('https://example.com/path?query=param');
console.log(escapedUri);
escapeUriPath
The `escapeUriPath` function specifically escapes the path component of a URI, making sure that spaces and special characters are encoded correctly.
const { escapeUriPath } = require('@smithy/util-uri-escape');
const escapedUriPath = escapeUriPath('/path with spaces/and special characters');
console.log(escapedUriPath);
The `querystring` package provides utilities for parsing and formatting URL query strings. It includes methods like `escape` and `unescape` for encoding and decoding URI components. Compared to @smithy/util-uri-escape, `querystring` offers a broader range of query string manipulation functions.
The `url` module in Node.js provides utilities for URL resolution and parsing. It includes methods like `url.format` and `url.parse` which handle URI encoding and decoding. While `url` is more comprehensive in terms of URL manipulation, @smithy/util-uri-escape focuses specifically on URI escaping.
The `encodeurl` package is a simple utility for URL encoding. It ensures that the URL is properly encoded, similar to the `escapeUri` function in @smithy/util-uri-escape. However, `encodeurl` is more lightweight and focused solely on encoding URLs.
FAQs
[](https://www.npmjs.com/package/@smithy/util-uri-escape) [](https://www.npmjs.com/package/@smithy/ut
The npm package @smithy/util-uri-escape receives a total of 0 weekly downloads. As such, @smithy/util-uri-escape popularity was classified as not popular.
We found that @smithy/util-uri-escape 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
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.