# leancloud-storage

> LeanCloud JavaScript SDK.

Latest version **4.15.2** (published 2023-10-11) · MIT license · 4.2K weekly downloads

## Install

```sh
npm install leancloud-storage
pnpm add leancloud-storage
yarn add leancloud-storage
bun add leancloud-storage
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.15.2 |
| Published | 2023-10-11 |
| First published | 2016-04-07 |
| Weekly downloads | 4.2K |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 34.2 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 340 |
| Author | LeanCloud |
| Maintainers | notevenaneko, leeyeh, hjiang, jysperm, sdjdd, onerain88 |

## Links

- npm: https://www.npmjs.com/package/leancloud-storage
- Repository: https://github.com/leancloud/javascript-sdk
- Homepage: https://github.com/leancloud/javascript-sdk#readme
- Issues: https://github.com/leancloud/javascript-sdk/issues
- npm.io page: https://npm.io/package/leancloud-storage

## Dependencies (13)

- [md5](https://npm.io/package/md5.md) ^2.0.0
- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [debug](https://npm.io/package/debug.md) ^3.1.0
- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^2.0.3
- [promise-timeout](https://npm.io/package/promise-timeout.md) ^1.3.0
- [leancloud-realtime](https://npm.io/package/leancloud-realtime.md) ^5.0.0-rc.8
- [@babel/runtime-corejs3](https://npm.io/package/@babel/runtime-corejs3.md) ^7.18.6
- [@leancloud/adapter-types](https://npm.io/package/@leancloud/adapter-types.md) ^5.0.0
- [@leancloud/platform-adapters-node](https://npm.io/package/@leancloud/platform-adapters-node.md) ^1.6.0
- [@leancloud/platform-adapters-weapp](https://npm.io/package/@leancloud/platform-adapters-weapp.md) ^1.6.3
- [@leancloud/platform-adapters-browser](https://npm.io/package/@leancloud/platform-adapters-browser.md) ^1.5.3
- [leancloud-realtime-plugin-live-query](https://npm.io/package/leancloud-realtime-plugin-live-query.md) ^1.2.0

## Recent versions

- 4.15.2 (latest) — 2023-10-11
- 5.0.0-beta.2 (dev) — 2020-11-05
- 3.15.0 (latest-v3) — 2019-08-05
- 3.11.0-beta.0 (next) — 2018-08-13
- 2.5.4 (latest-v2) — 2017-09-25
- 1.5.5 (latest-v1) — 2017-03-13
- 4.15.1 — 2023-09-25
- 4.15.0 — 2023-04-21
- 4.14.0 — 2022-12-15
- 4.13.4 — 2022-10-31
- 4.13.3 — 2022-10-31
- 4.13.2 — 2022-08-23
- 4.13.1 — 2022-07-15
- 4.13.0 — 2022-07-12
- 4.12.3 — 2022-06-24
- … 113 more at https://npm.io/package/leancloud-storage/versions

## README

# LeanCloud JavaScript SDK

[![npm](https://img.shields.io/npm/v/leancloud-storage.svg?style=flat-square)](https://www.npmjs.com/package/leancloud-storage)
![gzip size](http://img.badgesize.io/leancloud/javascript-sdk/dist/dist/av-min.js.svg?compression=gzip&style=flat-square)
[![Build Status](https://img.shields.io/travis/leancloud/javascript-sdk.svg?style=flat-square)](https://travis-ci.org/leancloud/javascript-sdk)
[![Codecov](https://img.shields.io/codecov/c/github/leancloud/javascript-sdk.svg?style=flat-square)](https://codecov.io/github/leancloud/javascript-sdk)
[![Known Vulnerabilities](https://snyk.io/test/github/leancloud/javascript-sdk/badge.svg?style=flat-square)](https://snyk.io/test/github/leancloud/javascript-sdk)

JavaScript SDK for [LeanCloud](http://leancloud.cn/).

## 安装

```
// npm 安装
npm install leancloud-storage --save
// npm 安装 2.x 版本
npm install leancloud-storage@2 --save
```

## 文档

- [安装文档](https://leancloud.cn/docs/sdk_setup-js.html)
- [使用文档](https://leancloud.cn/docs/leanstorage_guide-js.html)
- [API 文档](https://leancloud.github.io/javascript-sdk/docs/)

## 支持

- 如果你发现了新的 bug，或者有新的 feature request，请新建一个 issue
- 在使用过程中遇到了问题时
  - 如果你是商用版用户，请新建一个工单。
  - 也可以在 [论坛](https://forum.leancloud.cn/) 提问、讨论。

## 贡献

如果你希望为这个项目贡献代码，请按以下步骤进行：

- `fork` 这个项目
- `npm install` 安装相关依赖
- 开发和调试
- 确保测试全部通过 `npm run test`，浏览器环境打开 `test/test.html`
- 提交并发起 `Pull Request`

项目的目录结构说明如下：

```
├── dist                               // 编译之后生成的文件将会在此目录下
│   ├── av.js                          // 浏览器版本
│   ├── av-min.js
│   ├── av-weapp.js                    // 小程序版本
│   ├── av-weapp-min.js
│   ├── node                           // 目录中为生成的 nodejs 版本代码
│   └── ...
├── src
│   ├── index.js                          // node.js 环境入口文件
│   └── ...
└── test                               // 单元测试
```

## 发布流程

1. 遵循 semver 提升版本号
   - src/version.js
   - package.json
2. 对照 commit 历史写 changelog
3. 提交当前所有改动
4. 等待持续集成 pass
5. 使用 GitHub 基于 dist 分支发布一个 release
6. Fetch and checkout remote `dist` branch 并确认该提交的内容是即将发布的版本
7. npm publish（`npm publish`，需 npm 协作者身份），如果是 pre-release 版本需要带 next tag

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