# atma-io-middleware-base

> Atma IO middleware abstraction

Latest version **1.0.51** (published 2024-07-16) · 0 weekly downloads

## Install

```sh
npm install atma-io-middleware-base
pnpm add atma-io-middleware-base
yarn add atma-io-middleware-base
bun add atma-io-middleware-base
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.51 |
| Published | 2024-07-16 |
| First published | 2017-07-03 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 55 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexander Kit |
| Maintainers | tenbits |

## Links

- npm: https://www.npmjs.com/package/atma-io-middleware-base
- Repository: https://github.com/tenbits/atma-io-middleware-base
- Issues: https://github.com/tenbits/atma-io-middleware-base/issues
- npm.io page: https://npm.io/package/atma-io-middleware-base

## Dependencies (3)

- [appcfg](https://npm.io/package/appcfg.md) >=0.4.58
- [assertion](https://npm.io/package/assertion.md) ^1.3.34
- [atma-utils](https://npm.io/package/atma-utils.md) ^0.1.13

## Recent versions

- 1.0.51 (latest) — 2024-07-16
- 1.0.50 — 2024-07-16
- 1.0.49 — 2024-06-19
- 1.0.48 — 2024-06-19
- 1.0.47 — 2024-06-15
- 1.0.46 — 2022-03-08
- 1.0.45 — 2022-01-31
- 1.0.44 — 2022-01-24
- 1.0.43 — 2021-10-06
- 1.0.42 — 2021-05-31
- 1.0.41 — 2020-02-23
- 1.0.39 — 2019-11-21
- 1.0.38 — 2019-06-13
- 1.0.37 — 2018-11-13
- 1.0.35 — 2018-11-06
- … 27 more at https://npm.io/package/atma-io-middleware-base/versions

## README

Atma IO Middleware Abstraction
-----

Helper util to create atma-io middlewares

Extends:

- [`atma-io`](https://github.com/atmajs/atma-io) with a custom middleware to read/compile/preprocess files

For usage examples refer to:
- [atma-io-middleware-eslint](https://github.com/tenbits/atma-io-middleware-eslint)

#### API

###### create
```javascript
var { create } = require('atma-io-middleware-base');
create({
    name: 'my-super-middleware',
    process (content: string, filename: string, options: string) {
        return { content: string, sourceMap: string };
    }
    processAsync (content: string, filename: string, options: string) {
        return Promise.resolve({content: string, sourceMap: string});
    }
})
```

`options` can be extended then via `package.json`. Example:
```json
{

    "settings": {
        "%middleware-name%": {
            "foo": "baz"
        }
    }

}

```

----
_ 2017 (c) MIT License - Atma.js Project_

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