Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacobbubu/crdt-pull
Rewritten https://github.com/dominictarr/scuttlebutt in TypeScript
https://github.com/jacobbubu/crdt-pull
Last synced: 14 days ago
JSON representation
Rewritten https://github.com/dominictarr/scuttlebutt in TypeScript
- Host: GitHub
- URL: https://github.com/jacobbubu/crdt-pull
- Owner: jacobbubu
- License: mit
- Created: 2020-03-15T12:30:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-08T19:43:34.000Z (over 1 year ago)
- Last Synced: 2024-03-26T17:03:45.984Z (10 months ago)
- Language: TypeScript
- Size: 1.22 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: code-of-conduct.md
Awesome Lists containing this project
README
# @jacobbubu/crdt-pull
[![Build Status](https://travis-ci.org/jacobbubu/crdt-pull.svg)](https://travis-ci.org/jacobbubu/crdt-pull)
[![Coverage Status](https://coveralls.io/repos/github/jacobbubu/crdt-pull/badge.svg)](https://coveralls.io/github/jacobbubu/crdt-pull)
[![npm](https://img.shields.io/npm/v/@jacobbubu/crdt-pull.svg)](https://www.npmjs.com/package/@jacobbubu/crdt-pull/)> Rewritten [crdt](https://github.com/dominictarr/crdt) in TypeScript and work with [scuttlebutt-pull](https://github.com/jacobbubu/scuttlebutt-pull)
## Intro.
``
## Usage
```bash
npm install @jacobbubu/crdt-pull
`````` ts
import { Doc } from '../src'
import { link } from '@jacobbubu/scuttlebutt-pull'
import { delay } from './utils'const main = async () => {
const doc = new Doc({ id: 'doc' })
const hoc = new Doc({ id: 'hoc' })
const ds = doc.createStream({ name: 'd-h', wrapper: 'raw' })
const hs = hoc.createStream({ name: 'h-d', wrapper: 'raw' })link(ds, hs)
doc.add({ id: 'abc', hello: 3 })
await delay(100)console.log(hoc.toJSON())
}// tslint:disable-next-line no-floating-promises
main()
```Please see the test cases for the detail.