Last active
October 2, 2024 09:14
-
-
Save iwill/a83038623ba4fef6abb9efca87ae9ccb to your computer and use it in GitHub Desktop.
Revisions
-
iwill revised this gist
Jun 16, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,6 @@ */ function semverCompare(a, b) { if (a.startsWith(b + "-")) return -1 if (b.startsWith(a + "-")) return 1 return a.localeCompare(b, undefined, { numeric: true, sensitivity: "case", caseFirst: "upper" }) } -
iwill revised this gist
Jun 8, 2022 . No changes.There are no files selected for viewing
-
iwill renamed this gist
May 20, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ /** * Semantic Versioning Comparing * #see https://semver.org/ * #see https://stackoverflow.com/a/65687141/456536 * #see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options -
iwill revised this gist
May 17, 2022 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,6 @@ * #see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options */ function semverCompare(a, b) { if (a.startsWith(b + "-")) return -1 if (b.startsWith(a + "-")) return 1 return a.localeCompare(b, undefined, { numeric: true, sensitivity: "case", caseFirst: "upper" }) -
iwill revised this gist
May 17, 2022 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,6 @@ * #see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options */ function semverCompare(a, b) { if (a === b) return 0 if (a.startsWith(b + "-")) return -1 if (b.startsWith(a + "-")) return 1 -
iwill revised this gist
May 17, 2022 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,12 @@ /** * #see https://semver.org/ * #see https://stackoverflow.com/a/65687141/456536 * #see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options */ function semverCompare(a, b) { a ||= "", b ||= "" if (a === b) return 0 if (a.startsWith(b + "-")) return -1 if (b.startsWith(a + "-")) return 1 return a.localeCompare(b, undefined, { numeric: true, sensitivity: "case", caseFirst: "upper" }) } -
iwill revised this gist
May 17, 2022 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ function semverCompare(a, b) { a ||= "", b ||= "" if (a === b) return 0 if (a.startsWith(b + "-")) return -1 if (b.startsWith(a + "-")) return 1 return a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' }) } -
iwill revised this gist
May 17, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ * #see https://semver.org/ * #see https://stackoverflow.com/a/65687141/456536 */ function semverCompare(a, b) { a ||= "", b ||= "" if (a === b) return 0 if (a.startsWith(b)) return -1 -
iwill created this gist
May 17, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ /** * #see https://semver.org/ * #see https://stackoverflow.com/a/65687141/456536 */ function versionCompare(a, b) { a ||= "", b ||= "" if (a === b) return 0 if (a.startsWith(b)) return -1 if (b.startsWith(a)) return 1 return a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' }) }