# asclasit

> ASync CLasses + ASync ITerators

Latest version **0.1.8** (published 2022-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install asclasit
pnpm add asclasit
yarn add asclasit
bun add asclasit
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2022-02-21 |
| First published | 2021-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 357.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Taras Mykhailovych |
| Maintainers | tarquas |
| Keywords | async, class, iterator, algorithm, framework, imperative, oop, iterative, thin |

## Links

- npm: https://www.npmjs.com/package/asclasit
- Repository: https://github.com/tarquas/asclasit
- Homepage: https://github.com/tarquas/asclasit#readme
- Issues: https://github.com/tarquas/asclasit/issues
- npm.io page: https://npm.io/package/asclasit

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 0.1.8 (latest) — 2022-02-21
- 0.1.7 — 2021-11-08
- 0.1.6 — 2021-10-20
- 0.1.5 — 2021-10-07
- 0.1.4 — 2021-10-07
- 0.1.3 — 2021-09-23
- 0.1.2 — 2021-09-16
- 0.1.1 — 2021-09-15
- 0.1.0 — 2021-09-10

## README

# asclasit
ASync CLasses + ASync ITerators

# Description
This is public-ready spin off from related internal experiments of [ClAsync](https://github.com/tarquas/clasync).
Advantages of this module:
- 100% test coverage;
- More project files, less file sizes;
- Thin: has no external dependency modules, only core essentials taken from `ClAsync` and improved;
- Utilizes up-to-date Node.js features;
- Targetting serverless/stateless environments;
- Despite the missing documentation, test cases describe the usage.

## Differences
There are architectural differences listed below:

### Async Classes
| Item        |  `ClAsync` |  `AsClAsIt` |
|-------------|------------|-------------|
| Instance co-op | Dependency tree | State isolation |
| Life cycle  | Once (`init`->`final`) | Muplitle (...->`wake`->`sleep`->...) |
| Lifetime Methods | `init()`, `final()` | (Async) Generator `*[$]()` depicting whole lifetime |
| Instance state | Non-configurable `[$.inst]` | Configurable `[$]` via `static [$]`: options object or custom `$.Inst` subclass |
| Async Events      | Special class (`emitter.js`) | Automatic for each instance; methods of instance state `[$]` |
| Instance Shutdown | Supported (via `final`) | Not supported (global shutdown handler only for non-stateless environments) |

### (Async) Iterators
| Item        |  `ClAsync` |  `AsClAsIt` |
|-------------|------------|-------------|
| Helpers     | Functions: `$.<name>[Iter\|Async](it, ...)` | Wrapped chain: `$[.Iter\|.AsIt\|](it).<name>(...).<name>(...)` |
| Extensible Classes | Not supported | Supported for sync (`$.Iter`) and async (`$.AsIt`) iterator classes |

## Testing
Tests and coverage powered by [Jest](https://jestjs.io/)

# Thanks
[Time Doctor](https://timedoctor.com/)

---
_Source: https://npm.io/package/asclasit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
