Skip to content
Snippets Groups Projects
Commit ebb69ad4 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(pep440): add isVersion check before equals

parent a00cefa5
No related merge requests found
......@@ -19,7 +19,7 @@ const {
major: getMajor,
minor: getMinor,
patch: getPatch,
eq: equals,
eq,
} = pep440;
const isStable = (input: string): boolean => {
......@@ -50,6 +50,10 @@ export const isSingleVersion = (constraint: string): string =>
export { isVersion, matches };
const equals = (version1: string, version2: string): boolean => {
return isVersion(version1) && isVersion(version2) && eq(version1, version2);
};
export const api: VersioningApi = {
equals,
getMajor,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment