New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@wordpress/sync

Package Overview
Dependencies
Maintainers
25
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/sync

Sync Data.

Source
npmnpm
Version
0.3.0
Version published
Maintainers
25
Created
Source

Sync

Sync data between multiple peers and persist in a local database.

Installation

Install the module

npm install @wordpress/sync --save

API

connectIndexDb

Connect function to the IndexedDB persistence provider.

Parameters

  • objectId ObjectID: The object ID.
  • objectType ObjectType: The object type.
  • doc CRDTDoc: The CRDT document.

Returns

  • Promise<() => void>: Promise that resolves when the connection is established.

connectWebRTC

Connect function to the WebRTC provider.

Parameters

  • objectId ObjectID: The object ID.
  • objectType ObjectType: The object type.
  • doc CRDTDoc: The CRDT document.

Returns

  • Promise<() => void>: Promise that resolves when the connection is established.

createSyncProvider

Create a sync provider.

Parameters

  • connectLocal ConnectDoc: Connect the document to a local database.
  • connectRemote ConnectDoc: Connect the document to a remote sync connection.

Returns

  • SyncProvider: Sync provider.

Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by WordPress as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project's main contributor guide.



Code is Poetry.

Keywords

wordpress

FAQs

Package last updated on 31 Aug 2023

Did you know?

Socket

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.

Install

Related posts