New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

urlencode-for-php

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urlencode-for-php - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

3

index.js

@@ -11,3 +11,4 @@ module.exports = encode;

{
if (typeof flatted[key] === 'object' && Object.keys(flatted[key]).length === 0) continue;
if (flatted[key] !== null && typeof flatted[key] === 'object' && Object.keys(flatted[key]).length === 0) continue;
if (flatted[key] === null) continue;
params.push( dot2brackets(key)+'='+encodeURIComponent(flatted[key]) );

@@ -14,0 +15,0 @@ }

{
"name": "urlencode-for-php",
"version": "1.0.3",
"version": "1.0.4",
"description": "encode object/array to php-like query string",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,7 +0,6 @@

var urlencode = require('../');
const urlencode = require('../');
describe('urlencode-for-php', function()
{
it('test1', function(done)
{
describe('urlencode-for-php', function() {
it('test1', function(done) {
var obj = {a:[1,2,3,4]};

@@ -13,4 +12,10 @@ var expected = 'a[0]=1&a[1]=2&a[2]=3&a[3]=4';

it('test2', function(done)
{
it('test11', function(done) {
var obj = {a:[1,2,3,4], b:{}, c: [], d: null};
var expected = 'a[0]=1&a[1]=2&a[2]=3&a[3]=4';
console.log(urlencode(obj));
done();
});
it('test2', function(done) {
var obj =

@@ -31,4 +36,3 @@ {

it('test3', function(done)
{
it('test3', function(done) {
var obj =

@@ -35,0 +39,0 @@ {

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