mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/JiboViteDocs.git
synced 2026-06-16 07:16:25 +00:00
Initalize
This commit is contained in:
16
node_modules/es-semver/src/compareIdentifiers.js
generated
vendored
Normal file
16
node_modules/es-semver/src/compareIdentifiers.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
var numeric = /^[0-9]+$/
|
||||
|
||||
// TODO: Fix module name
|
||||
export function compareIdentifiers (a, b) {
|
||||
var anum = numeric.test(a)
|
||||
var bnum = numeric.test(b)
|
||||
if (anum && bnum) {
|
||||
a = +a
|
||||
b = +b
|
||||
}
|
||||
return (anum && !bnum) ? -1
|
||||
: (bnum && !anum) ? 1
|
||||
: a < b ? -1
|
||||
: a > b ? 1
|
||||
: 0
|
||||
}
|
||||
Reference in New Issue
Block a user