
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
@syslogic/graph-serializer
Advanced tools
Typescript serializer for converting betweet JSON data and Object graphs
Graph serializer is a lightweight library for converting JSON data structures to typed objects usable in typescript. Benefits include better type checking in your IDE, better type safety, and standardized date conversion. Primary use case is for easy integration of RESTful services and typescript.
Add graph-serializer to your dependencies:
npm i --save @syslogic/graph-serializer
Graph-serializer provides an annotation which you can use in your typescrpt entities. You can use the @serializable
to specify which properties need to be (de)serialized.
The serialize
and deserialize
functions can then be used with the entity
import {serializable, deserialize, serialize} from "@syslogic/graph-serializer"
class Foo {
@serializable()
public thisWillBeSerialized: string = 'test';
}
let fooObj = deserialize(Foo, {thisWillBeSerialized: 'bar'}); // fooOjb instanceof Foo === true
let fooGraph = serialize(new Foo()); // fooGraph = {thisWillBeSerialized: 'bar'}
There are a few serializer parameters to seraialize all sorts of serializers. Check the test directory for more examples. Features include:
Date
deserializationFAQs
Typescript serializer for converting betweet JSON data and Object graphs
We found that @syslogic/graph-serializer 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
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.