php-serialize
Advanced tools
Comparing version 4.0.2 to 4.1.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getClass = exports.getIncompleteClass = exports.isInteger = exports.getByteLength = exports.__PHP_Incomplete_Class = void 0; | ||
// eslint-disable-next-line camelcase,@typescript-eslint/class-name-casing | ||
@@ -4,0 +5,0 @@ var __PHP_Incomplete_Class = /** @class */ (function () { |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isSerialized = exports.unserialize = exports.serialize = void 0; | ||
var unserialize_1 = __importDefault(require("./unserialize")); | ||
@@ -8,0 +9,0 @@ exports.unserialize = unserialize_1.default; |
@@ -13,2 +13,18 @@ "use strict"; | ||
}; | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -59,2 +75,8 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
} | ||
if (item instanceof Map) { | ||
return "a:" + item.size + ":{" + Array.from(item.entries()).map(function (_a) { | ||
var _b = __read(_a, 2), value = _b[0], key = _b[1]; | ||
return "" + serialize(value, scope) + serialize(key, scope); | ||
}) + "}"; | ||
} | ||
var constructorName = getClassNamespace(item, scope); | ||
@@ -61,0 +83,0 @@ if (typeof item.serialize === 'function') { |
@@ -12,2 +12,18 @@ var __assign = (this && this.__assign) || function () { | ||
}; | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
import invariant from 'assert'; | ||
@@ -54,2 +70,8 @@ import { isInteger, getByteLength } from './helpers'; | ||
} | ||
if (item instanceof Map) { | ||
return "a:" + item.size + ":{" + Array.from(item.entries()).map(function (_a) { | ||
var _b = __read(_a, 2), value = _b[0], key = _b[1]; | ||
return "" + serialize(value, scope) + serialize(key, scope); | ||
}) + "}"; | ||
} | ||
var constructorName = getClassNamespace(item, scope); | ||
@@ -56,0 +78,0 @@ if (typeof item.serialize === 'function') { |
{ | ||
"name": "php-serialize", | ||
"version": "4.0.2", | ||
"version": "4.1.0", | ||
"description": "PHP serialize/unserialize in Javascript", | ||
@@ -5,0 +5,0 @@ "main": "lib/cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35731
854
21