Skip to content

fest-live/uniform.ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏬 Uniform.TS 🏬

Uniform.TS β€” A modern replacement for all my web workers libraries.

GitHub Repo GitHub stars License Last Commit npm version Build Status Coverage Status Issues PRs Welcome


Key Links


🚧 Project Status

Note: The project is being revived. There are no guarantees of stability yet, but new architectural ideas and sketches are in progress.


✨ Key Concepts

  • Unified approach to working with web workers
  • New architectural patterns
  • Not based on any organic principles

Usage

Host:

import { importModuleInChannel } from "fest/uniform";

//
const module = await importModuleInChannel("test", new URL("./module.ts", import.meta.url).href);
console.log(await module?.remoteFunction(1, 2));

//
const r2 = await (await module?.createArrayBuffer(10))?.transfer?.();
console.log(r2);

Worker:

export const remoteFunction = (a: number, b: number) => {
    return a + b;
};

export const createArrayBuffer = (length: number) => {
    return new ArrayBuffer(length);
};

πŸ“¦ Installation

npm install -D @fest-lib/uniform
# or
yarn add @fest-lib/uniform


πŸ“š Documentation


🀝 Contributing

We welcome your pull requests and issues!


πŸ“ License

MIT License


Uniform.TS β€” a modern approach to working with web workers!

About

🏬 Replacement of all my web workers libraries. 🏬

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •