# @js-util-fn/compare-version

> > compareVersion

Latest version **1.0.1** (published 2021-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @js-util-fn/compare-version
pnpm add @js-util-fn/compare-version
yarn add @js-util-fn/compare-version
bun add @js-util-fn/compare-version
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-02-04 |
| First published | 2021-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10.15.3 |
| Dependencies | 0 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | lamovv |
| Maintainers | lamo |
| Keywords | compare version |

## Links

- npm: https://www.npmjs.com/package/@js-util-fn/compare-version
- Repository: https://github.com/lamovv/js-utils-compare-version
- Homepage: https://github.com/lamovv/js-utils-compare-version#readme
- Issues: https://github.com/lamovv/js-utils-compare-version/issues
- npm.io page: https://npm.io/package/@js-util-fn/compare-version

## Recent versions

- 1.0.1 (latest) — 2021-02-04
- 1.0.0 — 2021-02-04

## README

# `@js-util-fn/compare-version`

> compareVersion

[![Coverage Status](https://coveralls.io/repos/github/lamovv/js-utils-compare-version/badge.svg?branch=master)](https://coveralls.io/github/lamovv/js-utils-compare-version?branch=master)
[![NPM version](https://img.shields.io/npm/v/@js-util-fn/compare-version.svg)](https://www.npmjs.com/package/@js-util-fn/compare-version)

- 配置coveralls token
  - [ADD REPO](https://coveralls.io/repos/new)，将关联的仓库置为`ON`，进入`DETAILS` 里查看`repo_token`
  - 将 `repo_token` 配置到 `.coveralls.yml`：`repo_token: ua...`
  
## Usage

```js
import {
  empty
} from '@js-util-fn/compare-version';
// result true
empty([]);
```

## mock
1. mock内配置mock数据，如：getData.json
2. 请求接口

```js
fetch('/api/getData.json')
```

## TC
1. `__test__` 编写Test Case
2. `npm run test` 运行测试用户并生成报告
3. `npm run dev`启动server后，可访问：`http://localhost/coverage` 查看报告页面

## Dev
1. 默认使用`yarn`安装npm包，若无请先安装：`npm i -g yarn`
2. 初始化环境：`npm run init`
3. 启动开发服务：`npm run dev`
  - 自动打开浏览器：`npm run dev:open`
  - 若提示80端口被占用问题，可注掉或修改 webpack.config.js 的 port
4. 构建：：`npm run build`
  - 默认构建cjs与es6 module
  - 若全部构建：`$ npm run build:all`
5. 使用命令可一步完成git push提交：`$ npm run push -- "your-commit-message"`
  - your-commit-message：为git commit提交时的message，自行输入
  - 如：`$ npm run push -- "feat(scope): add yy"`
  - **message格式参照 `commitlint.config.js` 规范提交**
6. 使用命令可一步完成提交git并发布npm包：`npm run pub -- "your-commit-message"`
  - 还可指定npm包版本位(patch|minor|major)，默认为patch，自动+1：`npm run pub -- "your-commit-message" -v minor`

---
_Source: https://npm.io/package/@js-util-fn/compare-version · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
