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

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 4.0.0 to 4.0.1

lib/typings/helpers.d.ts

4

CHANGELOG.md

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

### 4.0.1
- Emit declarations for typings, instead of using source
### 4.0.0

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

@@ -26,2 +26,3 @@ "use strict";

if (classReference) {
// @ts-ignore
container = new (helpers_1.getClass(classReference.prototype))();

@@ -28,0 +29,0 @@ }

@@ -21,2 +21,3 @@ var __assign = (this && this.__assign) || function () {

if (classReference) {
// @ts-ignore
container = new (getClass(classReference.prototype))();

@@ -23,0 +24,0 @@ }

9

package.json
{
"name": "php-serialize",
"version": "4.0.0",
"version": "4.0.1",
"description": "PHP serialize/unserialize in Javascript",
"main": "lib/cjs/index.js",
"typings": "src/index.ts",
"typings": "lib/typings/index.d.ts",
"module": "lib/esm/index.js",

@@ -12,6 +12,7 @@ "scripts": {

"lint": "(tsc -p . --noEmit) && (eslint . --ext .ts) && (prettier --list-different src/*.ts)",
"prepare": "yarn build:clean ; yarn build:esm ; yarn build:cjs ",
"prepare": "yarn build:clean ; yarn build:esm ; yarn build:cjs ; yarn build:typings",
"build:clean": "rm -rf lib",
"build:esm": "tsc --module es2015 --target es5 --outDir lib/esm",
"build:cjs": "tsc --module commonjs --target es5 --outDir lib/cjs"
"build:cjs": "tsc --module commonjs --target es5 --outDir lib/cjs",
"build:typings": "tsc --declaration --outDir lib/typings --emitDeclarationOnly"
},

@@ -18,0 +19,0 @@ "repository": {

@@ -16,2 +16,3 @@ import invariant from 'assert'

if (classReference) {
// @ts-ignore
container = new (getClass(classReference.prototype))()

@@ -57,6 +58,6 @@ } else {

if (type === 'string') {
return parser.getByLength('"', '"', length => parser.readAhead(length))
return parser.getByLength('"', '"', (length) => parser.readAhead(length))
}
if (type === 'array-object') {
const pairs = parser.getByLength('{', '}', length => unserializePairs(parser, length, scope, options))
const pairs = parser.getByLength('{', '}', (length) => unserializePairs(parser, length, scope, options))

@@ -71,5 +72,5 @@ const isArray = pairs.every((item, idx) => isInteger(item.key) && idx === item.key)

if (type === 'notserializable-class') {
const name = parser.getByLength('"', '"', length => parser.readAhead(length))
const name = parser.getByLength('"', '"', (length) => parser.readAhead(length))
parser.seekExpected(':')
const pairs = parser.getByLength('{', '}', length => unserializePairs(parser, length, scope, options))
const pairs = parser.getByLength('{', '}', (length) => unserializePairs(parser, length, scope, options))
const result = getClassReference(name, scope, options.strict)

@@ -93,5 +94,5 @@

if (type === 'serializable-class') {
const name = parser.getByLength('"', '"', length => parser.readAhead(length))
const name = parser.getByLength('"', '"', (length) => parser.readAhead(length))
parser.seekExpected(':')
const payload = parser.getByLength('{', '}', length => parser.readAhead(length))
const payload = parser.getByLength('{', '}', (length) => parser.readAhead(length))
const result = getClassReference(name, scope, options.strict)

@@ -98,0 +99,0 @@ if (!(result instanceof __PHP_Incomplete_Class)) {

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