2.0.1-rc.17 • Published 9 months ago

@com-chain/jsc3l v2.0.1-rc.17

Weekly downloads
-
License
AGPL-3.0
Repository
github
Last release
9 months ago

JSC3L

JavaScript Com-Chain Communication Library

History

This lib was extracted from Biletujo project.

Usage

This module provides a Jsc3lAbstract class that needs to be subclassed to be used. This allows to inject different implementation of core elements that may vary depending on where you are using the JSC3L. There are only 2 elements to provide :

  • httpRequest: a mean to make an http request

  • persistentStorage: a storage that will persist between runs

These should follow precise behaviors and interfaces. You can find a nice implementation for node and browsers in npm package jsc3l-browser. Actually, you could only depend on this last package if you are developping on a browser platform.

Demo

An toy example is provided to show JSC3L usage in npm package jsc3l-browser-test. You should have a glance at it.

Developers

Package is using npm to track dependendies, so you can install them with:

npm install

As this package is written in typescript. You can transpile to javascript and transpile on file change with:

## Compile and watch
npx tspc -w

Tests are managed through vitest

## Run test once
npm run test

Note that you can also use npx vitest command to launch tests in watch mode.