Skip to content

Commit

Permalink
Merge pull request #1 from pearlwang1106/master
Browse files Browse the repository at this point in the history
update: README
  • Loading branch information
Pearl Wang committed Aug 7, 2018
2 parents c0636da + 652989b commit e7e3fa9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Versions Compare 工具

[![Build Status](https://travis-ci.org/searchfe/versions-compare.svg?branch=master)](https://travis-ci.org/searchfe/versions-compare)
[![Coverage Status](https://coveralls.io/repos/github/searchfe/versions-compare/badge.svg?branch=master)](https://coveralls.io/github/searchfe/versions-compare?branch=master)

版本对比工具

## 安装
Expand All @@ -14,9 +17,13 @@ npm install --save versions-compare
var compare = require('versions-compare');

compare(1, 2); // -1
compare([1,2 ], [1, 3]); // -1
compare([1, 2], [1, 3]); // -1
compare('1.2.3', '1.4.1'); // 1
compare('1.1.1', '1.1.1'); // 0
compare('1.2.3', [1, 2, 3]); // Wrong Params.
compare('1.2.3', [1, 2, 3]); // 0
compare('1.2', 2); // -1
compare(3, [2, 3, 4]); // -1
compare('1.1.', [1, 2, 3]); // Wrong Params.
compare('.1.1', [1, 2, 3]); // Wrong Params.

```

0 comments on commit e7e3fa9

Please sign in to comment.