open-index/open-npm huggingface dataset:
npm package: @routine-js/table
Description: > Helps you request data to update the table
Author: lujs
Latest version: 1.0.4

# @routine-js/table

> Helps you request data to update the table

```typescript

import { AbsTableService, TablePresenter, TableServiceToken } from './index';

interface Row {
  name: string;
}
interface Params {
  name: string;
}
class MyService extends AbsTableService<Row, Params> {
  fetchTable(
    params: Partial<Params> & { current: number; pageSize: number },
  ): Promise<{
    data: Row[];
    current: number;
    pageSize: number;
    total: number;
  }> {
    const res = {
      data: [{ name: 'aloha' }],
      current: 1,
      pageSize: 1,
      total: 1,
    };
    return new Promise((resolve) => {
      setTimeout(() => {
        resolve(res);
      }, 1000);
    });
  }
}


const Page = () => {
  const { presenter, state } = usePresenter<TablePresenter<Row, Params>>(
    TablePresenter,
    {
      registry: [{ token: TableServiceToken, useClass: MyService }],
    },
  );
  return (
    <div>
      <h1>table state</h1>
      <p>{JSON.stringify(state, null, 4)}</p>

      <button
        onClick={() => {
          presenter.getTable();
        }}
      >
        fetch table
      </button>
    </div>
  );
};
```
npm package: @routingjs/graphhopper
Description: RoutingJS GraphHopper Module
Author: Christian Beiwinkel
Latest version: 0.3.0

# RoutingJS: GraphHopper

