Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
php-serialize
Advanced tools
PHP-Serialize is node library that helpers you encode/decoded data in PHP's Serialization format.
It also supports Serializable
objects decode. Here's how you can use them.
const Serialize = require('php-serialize')
class User {
constructor({ name, age }){
this.name = name
this.age = age
}
serialize(){
return JSON.stringify({ name: this.name, age: this.age })
}
unserialize(rawData){
const { name, age } = JSON.parse(rawData)
this.name = name
this.age = age
}
}
const steel = new User({ name: "Steel Brain", age: 17 })
const Serialized = Serialize.serialize(steel)
const Unserialized = Serialize.unserialize(Serialized, {User: User}) // Passing available classes
console.log(Unserialized instanceof User) // true
class Serializable {
serialize(item: any): string
unserialize(item: string, scope: Object = {}, options: { strict: boolean } = { strict: false }): any
}
This project is licensed under the terms of MIT License. See the License file for more info.
1.2.1
FAQs
PHP serialize/unserialize in Javascript
The npm package php-serialize receives a total of 22,924 weekly downloads. As such, php-serialize popularity was classified as popular.
We found that php-serialize demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.