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

can-deparam

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-deparam - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

7

can-deparam-test.js

@@ -79,3 +79,10 @@ var deparam = require('./can-deparam');

QUnit.test(" handle '?' and '#' ", function(assert) {
var result = deparam("?foo=bar&number=1234", stringToAny);
assert.deepEqual(result, {"foo" : "bar", "number": 1234});
result = deparam("#foo[]=bar&foo[]=baz");
assert.deepEqual(result, {"foo" : ["bar", "baz"]});
});
/** /

@@ -82,0 +89,0 @@ test("deparam an array", function(){

4

can-deparam.js

@@ -44,3 +44,7 @@ "use strict";

entityRegex = /%([^0-9a-f][0-9a-f]|[0-9a-f][^0-9a-f]|[^0-9a-f][^0-9a-f])/i,
startChars = {"#": true,"?": true},
prep = function (str) {
if (startChars[str.charAt(0)] === true) {
str = str.substr(1);
}
str = str.replace(/\+/g, ' ');

@@ -47,0 +51,0 @@

10

dist/amd/can-deparam.js

@@ -1,2 +0,2 @@

/*can-deparam@1.2.0#can-deparam*/
/*can-deparam@1.2.1#can-deparam*/
define('can-deparam', [

@@ -10,3 +10,9 @@ 'require',

var namespace = require('can-namespace');
var digitTest = /^\d+$/, keyBreaker = /([^\[\]]+)|(\[\])/g, paramTest = /([^?#]*)(#.*)?$/, entityRegex = /%([^0-9a-f][0-9a-f]|[0-9a-f][^0-9a-f]|[^0-9a-f][^0-9a-f])/i, prep = function (str) {
var digitTest = /^\d+$/, keyBreaker = /([^\[\]]+)|(\[\])/g, paramTest = /([^?#]*)(#.*)?$/, entityRegex = /%([^0-9a-f][0-9a-f]|[0-9a-f][^0-9a-f]|[^0-9a-f][^0-9a-f])/i, startChars = {
'#': true,
'?': true
}, prep = function (str) {
if (startChars[str.charAt(0)] === true) {
str = str.substr(1);
}
str = str.replace(/\+/g, ' ');

@@ -13,0 +19,0 @@ try {

@@ -1,2 +0,2 @@

/*can-deparam@1.2.0#can-deparam*/
/*can-deparam@1.2.1#can-deparam*/
define('can-deparam', [

@@ -10,3 +10,9 @@ 'require',

var namespace = require('can-namespace');
var digitTest = /^\d+$/, keyBreaker = /([^\[\]]+)|(\[\])/g, paramTest = /([^?#]*)(#.*)?$/, entityRegex = /%([^0-9a-f][0-9a-f]|[0-9a-f][^0-9a-f]|[^0-9a-f][^0-9a-f])/i, prep = function (str) {
var digitTest = /^\d+$/, keyBreaker = /([^\[\]]+)|(\[\])/g, paramTest = /([^?#]*)(#.*)?$/, entityRegex = /%([^0-9a-f][0-9a-f]|[0-9a-f][^0-9a-f]|[^0-9a-f][^0-9a-f])/i, startChars = {
'#': true,
'?': true
}, prep = function (str) {
if (startChars[str.charAt(0)] === true) {
str = str.substr(1);
}
str = str.replace(/\+/g, ' ');

@@ -13,0 +19,0 @@ try {

@@ -168,3 +168,3 @@ /*[process-shim]*/

/*can-deparam@1.2.0#can-deparam*/
/*can-deparam@1.2.1#can-deparam*/
define('can-deparam', [

@@ -178,3 +178,9 @@ 'require',

var namespace = require('can-namespace');
var digitTest = /^\d+$/, keyBreaker = /([^\[\]]+)|(\[\])/g, paramTest = /([^?#]*)(#.*)?$/, entityRegex = /%([^0-9a-f][0-9a-f]|[0-9a-f][^0-9a-f]|[^0-9a-f][^0-9a-f])/i, prep = function (str) {
var digitTest = /^\d+$/, keyBreaker = /([^\[\]]+)|(\[\])/g, paramTest = /([^?#]*)(#.*)?$/, entityRegex = /%([^0-9a-f][0-9a-f]|[0-9a-f][^0-9a-f]|[^0-9a-f][^0-9a-f])/i, startChars = {
'#': true,
'?': true
}, prep = function (str) {
if (startChars[str.charAt(0)] === true) {
str = str.substr(1);
}
str = str.replace(/\+/g, ' ');

@@ -181,0 +187,0 @@ try {

{
"name": "can-deparam",
"version": "1.2.1",
"version": "1.2.2",
"description": "Deserialize a query string into an array or object.",

@@ -5,0 +5,0 @@ "homepage": "https://canjs.com/doc/can-deparam.html",

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