simple-web-locks
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

🔐 simple-web-locks

A single threaded implementation of Web Locks API. Works across runtimes (Browser, Deno, Node).

Status

This package is 🚧 work-in-progress so the API is not fully implemented:

  • [ ] locks.request()
    • [x] "exclusive" locks
    • [ ] "shared" locks
    • [x] options.signal
    • [ ] options.ifAvailable
    • [ ] options.steal
  • [ ] locks.query()

Usage

Browser

import { locks } from "https://jspm.dev/simple-web-locks/mod.js"
// or
import { locks } from "https://deno.land/x/simple_web_locks/mod.js"

Deno

import { locks } from "https://deno.land/x/simple_web_locks/mod.ts"

Node

import { locks } from "simple-web-locks"

Documentation

For the documentation please refer to the MDN article.

Contributing

This project uses Deno and TypeScript as a development toolchain.

Tests

deno test

Build JS

yarn build

Readme

Keywords

none

Package Sidebar

Install

npm i simple-web-locks

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

27.1 kB

Total Files

15

Last publish

Collaborators

  • vovacodes