# @dashingli/plugins-electron-router

> Types and Typescript shared library

Latest version **1.1.6** (published 2021-08-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dashingli/plugins-electron-router
pnpm add @dashingli/plugins-electron-router
yarn add @dashingli/plugins-electron-router
bun add @dashingli/plugins-electron-router
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2021-08-23 |
| First published | 2021-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dashingli |
| Maintainers | dashingli |
| Keywords | router, electron |

## Links

- npm: https://www.npmjs.com/package/@dashingli/plugins-electron-router
- npm.io page: https://npm.io/package/@dashingli/plugins-electron-router

## Dependencies (1)

- [@dashingli/plugins-electron-router](https://npm.io/package/@dashingli/plugins-electron-router.md) workspace:1.1.x

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 1.1.6 (latest) — 2021-08-23
- 1.1.5 — 2021-08-23
- 1.1.4 — 2021-08-23
- 1.1.3 — 2021-08-23
- 1.1.2 — 2021-08-23
- 1.1.1 — 2021-08-23
- 1.1.0 — 2021-08-23
- 1.0.2 — 2021-08-23
- 1.0.1 — 2021-08-23
- 1.0.0 — 2021-08-23

## README

## electron-router
![LICENSE](https://img.shields.io/github/license/cyyjs/electron-router)
![npm (scoped)](https://img.shields.io/npm/v/@cyyjs/electron-router)

Communicate asynchronously from the main process to renderer processes it's that simple！

## Install

```sh
yarn add@dashingli/plugins-electron-router
```

## Usage

### Main

```js
const router = require('@dashingli/plugins-electron-router')

router.get('list', async (query) => {
  return {
    err: '',
    data: {
      a: 1
    }
  }
})

router.post('save', async(data) => {})
router.put('update', async(data) => {})
router.delete('remove', async(id) => {})
```

### Render

```js
const api = require('@dashingli/plugins-electron-router')

let { err, data } = await api.get('list', query)
// data: { a: 1 }

await api.post('save', {})
await api.put('update', {})
await api.delete('remove', id)
```

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