Promise-based web client for the [GraphHopper routing engine](https://www.graphhopper.com).

## Example

```js
import { GraphHopper } from "@routingjs/graphhopper"

const gh = new GraphHopper({ apiKey: "my-api-key" }) // URL defaults to https://api.openrouteservice.org
gh.directions(
    [
        [8.512516, 47.380742],
        [8.557835, 47.359467],
    ],
    "car"
).then((d) => {
    // do stuff with the directions response
    d.directions.forEach((direction) => {
        console.log(direction.feature)
    })
})
```

## Installation

```
npm install @routingjs/graphhopper
```

---

This package is part of the [RoutingJS project](https://github.com/gis-ops/routingjs), which aims to provide consistent access to various vehicle routing APIs.
npm package: @routingjs/ors
Description: RoutingJS OpenRouteService Module
Author: Christian Beiwinkel
Latest version: 0.3.0

# RoutingJS: ORS

Promise-based web client for [OpenRouteService](https://openrouteservice.org).

## Example

```js
import { ORS } from "@routingjs/ors"

const ors = new ORS({ apiKey: "my-api-key" }) // URL defaults to https://api.openrouteservice.org
ors.directions(
    [
        [8.512516, 47.380742],
        [8.557835, 47.359467],
    ],
    "driving-car"
).then((d) => {
    // do stuff with the directions response
    d.directions.forEach((direction) => {
        console.log(direction.feature)
    })
})
```

## Installation

```
npm install @routingjs/ors
```

---

This package is part of the [RoutingJS project](https://github.com/gis-ops/routingjs), which aims to provide consistent access to various vehicle routing APIs.
npm package: @routingjs/osrm
Description: RoutingJS OSRM Module
Author: Christian Beiwinkel
Latest version: 0.3.0

# RoutingJS: OSRM

Promise-based web client for the [Open Source Routing Machine](https://project-osrm.org).

## Example

```js
import { OSRM } from "@routingjs/osrm"

const osrm = new OSRM() // URL defaults to https://routing.openstreetmap.de/routed-bike
osrm.directions([
    [8.512516, 47.380742],
    [8.557835, 47.359467],
]).then((d) => {
    // do stuff with the directions response
    d.directions.forEach((direction) => {
        console.log(direction.feature)
    })
})
```

## Installation

```
npm install @routingjs/osrm
```

---

This package is part of the [RoutingJS project](https://github.com/gis-ops/routingjs), which aims to provide consistent access to various vehicle routing APIs.
npm package: @routingjs/valhalla
Description: RoutingJS Valhalla Module
Author: Christian Beiwinkel
Latest version: 0.3.0

# RoutingJS: Valhalla

Promise-based web client for the [Valhalla Open Source Routing Engine](https://github.com/valhalla/valhalla).

## Example

```js
import { Valhalla } from "@routingjs/valhalla"

const v = new Valhalla() // URL defaults to http://valhalla1.openstreetmap.de
v.directions(
    [
        [8.512516, 47.380742],
        [8.557835, 47.359467],
    ],
    "auto"
).then((d) => {
    // do stuff with the directions response
    d.directions.forEach((direction) => {
        console.log(direction.feature)
    })
})
```

## Installation

```
npm install @routingjs/valhalla
```

---

This package is part of the [RoutingJS project](https://github.com/gis-ops/routingjs), which aims to provide consistent access to various vehicle routing APIs.
npm package: @routo/core
Description: Simple framework-agnostic router
Author: Timofey Dergachev
Latest version: 0.8.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

![routo](../../media/logo.svg)

# @routo/core

[![npm](https://flat.badgen.net/npm/v/@routo/core)](https://www.npmjs.com/package/@routo/core)
[![npm bundle size](https://flat.badgen.net/bundlephobia/minzip/@routo/core)](https://bundlephobia.com/result?p=@routo/core)
[![coverage](https://flat.badgen.net/codecov/c/github/exeto/routo)](https://codecov.io/gh/exeto/routo)
[![license](https://flat.badgen.net/github/license/exeto/routo)](LICENSE.md)

> Simple framework-agnostic router

## Install

```sh
yarn add @routo/core
```

## Usage

```js
import { createRouter } from '@routo/core';

const HOME = 'router/HOME';
const POST = 'router/POST';

const routes = [
  {
    id: HOME,
    path: '/',
  },
  {
    id: POST,
    path: '/posts/:id',
  },
];

const router = createRouter(routes);

const unsubscribe = router.subscribe((state) => console.log(state.pathname));

router.replace(POST, { params: { id: '42' } });
// /posts/42

unsubscribe();
```

## State

```js
{
  id: 'router/POST',
  pathname: '/posts/42',
  search: '',
  queryParams: {},
  action: 'PUSH',
  params: { id: '42' },
  prev: {
    id: 'router/HOME',
    pathname: '/',
    search: '',
    queryParams: {},
    action: null,
    params: {}
    prev: null,
  }
}
```

## License

[MIT](LICENSE.md) © [Timofey Dergachev](https://exeto.me)
npm package: @routo/link
Description: React Link component for @routo/core
Author: Timofey Dergachev
Latest version: 0.8.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

![routo](../../media/logo.svg)

# @routo/link

[![npm](https://flat.badgen.net/npm/v/@routo/link)](https://www.npmjs.com/package/@routo/link)
[![npm bundle size](https://flat.badgen.net/bundlephobia/minzip/@routo/link)](https://bundlephobia.com/result?p=@routo/link)
[![coverage](https://flat.badgen.net/codecov/c/github/exeto/routo)](https://codecov.io/gh/exeto/routo)
[![license](https://flat.badgen.net/github/license/exeto/routo)](LICENSE.md)

> React Link component for @routo/core

## Install

```sh
yarn add @routo/core @routo/react @routo/link
```

## Usage

The `Link` component must have access to the router context, see [@routo/react](/packages/react/README.md) for details.

```js
import { Link } from '@routo/link';

const Home = () => (
  <Link to="router/POST" params={{ id: '42' }}>
    Post #42
  </Link>
);
```

## Props

| Name            | Type                | Default | Description                                                                                |
| --------------- | ------------------- | ------- | ------------------------------------------------------------------------------------------ |
| to \*           | string              |         | Route ID.                                                                                  |
| params          | object              |         |                                                                                            |
| queryParams     | object              |         |                                                                                            |
| action          | 'push' \| 'replace' | 'push'  |                                                                                            |
| children        | node                |         | The content of the link.                                                                   |
| className       | string              |         | Applied to the root element.                                                               |
| activeClassName | string              |         | Applied to the root element when current url opened.                                       |
| component       | elementType         | 'a'     | The component used for the root node. Either a string to use a DOM element or a component. |
| onClick         | function            |         | Called after updating the current route.                                                   |

## License

[MIT](LICENSE.md) © [Timofey Dergachev](https://exeto.me)
npm package: @routo/react
Description: React bindings package for @routo/core
Author: Timofey Dergachev
Latest version: 0.8.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

![routo](../../media/logo.svg)

# @routo/react

[![npm](https://flat.badgen.net/npm/v/@routo/react)](https://www.npmjs.com/package/@routo/react)
[![npm bundle size](https://flat.badgen.net/bundlephobia/minzip/@routo/react)](https://bundlephobia.com/result?p=@routo/react)
[![coverage](https://flat.badgen.net/codecov/c/github/exeto/routo)](https://codecov.io/gh/exeto/routo)
[![license](https://flat.badgen.net/github/license/exeto/routo)](LICENSE.md)

> React bindings package for @routo/core

## Install

```sh
yarn add @routo/core @routo/react
```

## Usage

```js
import { createRouter, NOT_FOUND } from '@routo/core';
import { Provider, useRouterState } from '@routo/react';

const HOME = 'router/HOME';
const POST = 'router/POST';

const routes = [
  {
    id: HOME,
    path: '/',
  },
  {
    id: POST,
    path: '/posts/:id',
  },
];

const router = createRouter(routes);

const mapping = {
  [HOME]: () => 'Home',
  [POST]: () => 'Post',
  [NOT_FOUND]: () => 'Not Found',
};

const Router = () => {
  const state = useRouterState();
  const Component = mapping[state.id];

  return <Component />;
};

const Root = () => (
  <Provider router={router}>
    <Router />
  </Provider>
);
```

## License

[MIT](LICENSE.md) © [Timofey Dergachev](https://exeto.me)
npm package: @routo/redux
Description: Redux bindings package for @routo/core
Author: Timofey Dergachev
Latest version: 0.8.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

![routo](../../media/logo.svg)

# @routo/redux

[![npm](https://flat.badgen.net/npm/v/@routo/redux)](https://www.npmjs.com/package/@routo/redux)
[![npm bundle size](https://flat.badgen.net/bundlephobia/minzip/@routo/redux)](https://bundlephobia.com/result?p=@routo/redux)
[![coverage](https://flat.badgen.net/codecov/c/github/exeto/routo)](https://codecov.io/gh/exeto/routo)
[![license](https://flat.badgen.net/github/license/exeto/routo)](LICENSE.md)

> Redux bindings package for @routo/core

## Install

```sh
yarn add @routo/core @routo/redux
```

## Usage

```js
import React from 'react';
import { createStore, applyMiddleware, combineReducers } from 'redux';
import { Provider as ReduxProvider } from 'react-redux';
import { createRouter } from '@routo/core';
import {
  createReducer,
  createMiddleware,
  Provider as RoutoProvider,
} from '@routo/redux';

const routes = [
  {
    id: 'router/HOME',
    path: '/',
  },
  {
    id: 'router/POST',
    path: '/posts/:id',
  },
];

const router = createRouter(routes);

const rootReducer = combineReducers({
  router: createReducer(router),
});

const routoMiddleware = createMiddleware(router);
const middlewares = applyMiddleware(routoMiddleware);
const store = createStore(rootReducer, middlewares);

const Root = () => (
  <ReduxProvider store={store}>
    <RoutoProvider router={router}>
      <App />
    </RoutoProvider>
  </ReduxProvider>
);
```

## License

[MIT](LICENSE.md) © [Timofey Dergachev](https://exeto.me)
npm package: @routup/core
Description: Plugin for request & response handling.
Author: Peter Placzek
Latest version: 0.8.2

# @routup/core

[![npm version](https://badge.fury.io/js/@routup%2Fcore.svg)](https://badge.fury.io/js/@routup%2Fcore)
[![main](https://github.com/Tada5hi/routup/actions/workflows/main.yml/badge.svg)](https://github.com/Tada5hi/routup/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/tada5hi/routup/branch/master/graph/badge.svg?token=QFGCsHRUax)](https://codecov.io/gh/tada5hi/routup)
[![Known Vulnerabilities](https://snyk.io/test/github/Tada5hi/routup/badge.svg)](https://snyk.io/test/github/Tada5hi/routup)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)

This is the core module of routup.
It contains:
- request- & response-helpers
- types & interfaces
- utilities (etag, proxy, ...)

**Table of Contents**

- [Installation](#installation)
- [Documentation](#documentation)
- [License](#license)

## Installation

```bash
npm install @routup/core --save
```

## Documentation

To read the docs, visit [https://routup.net](https://routup.net)


## License

Made with 💚

Published under [MIT License](./LICENSE).