Skip to content

Commit

Permalink
feat(minor): improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
giladgd committed Feb 3, 2024
1 parent a657592 commit 481cfa0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
node-version: "18"
- name: Install modules
run: npm ci
- name: Run vite tests
- name: Run vitest tests
run: npm run test:vitest -- --coverage --reporter=junit
- name: Upload coverage
uses: codecov/codecov-action@v2
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ console.log("lock acquired");
activeLock.dispose();
```

### `waitForLockRelease`
Wait for a lock to be released for a given `scope` and `key`.

```typescript
import {waitForLockRelease} from "lifecycle-utils";

const scope = {}; // can be a reference to any object you like

await waitForLockRelease(scope, "myKey");
console.log("lock is released");
```

### `EventRelay`
A simple event relay.

Expand Down

0 comments on commit 481cfa0

Please sign in to comment.