
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@degjs/url-utils
Advanced tools
Utility functions for working with the browser URL. These functions are primarily to be used with partial URLs. For work with full URLs, consider using the URL interface.
UrlUtils is an ES6 module. Consequently, you may need an ES6 transpiler (Babel is a nice one) as part of your Javascript workflow.
If you are already using NPM for your project, you can install urlUtils with the following command:
$ npm install @degjs/url-utils
Importing individual domUtils methods:
import {queryStringToObj} from '@degjs/url-utils';
const queryParamObj = queryStringToObj(window.location.search);
Importing all domUtils methods:
import * as urlUtils from '@degjs/url-utils';
const queryParamObj = urlUtils.queryStringToObj(window.location.search);
The getUrlParameter method returns the value of a specified query parameter when given the query param name. If no param is found by the given name, null
is returned.
Type: String
The name of the query param to get the value of.
Type: String
Default: window.location.search
The query string to search.
Previously called queryStringToJson The queryStringToObj method takes in a query string and returns an object where the property names are the query param names and the property values are the query param values.
Type: String
Default: window.location.search
The query string to convert.
Type: Boolean
Default: true
If set to true, the value of the query parameter will have whitespace trimmed and the text be converted to all lowercase.
The objToQueryString method does the opposite of the queryStringToObj method. It takes in an object and converts the key, value pairs into a queryString.
Type: Object
The object to convert. It should consist of key, value pairs where the value is a primitive type.
FAQs
Utility functions for working with the browser URL.
We found that @degjs/url-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.