Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A simple and lonely serialization library for JS
yarn add deserted
Generated by Typedoc:
import { deserted } from 'deserted'
const myObject = {
value: 523,
nested: {
text: 'foo',
bar: false
},
date: new Date(1990, 1, 1)
}
const asString = deserted.serialize(myObject)
const backToObject = deserted.deserialize(asString)
const quickCloneObject = deserted.clone(myObject)
import { deserted, Converters } from 'deserted'
class Test {
constructor() {
this.foo = 1
this.bar = true
}
}
const test = new Test()
test.bar = false
const testSerializer = deserted.withConverters(Converters.allProps(Test))
const shared = { value: 123, { nested: test: 'foo' } }
const someObject = [shared, { value: shared }, new Map([1, shared])]
const asString = testSerializer.serialize(someObject)
const backToObject = testSerializer.deserialize(asString)
const quickCloneObject = testSerializer.clone(someObject)
Serialization is important in any system dealing with data that should be saved or sent over a wire. It is also useful for deep cloning of objects. In a quick search for a simple to use but powerful library, I could not find anything that matches these requirements.
The deserted
library can serialize complex object-graphs with circular references without configuration.
Things that are serializable out of the box:
number
, string
, boolean
, undefined
, null
, Symbol
Number
, String
, Boolean
Array
, Map
, Set
Date
Error
Things that require some configuration:
Symbols
, if they need to be reconnected to existing Symbols
Things that are not serializable:
Promises
TBD
FAQs
A simple and lonely serialization library for JS
We found that deserted demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.