# lightning-community

> 心电社区 API SDK

Latest version **0.2.32** (published 2023-01-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install lightning-community
pnpm add lightning-community
yarn add lightning-community
bun add lightning-community
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.32 |
| Published | 2023-01-02 |
| First published | 2022-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 2 |
| Unpacked size | 99.4 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Zero |
| Maintainers | guhuan |
| Keywords | lightning, lightninglion |

## Links

- npm: https://www.npmjs.com/package/lightning-community
- Repository: https://github.com/Lightninglion-Studio/Community-Node
- Homepage: https://github.com/Lightninglion-Studio/Community-Node#readme
- Issues: https://github.com/LightningLion-Studio/Community-Node.git
- npm.io page: https://npm.io/package/lightning-community

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.27.2
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.20.6

## Recent versions

- 0.2.32 (latest) — 2023-01-02
- 0.2.31 — 2023-01-02
- 0.2.30 — 2023-01-01
- 0.2.23 — 2023-01-01
- 0.2.22 — 2023-01-01
- 0.2.21 — 2023-01-01
- 0.2.16 — 2022-12-30
- 0.2.15 — 2022-12-29
- 0.2.14 — 2022-12-25
- 0.2.13 — 2022-12-25
- 0.2.12 — 2022-12-25
- 0.2.11 — 2022-12-25
- 0.2.5 — 2022-12-25
- 0.2.4 — 2022-12-24
- 0.2.3 — 2022-12-24
- … 16 more at https://npm.io/package/lightning-community/versions

## README

# Lightning Community SDK

[![NPM version](https://img.shields.io/npm/v/lightning-community.svg?style=flat)](https://npmjs.org/package/lightning-community)
[![NPM downloads](http://img.shields.io/npm/dm/lightning-community.svg?style=flat)](https://npmjs.org/package/lightning-community)

此仓库为心电社区的SDK，开发者可通过此SDK，心电社区的API在Node项目中调用。  
项目全用TypeScript开发。没错，所以任何数据都有类型。  

![如图所示，所有项目都有类型](https://github.com/LightningLion-Studio/Community-Node/blob/master/assets/tips.png?raw=true) 

如上所示，所有项目都有类型，开发起来就舒服了吧。

## 安装

```bash
$ npm install lightning-community
```

## 使用

### ES Module

如果您开发前端，请尽量不使用ESModule的默认导出，因为本项目经过Babel编译可以Tree Shaking。

```ts
import { Get } from "lightning-community"
async function receivePost() {
    const data = await Get("post")
    // `data`变量就是数据喽，在这个asnyc/await函数里使用吧
}
receivePost()
```

### CommonJS

node.JS一般情况下不支持Tree Shaking。但是我仍然推荐您只引入需要的API。

```js
const { Get } = require("lightning-community")
async function receivePost() {
    const data = await Get("post")
    // `data`变量就是数据喽，在这个asnyc/await函数里使用吧
}
receivePost()
```

### ES全量引入（不推荐）
```ts
import Client from "ligntning-community"
async function receivePost() {
    const data = await Client.Get("post")
    // `data`变量就是数据喽，在这个asnyc/await函数里使用吧
}
receivePost()
```

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