open-index/open-npm huggingface dataset:
npm package: @marbec/web-auto-extractor
Description: Automatically extracts structured information from webpages
Latest version: 2.2.1

# Web Auto Extractor 2.0

![GitHub License](https://img.shields.io/github/license/herzog31/web-auto-extractor)
[![CI](https://github.com/herzog31/web-auto-extractor/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/herzog31/web-auto-extractor/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/%40marbec%2Fweb-auto-extractor?link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40marbec%2Fweb-auto-extractor)](https://www.npmjs.com/package/@marbec/web-auto-extractor)
![Node Current](https://img.shields.io/node/v/%40marbec%2Fweb-auto-extractor)

> This project is a fork of [indix/web-auto-extractor](https://github.com/indix/web-auto-extractor).

Parse semantically structured information from any HTML webpage.

**Supported formats:**

- Encodings that support [Schema.org](http://schema.org/) vocabularies:
  - Microdata
  - RDFa-lite
  - JSON-LD
- Meta tags
- Heading tags

Popularly, many websites mark up their webpages with Schema.org vocabularies for better SEO. This library helps you parse that information to JSON.

## Installation

`npm i --save @marbec/web-auto-extractor`

## [Usage](#usage)

```js
import WebAutoExtractor from '@marbec/web-auto-extractor';

const parsed = new WebAutoExtractor({
  // Add location information to the root elements in the parsed data.
  // Location is stored as start,end offset values in the @location property.
  addLocation: false,

  // Embed the source HTML in the root elements in the parsed data using the @source property.
  // This property is either a boolean to embed sources for all data types or an array of data types to embed sources for.
  embedSource: false,

  // Skip headings with empty or whitespace-only text content.
  // When true, headings like <h1></h1> or <h2>   </h2> will be excluded from results.
  skipEmptyHeadings: false,

  // Skip headings that are inside layout elements (header, footer, nav, aside).
  // When true, headings within these semantic layout containers will be excluded from results.
  // The isLayoutElement field is only included when this option is false.
  skipLayoutElements: false,
}).parse(sampleHTML);

// Output format
/* {
    "metatags": {},
    "microdata": {},
    "rdfa": {},
    "jsonld": {},
    "headings": {}
} */
```

### Browser

You can run the parser directly in the browser on any website using the following commands:

```js
const { default: WebAutoExtractor } = await import(
  'https://unpkg.com/@marbec/web-auto-extractor@latest/dist/index.js'
);
new WebAutoExtractor().parse(document.documentElement.outerHTML);
```

### Examples

See test cases for sample in- and outputs.
npm package: @marbey/patternparser
Description: A command parser with an incredibly simple setup.
Author: Zavid van den Worm
Latest version: 1.1.1


# Pattern Parser

An uncomplicated CLI-style command parser with built-in typechecking and validation.



## Installation

Install patternparser with npm

```bash
  npm i @marbey/patternparser
```

## Usage/Examples

```typescript
import {CommandParser} from "@marbey/patternparser";

const processor = new CommandParser();

processor.addCommand({
    pattern: "use [itemName:string] [quantity:int]",
    handle: (itemName: string, quantity: number) => {
        console.log(`You used ${quantity} of your ${itemName}s.`);
    }
})

await processor.process("use apple 3")

// You used 3 of your apples.
```

Parameters are automatically type-checked and validated. ```[itemName:string]``` will always be a string and ```[quantity:int]``` will always be an integer (and not a float).

## Adding custom argument parsers

To add a custom parser, you simply create a Parser object and pass it to the CommandParser constructor.

```typescript
import {CommandParser, Parser} from "@marbey/patternparser";

type VeryCustomUser = {
    userName: string;
}

const customParser: Parser = {
    name: "customUser",
    checker: (input: string) => input.startsWith("$"), // this is used when validating the user input.
    ensurer: (input: string): VeryCustomUser => { // this provides the correct form to the handle function.
        return {userName: input.substring(1)}
    }
}

const processor = new CommandParser([customParser]);

processor.addCommand({
    pattern: "message [user:customUser] [message:string]",
    handle: (user: VeryCustomUser, message:string) => {
        console.log(`Sent message ${message} to ${user.userName}`);
    }
})

processor.process("message $bobby Hi!").then()

// Sent message Hi! to bobby
```
npm package: @marbit/themes
Description: <h2 align="center">   <img height="256" width="256" src="./src/assets/preact.svg"> </h2>
Author: Marbit
Latest version: 0.0.17
Deprecated: Removed

# `create-preact`

<h2 align="center">
  <img height="256" width="256" src="./src/assets/preact.svg">
</h2>

<h3 align="center">Get started using Preact and Vite!</h3>

## Getting Started

-   `npm run dev` - Starts a dev server at http://localhost:5173/

-   `npm run build` - Builds for production, emitting to `dist/`

-   `npm run preview` - Starts a server at http://localhost:4173/ to test production build locally
npm package: @marble-seeds/api
Description: ## Install with
Author: Siedrix
Latest version: 0.4.4

## Marble seeds api

## Install with

```
npm i @marble-seeds/api
```

## Docs

#### Server

To create a server do
```
const { server } = require('marble-api')
const routers = require('./routers')

const apiPort = 3000
const app = server()

routers.add(app)

app.listen(apiPort)
console.log(`Api started: <${apiPort}>`)
```

This server is a config version of Koa

#### Routers

To create a router/route do

```
const { Router, Route } = require('marble-api')

const status = new Route({
  method: 'get',
  path: '/',
  handler: async function (ctx) {
    ctx.body = {
      success: true,
      requested: new Date()
    }
  }
})

module.exports = new Router({
  routes: [status],
  prefix: '/status'
})
```

To have multiple routers on you app do

```
const { Router } = require('marble-api')

const status = require('./status')
const webhooks = require('./webhooks')

const routers = new Router({
  routes: [status, webhooks],
  prefix: '/api'
})

module.exports = routers
```


#### To-Dos

- Refactor clone on router.js and forEach on route.js to remove lodash dependency
- Remove any type
- Add test for plug task
- Add test for nested routers
- Refactor to remove _isRoute and _isRouter.
npm package: @marble-seeds/runner
Description: ## Install with
Author: Siedrix
Latest version: 0.1.3

## Marble seeds Ttask-runner

## Install with

```
npm i @marble-seeds/task-runner
```

## Docs

After clone do

```
import { TaskRunner } from '@marble-seeds/task-runner'

import { fetchJSON } from './tasks/fetch-json'
import { parseEmail } from './tasks/parse-email'

const runner = new TaskRunner()

runner.setTapeFolder('./logs')
runner.load('fetch-json', fetchJSON)
runner.load('parse-email', parseEmail)

export { runner }
```

To get a new history, then point to the correct package

```
git remote set-url origin [Git repo]
```

Update the `package.json` file with the new name of you module and its repo

Then remove this part and write the docs of your package
npm package: @marble-seeds/seeds
Description: ## Install with
Author: Siedrix
Latest version: 0.1.5

## Marble seeds cli

## Install with

Then install

```
npm i -g @marble-seeds/seeds
```

And do

```
seeds init
```

This will create a seeds.json on your app that will be used to describe your runners and record tape logic.

## Develop flow Docs

After clone do

```
npm link
```

This will create a seeds command on you system. To unlink do

```
npm uninstall -g @marble-seeds/seeds
```

To run test

```
npm run test
```
npm package: @marble-seeds/task
Description: ## Install with
Author: Siedrix
Latest version: 1.0.0-rc.8

## Marble seeds Tasks module

## Install with

```
npm i @marble-seeds/@marble-seeds/tasks
```

## Docs

In your tasks folder create your file with

```
const Task = require('@marble-seeds/tasks')

const task = new Task(async function (argv) {
  console.log(argv)

  return { foo: true }
})

if (require.main === module) {
  task.setCliHandlers()
  task.run()
} else {
  module.exports = task
}
```

The last part will allow you to call it as a CLI or be loaded on your app and run as part of you app

## Task philosophy

Task are small units of logic that should be repetable and composable.

Task to be able have repetable tasks, we need to care about 2 concepts:
- *Input/Output*: To handle the inputs and outputs of a task in a easy way, task are build to be black boxes.
- *Boundaries of the box*

By carring about this elements logs test of task can be created by recording the 3 elements and then replay them.

### boundary

To be able to treat task as black boxes, all the interactions to fetch data, save elements need to be moved to boundaries.

```
const task = new Task(async function (argv, { getData }) {
  const data = async getData()
  console.log(argv, data)

  return { ...data, ...argv }
}, {
  boundaries : {
    getData: async () => {
      // someting
      return data
    }
  }
})
```

By defining bounderies in this form, we can record the interactions from the task with other elements allowing to track them and mock them.

Boundary have 4 modes:

- Proxy: execute the function and records it
- Proxy-pass: review if the input exist, it it exist returns the previous value and if not execute the functions
- Proxy-catch: executes the function and if it throws and error, it tries to use a previews output if it exists for the input.
- Replay: review if the input exist and if it doesnt throws and error.

With this modes bounderies can be used as cache or to generate test by passing the data to a RecordTape to re-run the calls.

## Task API

### constructor

Takes a task action(function) and a timeout as params.

### run

Runs the task action asynchronously. Takes the function arguments and a config object with a timeout option.

### setCliHandlers

Lets the taks that it will run as a CLI program.


# ToDos

- CLI run test and argv handler
- Document boundaries
npm package: @marble-seeds/task-runner
Description: ## Install with
Author: Siedrix
Latest version: 0.1.1

## Marble seeds Ttask-runner

## Install with

```
npm i @marble-seeds/task-runner
```

## Docs

After clone do

```
import { TaskRunner } from '@marble-seeds/task-runner'

import { fetchJSON } from './tasks/fetch-json'
import { parseEmail } from './tasks/parse-email'

const runner = new TaskRunner()

runner.setTapeFolder('./logs')
runner.load('fetch-json', fetchJSON)
runner.load('parse-email', parseEmail)

export { runner }
```

To get a new history, then point to the correct package

```
git remote set-url origin [Git repo]
```

Update the `package.json` file with the new name of you module and its repo

Then remove this part and write the docs of your package
npm package: @marblecodes/bunyan-elegant
Description: Good looking Bunyan logs
Author: Bram Monstrey
Latest version: 1.0.0

# Bunyan elegant

Opinionated elegant logs for bunyan.

## Example

```typescript
import BunyanElegant from '@marblecodes/bunyan-elegant'
import bunyan from 'bunyan'

const elegantStream = new BunyanElegant()
elegantStream.pipe(process.stdout)

const logger = bunyan.createLogger({
  name: 'application',
  stream: elegantStream,
  level: 'debug',
})

logger.info({ date: Date.now() }, 'Service started up')
logger.warn(
  { veryComplexObject: { user: { permissions: ['FOOBAR', 'LOREM'], isActive: true } } },
  'Throttling API call for user',
)

const err = new Error('Something wrong happened')
logger.error({ err }, 'Encountered error')

logger.debug('Doing graceful shutdown')
```

![Example](./screenshot.png)

## Default configuration

```typescript
const config: BunyanElegantConfig = {
  timestampFormat: 'HH:mm:ss',
  colors: {
    trace: '#A9A9A9',
    debug: '#808080',
    info: '#00FFFF',
    warn: '#FFA500',
    error: '#FF0000',
    fatal: '#FF0000',
  },
}

const stream = new BunyanElegant(config)
```

## License

MIT
npm package: @marblecore/tslint-configuration
Description: Contains the TSLint configuration in line with our coding style guide.
Author: Mark van den Brink
Latest version: 6.1.3

[![version](https://img.shields.io/npm/v/@marblecore/tslint-configuration.svg)](https://npm.im/@marblecore/tslint-configuration)
[![license](https://img.shields.io/npm/l/@marblecore/tslint-configuration.svg)](https://npm.im/@marblecore/tslint-configuration)
[![downloads](https://img.shields.io/npm/dt/@marblecore/tslint-configuration.svg)](https://npm.im/@marblecore/tslint-configuration)

# TSLint Configuration
This project contains the [TSLint](http://palantir.github.io/tslint/) configuration template which is in line with our [coding style guide](https://gitlab.com/marblecore/coding-style-guide). A full list of all rules can be found [here](http://palantir.github.io/tslint/rules/).

The version of this package indicates the minimal required version of [TSLint](http://palantir.github.io/tslint/).

## Usage
1. Add this package to your project:
    ```bash
    # From npm
    npm install @marblecore/tslint-configuration --save-dev

    # From repository
    npm install git+ssh://git@gitlab.com:marblecore/tslint-configuration.git --save-dev
    ```

2. Install [TSLint](http://palantir.github.io/tslint/) to your project:
    ```bash
    npm install tslint --save-dev
    ```

3. Create a file `tslint.json` at the root of your project and insert the following code:
    ```json
    {
        "extends": "@marblecore/tslint-configuration"
    }
    ```

4. Execute linter:
    ```bash
    tslint -c tslint.json file.ts
    ```
npm package: @marblejs-contrib/middleware-joi
Description: A joi validation middleware for Marble.js
Author: Lúcio Rubens
Latest version: 1.0.0

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs-contrib/middleware-joi



A [joi](https://github.com/hapijs/joi) validation middleware for [Marble.js](https://github.com/marblejs/marble).

## Deprecation

`@marblejs/middleware-joi` is deprecated since v2.0.
Please use `@marblejs/middlware-io` instead.

## Installation

```
$ npm i @marblejs-contrib/middleware-joi
```
Requires `@marblejs/core` to be installed.

## Documentation

For the latest updates, documentation, change log, and release information visit [docs.marblejs.com](https://docs.marblejs.com) and follow [@marble_js](https://twitter.com/marble_js) on Twitter.

## Usage

Example of using this middleware on a GET route to validate params.

```typescript
import { validator$, Joi } from '@marblejs-contrib/middleware-joi';

const foo$ = r.pipe(
  r.matchPath('/foo/:id'),
  r.matchType('GET'),
  r.useEffect(req$ => req$.pipe(
    use(validator$({
      params: Joi.object({
        id: Joi.number().min(1).max(10),
      })
    }));
    // ...
  )));
```

Example to validate all incoming requests.

```typescript
import { validator$, Joi } from '@marblejs-contrib/middleware-joi';

const middlewares = [
  logger$,
  validator$({
    headers: Joi.object({
      sign: Joi.string(),
      accept: Joi.string().default('application/json'),
    }),
    params: Joi.object({
      apiKey: Joi.string().token().required(),
    })
  })
];

const effects = [
  endpoint1$,
  endpoint2$,
  ...
];

const app = httpListener({ middlewares, effects });
```

License: MIT
npm package: @marblejs-contrib/middleware-jwt
Description: JWT middleware for Marble.js
Author: marblejs
Latest version: 1.0.1

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs-contrib/middleware-jwt

A [JWT](http://jwt.io) middleware for [Marble.js](https://github.com/marblejs/marble).

## Installation

```
$ npm i @marblejs-contrib/middleware-jwt
```
Requires `@marblejs/core` and `@marblejs/http` to be installed.

## Usage

**Generate token:**
```typescript
import { r } from '@marblejs/http';
import { generateToken } from '@marblejs-contrib/middleware-jwt';
import { SECRET_KEY } from './config';

const login$ = r.pipe(
  r.matchPath('/login'),
  r.matchType('POST'),
  r.useEffect(req$ => req$.pipe(
    //
    map(payload => generateToken({ secret: SECRET_KEY })(payload)), 👈
    // ...
  )));
```

**Validate payload:**
```typescript
import { pipe } from 'fp-ts/lib/function';

const verifyPayload$ = (payload: { id: string }) =>
  pipe(
    UserRepository.findById(payload.id),  // the repository can throw an error if not found or...
    catchError(/* ... */)                 // the `verifyPayload$` can throw it explicitly
  );
```

**Validate routes:**
```typescript
import { r } from '@marblejs/http';
import { authorize$ } from '@marblejs-contrib/middleware-jwt';
import { SECRET_KEY } from './config';

const getUsers$ = r.pipe(
  r.matchPath('/'),
  r.matchType('GET'),
  r.useEffect(req$ => req$.pipe(
    // ...
  )));

const user$ = combineRoutes('/user', {
  effects: [
    getUsers$
  ],
  middlewares: [
    authorize$({ secret: SECRET_KEY }, validatePayload$) 👈
  ],
});
```
License: MIT
npm package: @marblejs/http
Description: HTTP module for Marble.js
Author: marblejs
Latest version: 4.1.0

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs/http

A HTTP module for [Marble.js](https://github.com/marblejs/marble).

## Installation

```
$ npm i @marblejs/http
```
Requires `@marblejs/core`, `rxjs` and `fp-ts` to be installed.

## Documentation

For the latest updates, documentation, change log, and release information visit [docs.marblejs.com](https://docs.marblejs.com) and follow [@marble_js](https://twitter.com/marble_js) on Twitter.

License: MIT
npm package: @marblejs/messaging
Description: Messaging module for Marble.js
Author: Józef Flakus
Latest version: 4.1.0

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs/messaging

A messaging module for [Marble.js](https://github.com/marblejs/marble).

## Installation

```
$ npm i @marblejs/messaging
```
Requires `@marblejs/core`, `rxjs` and `fp-ts` to be installed.

## Documentation

For the latest updates, documentation, change log, and release information visit [docs.marblejs.com](https://docs.marblejs.com) and follow [@marble_js](https://twitter.com/marble_js) on Twitter.


License: MIT
npm package: @marblejs/middleware-body
Description: Body parser middleware for Marble.js
Author: marblejs
Latest version: 4.1.0

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs/middleware-body

A request body parser middleware for [Marble.js](https://github.com/marblejs/marble).

## Installation

```
$ npm i @marblejs/middleware-body
```
Requires `@marblejs/core` and `@marblejs/http`  to be installed.

## Documentation

For the latest updates, documentation, change log, and release information visit [docs.marblejs.com](https://docs.marblejs.com) and follow [@marble_js](https://twitter.com/marble_js) on Twitter.

## Usage

```typescript
import { bodyParser$ } from '@marblejs/middleware-body';
​
const middlewares = [
  bodyParser$(),
  // ...
];
​
const effects = [
  // ...
];
​
export const app = httpListener({ middlewares, effects });
```
License: MIT
npm package: @marblejs/middleware-cors
Description: A CORS middleware for Marble.js
Author: Edouard Bozon
Latest version: 4.1.0

Middleware CORS
=======

A CORS middleware for [Marble.js](https://github.com/marblejs/marble).

## Usage

Example to allow incoming requests.

```typescript
import { cors$ } from '@marblejs/middleware-cors';

const middlewares = [
  logger$,
  cors$({
    origin: '*',
    methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
    optionsSuccessStatus: 204,
    allowHeaders: '*',
    maxAge: 3600,
  })
];

const effects = [
  endpoint1$,
  endpoint2$,
  ...
];

const app = httpListener({ middlewares, effects });
```

## Available options

To configure CORS middleware you can follow this interface.

```typescript
interface CORSOptions {
  origin?: string | string[] | RegExp;
  methods?: HttpMethod[];
  optionsSuccessStatus?: HttpStatus;
  allowHeaders?: string | string[];
  exposeHeaders?: string[];
  withCredentials?: boolean;
  maxAge?: number;
}
```

License: MIT
npm package: @marblejs/middleware-io
Description: IO middleware for Marble.js
Author: marblejs
Latest version: 4.1.0

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs/middleware-io

IO validation middleware for Marble.js for [Marble.js](https://github.com/marblejs/marble).

## Installation

```
$ npm i @marblejs/middleware-io
```
Requires `@marblejs/core` to be installed.

## Documentation

For the latest updates, documentation, change log, and release information visit [docs.marblejs.com](https://docs.marblejs.com) and follow [@marble_js](https://twitter.com/marble_js) on Twitter.

## Usage

```typescript
import { r } from '@marblejs/http';
import { requestValidator$, t } from '@marblejs/middleware-io';

const userSchema = t.type({
  id: t.string,
  firstName: t.string,
  lastName: t.string,
  roles: t.array(t.union([
    t.literal('ADMIN'),
    t.literal('GUEST'),
  ])),
});

type User = t.TypeOf<typeof userSchema>;

const effect$ = r.pipe(
  r.matchPath('/'),
  r.matchType('POST'),
  r.useEffect(req$ => req$.pipe(
    requestValidator$({ body: userSchema }),
    // ..
  )));
```
License: MIT
npm package: @marblejs/middleware-joi
Description: A joi validation middleware for Marble.js
Author: Lúcio Rubens
Latest version: 3.5.2

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs/middleware-joi



A [joi](https://github.com/hapijs/joi) validation middleware for [Marble.js](https://github.com/marblejs/marble).

## Deprecation

`@marblejs/middleware-joi` is deprecated since v2.0.
Please use `@marblejs/middlware-io` instead.

## Installation

```
$ npm i @marblejs/middleware-joi
```
Requires `@marblejs/core` to be installed.

## Documentation

For the latest updates, documentation, change log, and release information visit [docs.marblejs.com](https://docs.marblejs.com) and follow [@marble_js](https://twitter.com/marble_js) on Twitter.

## Usage

Example of using this middleware on a GET route to validate params.

```typescript
import { validator$, Joi } from '@marblejs/middleware-joi';

const foo$ = r.pipe(
  r.matchPath('/foo/:id'),
  r.matchType('GET'),
  r.useEffect(req$ => req$.pipe(
    use(validator$({
      params: Joi.object({
        id: Joi.number().min(1).max(10),
      })
    }));
    // ...
  )));
```

Example to validate all incoming requests.

```typescript
import { validator$, Joi } from '@marblejs/middleware-joi';

const middlewares = [
  logger$,
  validator$({
    headers: Joi.object({
      sign: Joi.string(),
      accept: Joi.string().default('application/json'),
    }),
    params: Joi.object({
      apiKey: Joi.string().token().required(),
    })
  })
];

const effects = [
  endpoint1$,
  endpoint2$,
  ...
];

const app = httpListener({ middlewares, effects });
```

License: MIT
npm package: @marblejs/middleware-jwt
Description: JWT middleware for Marble.js
Author: marblejs
Latest version: 3.5.2

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs/middleware-jwt

A [JWT](http://jwt.io) middleware for [Marble.js](https://github.com/marblejs/marble).

## Installation

```
$ npm i @marblejs/middleware-jwt
```
Requires `@marblejs/core` to be installed.

## Usage

**Generate token:**
```typescript
import { EffectFactory } from '@marblejs/core';
import { generateToken } from '@marblejs/middleware-jwt';
import { SECRET_KEY } from './config';

const login$ = EffectFactory
  .matchPath('/login')
  .matchType('POST')
  .use(req$ => req$.pipe(
    //
    map(payload => generateToken({ secret: SECRET_KEY })(payload)), 👈
    // ...
  ));
```

**Validate payload:**
```typescript
const verifyPayload$ = (payload: { id: string }) =>
  of(payload).pipe(
    map(payload => payload.id),
    flatMap(UserRepository.findById),  // the repository can throw an error if not found or...
    catchError(/* ... */)              // the `verifyPayload$` can throw it explicitly
  );
```

**Validate routes:**
```typescript
import { r } from '@marblejs/core';
import { authorize$ } from '@marblejs/middleware-jwt';
import { SECRET_KEY } from './config';

const getUsers$ = r.pipe(
  r.matchPath('/'),
  r.matchType('GET'),
  r.useEffect(req$ => req$.pipe(
    // ...
  )));

const user$ = combineRoutes('/user', {
  effects: [
    getUsers$
  ],
  middlewares: [
    authorize$({ secret: SECRET_KEY }, validatePayload$) 👈
  ],
});
```
License: MIT
npm package: @marblejs/middleware-logger
Description: Logger middleware for Marble.js
Author: marblejs
Latest version: 4.1.0

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs/middleware-logger

A logger middleware for [Marble.js](https://github.com/marblejs/marble).

## Installation

```
$ npm i @marblejs/middleware-logger
```
Requires `@marblejs/core` and `@marblejs/http` to be installed.

## Documentation

For the latest updates, documentation, change log, and release information visit [docs.marblejs.com](https://docs.marblejs.com) and follow [@marble_js](https://twitter.com/marble_js) on Twitter.

## Usage

```typescript
import { logger$ } from '@marblejs/middleware-logger';

const middlewares = [
  logger$(),
  ...
];

const effects = [
  ...
];

export const app = httpListener({ middlewares, effects });
```
License: MIT
npm package: @marblejs/testing
Description: Testing module for Marble.js
Author: Józef Flakus
Latest version: 4.1.0

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs/testing

A testing module for [Marble.js](https://github.com/marblejs/marble).

## Installation

```
$ npm i @marblejs/testing
```
Requires `@marblejs/core`, `@marblejs/http`, `@marblejs/messaging`, `@marblejs/websockets`, `fp-ts` and `rxjs` to be installed.

## Documentation

For the latest updates, documentation, change log, and release information visit [docs.marblejs.com](https://docs.marblejs.com) and follow [@marble_js](https://twitter.com/marble_js) on Twitter.
npm package: @marblejs/websockets
Description: Websockets module for Marble.js
Author: Józef Flakus
Latest version: 4.1.0

<p align="center">
  <a href="https://marblejs.com">
    <img src="https://github.com/marblejs/marble/blob/master/assets/img/logo.png?raw=true" width="200" alt="Marble.js logo"/>
  </a>
</p>

# @marblejs/websockets

A WebSockets module for [Marble.js](https://github.com/marblejs/marble).

## Installation

```
$ npm i @marblejs/websockets
```
Requires `@marblejs/core`, `rxjs` and `fp-ts` to be installed.

## Documentation

For the latest updates, documentation, change log, and release information visit [docs.marblejs.com](https://docs.marblejs.com) and follow [@marble_js](https://twitter.com/marble_js) on Twitter.

License: MIT