Skip to content
okdaichiPublic

About

Go-style synchronization primitives for JavaScript/TypeScript

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

119 Commits

Folders and files

Repository files navigation

golikejs

License: MIT

Reimplementation of Go's concurrency and utility primitives for JavaScript and TypeScript runtimes.

golikejs is a library that brings familiar Go designs to JavaScript and TypeScript. It aims to provide practical API compatibility with Go’s standard library and offers Go-style implementations such as concurrency primitives and I/O utilities.

Packages

  • sync — Synchronization primitives for concurrent programs.
  • context — Context utilities for cancellation and timeouts.
  • bytes — Byte-slice helpers and buffer utilities.
  • io — I/O primitives and small helpers.

Installation

Package Manager Command
Deno deno add jsr:@okdaichi/golikejs
npm npx jsr add @okdaichi/golikejs
pnpm pnpm i jsr:@okdaichi/golikejs
Bun bunx jsr add @okdaichi/golikejs
yarn yarn add jsr:@okdaichi/golikejs
vlt vlt install jsr:@okdaichi/golikejs

Quick Start

import { Mutex } from 'jsr:@okdaichi/golikejs/sync';

const m = new Mutex();
await m.lock();
try {
  // critical section
} finally {
  m.unlock();
}

For detailed examples and API documentation, see the individual package READMEs.

Development

This project uses Deno for development and testing.

Prerequisites

Commands

Task Command
Test deno task test
Test with coverage deno task test:coverage
Format code deno task fmt
Lint code deno task lint
Type check deno task check

Contributing

See CONTRIBUTING.md for guidelines.

License

See LICENSE for details.

About

Go-style synchronization primitives for JavaScript/TypeScript

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages