0.8.5 • Published 9 months ago

@logux/core v0.8.5

Weekly downloads
433
License
MIT
Repository
github
Last release
9 months ago

Logux Core Cult Of Martians

Logux is a new way to connect client and server. Instead of sending HTTP requests (e.g., AJAX and GraphQL) it synchronizes log of operations between client, server, and other clients.

This repository contains Logux core components for JavaScript:

  • Log to store node’s actions.
  • MemoryStore to store log in the memory.
  • BaseNode, ClientNode, and ServerNode to synchronize actions from Log with other node.
  • isFirstOlder to compare creation time of different actions.
  • WsConnection, Reconnect, and ServerConnection to connect nodes via WebSocket.
  • TestLog, TestPair, TestTime, and eachStoreCheck to test Logux application.

Install

npm install @logux/core

Usage

See documentation for Logux API.

import { ClientNode, TestTime, TestLog, TestPair } from '@logux/core'

let time = new TestTime()
let pair = new TestPair()
let node = new ClientNode('client:test', time.nextLog(), pair.left)
import { isFirstOlder } from '@logux/core'

let lastRename
log.type('RENAME', (action, meta) => {
  if (isFirstOlder(lastRename, meta)) {
    changeName(action.name)
    lastRename = meta
  }
})
0.8.5

9 months ago

0.8.4

9 months ago

0.8.3

9 months ago

0.8.2

9 months ago

0.8.1

1 year ago

0.8.0

2 years ago

0.7.3

2 years ago

0.7.2

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.3

4 years ago

0.5.0

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago