Socket
Socket
Sign inDemoInstall

php-serialize

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

php-serialize - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 3.0.1
- Fix handling of shallow arrays (Thanks @neoaggelos)
## 3.0.0

@@ -2,0 +6,0 @@

2

lib/serialize.js

@@ -20,3 +20,3 @@ "use strict";

const processed = Array.isArray(item) ? item.map((value, index) => `${serialize(index, scope)}${serialize(value, scope)}`) : Object.keys(item).map(key => `${serialize(key, scope)}${serialize(item[key], scope)}`);
return `${processed.length}:{${processed.join('')}}`;
return `${processed.filter(entry => typeof entry !== 'undefined').length}:{${processed.join('')}}`;
}

@@ -23,0 +23,0 @@

{
"name": "php-serialize",
"version": "3.0.0",
"version": "3.0.1",
"description": "PHP serialize/unserialize in Javascript",

@@ -30,3 +30,3 @@ "main": "lib/index.js",

"eslint-config-steelbrain": "^7.0.0",
"flow-bin": "^0.97.0",
"flow-bin": "^0.98.0",
"sb-babel-cli": "^2.0.0"

@@ -33,0 +33,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