Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
jest-serializer
Advanced tools
> DEPRECATED: Use `v8` APIs directly: https://nodejs.org/api/v8.html#serialization-api
DEPRECATED: Use
v8
APIs directly: https://nodejs.org/api/v8.html#serialization-api
Module for serializing and deserializing object into memory and disk. The Node core v8
implementations are used. This seriializer have the advantage of being able to serialize Map
, Set
, undefined
, NaN
, etc..
$ yarn add jest-serializer
Three kinds of API groups are exposed:
serialize
and deserialize
This set of functions take or return a Buffer
. All the process happens in memory. This is useful when willing to transfer over HTTP, TCP or via UNIX pipes.
import {deserialize, serialize} from 'jest-serializer';
const myObject = {
foo: 'bar',
baz: [0, true, '2', [], {}],
};
const buffer = serialize(myObject);
const myCopyObject = deserialize(buffer);
readFileSync
and writeFileSync
This set of functions allow to send to disk a serialization result and retrieve it back, in a synchronous way. It mimics the fs
API so it looks familiar.
import {readFileSync, writeFileSync} from 'jest-serializer';
const myObject = {
foo: 'bar',
baz: [0, true, '2', [], {}],
};
const myFile = '/tmp/obj';
writeFileSync(myFile, myObject);
const myCopyObject = readFileSync(myFile);
FAQs
> DEPRECATED: Use `v8` APIs directly: https://nodejs.org/api/v8.html#serialization-api
We found that jest-serializer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.