Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-param-by-name

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-param-by-name - npm Package Compare versions

Comparing version 1.0.2 to 1.0.4

5

dist/index.js

@@ -1,10 +0,13 @@

"use strict";
'use strict';
var getParamByName = function getParamByName(search) {
var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href;
var name = search.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');
var results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));

@@ -11,0 +14,0 @@ };

11

package.json
{
"name": "get-param-by-name",
"version": "1.0.2",
"version": "1.0.4",
"description": "A JavaScript utility for retrieving a parameter value by name from a URL.",

@@ -27,11 +27,8 @@ "main": "dist/index.js",

"devDependencies": {
"@babel/cli": "^7.1.5",
"@babel/core": "^7.1.6",
"@babel/preset-env": "^7.1.6",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-jest": "^23.6.0",
"babel-preset-env": "^1.7.0",
"jest": "^23.6.0"
},
"resolutions": {
"@babel/core": "7.0.0-bridge.0"
},
"jest": {

@@ -38,0 +35,0 @@ "moduleFileExtensions": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc