https://deepwiki.com/stevenleep/comparison/1-overview
You want to know if a version is greater than another version? This tool is for you!
Usage Scenarios:
- App Update:you are developing an app and need to check if it needs to be updated!
- Dependency Update...
- A version management platform for file systems
pnpm install @stevenleep/comparison- Only one API
- Compare semantic versions
- Support pre-release tags
- Support custom pre-release tags
- Support custom verification
- Support CoreCode based definition extension
import{compare}from"@stevenleep/comparison";constversion1="1.0.0";constversion2="2.0.0";constresult=compare(version1,version2);result.isGreater;// falseresult.status;// negative
the comparison of the version is only one of the application scenarios. Parser at the bottom only provides the ability to install specific characters split. You can expand a lot of things based on this (depending on your own interests and ideas)
