Cách dùng: Semver Compare
Semver Compare là công cụ Công cụ lập trình trực tuyến miễn phí, giúp compare two semantic versions by precedence and tell you whether the change is breaking ngay trong trình duyệt. Dán dữ liệu, chỉnh tùy chọn và nhận kết quả tức thì — không cài đặt, không đăng ký, không tải lên máy chủ.
Mô tả
Compare two semantic versions by precedence and tell you whether the change is breaking.
- Công cụ lập trình
- Vì mọi tính toán đều ở phía máy khách, Semver Compare an toàn với dữ liệu nhạy cảm như API key hay token.
Cách dùng
Dùng Semver Compare chỉ ba bước:
- Dán dữ liệu vào ô nhập (hoặc nạp ví dụ).
- Chỉnh tùy chọn theo định dạng mong muốn.
- Sao chép, tải hoặc xem kết quả — cập nhật khi bạn gõ.
Chạy
Ví dụ
Compare against 1.9.0 — numerically per component, not as a string, so 1.10.0 wins.
Đầu vào
1.10.0
Đầu ra
1.10.0 < 2.0.0 Comparison: A is OLDER than B Difference: major -1, minor 10, patch 0 Breaking change between them: YES (major differs)
此输出由工具真实运行产生,并非人工编写。
Tình huống sử dụng
Những tình huống phổ biến mà Semver Compare hữu ích:
- Compare two semantic versions by precedence and tell you whether the change is breaking.
Tham số
| key | Tùy chọn | type | allowed | default | Semver Compare |
|---|---|---|---|---|---|
mode | Operation | select | parse (Parse and explain), compare (Compare two versions), bump (Bump a part), range (Test a range), sort (Sort a list) | — | compare |
b | Second version / range | text | — | 2.0.0 | — |
part | Bump part | select | major, minor, patch, premajor, preminor, prepatch, prerelease | — | — |
pre | Prerelease tag | text | — | beta | — |
Đầu vào: text · Đầu ra: text · live: ✓
FAQ
Semver Compare là gì?
Semver Compare dùng để compare two semantic versions by precedence and tell you whether the change is breaking. Chạy hoàn toàn trong trình duyệt nên dữ liệu của bạn được bảo mật.
Semver Compare có miễn phí không?
Có. Không giới hạn, không đăng ký, không cài đặt.
Dữ liệu của tôi có bị tải lên?
Không. Mọi xử lý diễn ra ngay trên máy bạn.
Cần lưu ý
- 全部计算在浏览器端完成,因此超大输入受限于标签页内存,而非服务器上传限制。