
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A lightweight JavaScript library to manipulate the page url.
Browse the demos on http://jillix.github.io/url.js/
The library is available on CDNJS as well. To use it, just do:
<script src="https://cdnjs.cloudflare.com/ajax/libs/urljs/2.6.2/url.min.js"></script>
<script src="path/to/url.js"></script>
<!-- or use the cdn
<script src="https://cdnjs.cloudflare.com/ajax/libs/urljs/2.6.2/url.min.js"></script>
-->
<script>
Url.updateSearchParam("answer", 42);
</script>
The library is CommonJS-compatible. You can require("url.js") in your files.
Check out the dist directory to download the needed files and include them on your page.
If you're using this module in a CommonJS environment, you can install it using npm or yarn and require it:
# Using npm
npm install --save urljs
# Using yarn
yarn add urljs
There are few ways to get help:
queryString(name, notDecoded)Finds the value of parameter passed in first argument.
name: The parameter name.notDecoded: If true, the result will be encoded.true if the parameter is there, but doesn't have a value, or
undefined if it is missing.parseQuery(search)Parses a string as querystring. Like the queryString method does, if
the parameter is there, but it doesn't have a value, the value will
be true.
search: An optional string that should be parsed (default: window.location.search).stringify(queryObj)Stringifies a query object.
queryObj: The object that should be stringified.queryObj object.updateSearchParam(param, value, push, triggerPopState)Adds, updates or deletes a parameter (without page refresh).
param: The parameter name or name-value pairs as object.value: The parameter value. If undefined, the parameter will be removed.push: If true, the page will be kept in the history, otherwise the location will be changed but by pressing the back button
will not bring you to the old location.triggerPopState: Triggers the popstate handlers (by default falsly).Url object.getLocation(excludeHash)Returns the page url, but not including the domain name.
excludeHash: If true, the location hash will not be appended in the result.hash(newHash, triggerPopState)Sets/gets the hash value.
newHash: The hash to set.triggerPopState: Triggers the hashchange (by default falsly)._updateAll(s, push, triggerPopState)Update the full url (pathname, search, hash).
s: The new url to set.push: If true, the page will be kept in the history, otherwise the location will be changed but by pressing the back button
will not bring you to the old location.triggerPopState: Triggers the popstate handlers (by default falsly).pathname(pathname, push, triggerPopState)Sets/gets the pathname.
pathname: The pathname to set.push: If true, the page will be kept in the history, otherwise the location will be changed but by pressing the back button
will not bring you to the old location.triggerPopState: Triggers the popstate handlers (by default falsly).triggerHashchangeCb()Calls the hashchange handlers.
triggerPopStateCb()Calls the popstate handlers.
onPopState(cb)Adds a popstate handler.
cb: The callback function.onHashchange(cb)Adds a hashchange handler.
cb: The callback function.removeHash(push, trigger)Removes the hash from the url.
push: If true, the page will be kept in the history, otherwise the location will be changed but by pressing the back button
will not bring you to the old location.trigger: Triggers the popstate handlers (by default falsly).removeQuery(push, trigger)Removes the querystring parameters from the url.
push: If true, the page will be kept in the history, otherwise the location will be changed but by pressing the back button
will not bring you to the old location.trigger: Triggers the popstate handlers (by default falsly).Have an idea? Found a bug? See how to contribute.
If you are using this library in one of your projects, add it in this list. :sparkles:
ember-cli-mocha-reporterFAQs
A lightweight JavaScript library to manipulate the page url.
The npm package urljs receives a total of 39 weekly downloads. As such, urljs popularity was classified as not popular.
We found that urljs 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.