Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@smithy/util-uri-escape
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@smithy/util-uri-escape/latest.svg)](https://www.npmjs.com/package/@smithy/util-uri-escape) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-uri-escape.svg)](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
[![NPM version](https://img.shields.io/npm/v/@smithy/util-uri-escape/latest.svg)](https://www.npmjs.com/package/@smithy/util-uri-escape) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-uri-escape.svg)](https://www.npmjs.com/package/@smithy/ut
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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.