MCPcopy Create free account
hub / github.com/Azure/powershell / compareIdentifiers

Function compareIdentifiers

lib/index.js:5905–5919  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

5903
5904var numeric = /^[0-9]+$/
5905function compareIdentifiers (a, b) {
5906 var anum = numeric.test(a)
5907 var bnum = numeric.test(b)
5908
5909 if (anum && bnum) {
5910 a = +a
5911 b = +b
5912 }
5913
5914 return a === b ? 0
5915 : (anum && !bnum) ? -1
5916 : (bnum && !anum) ? 1
5917 : a < b ? -1
5918 : 1
5919}
5920
5921exports.rcompareIdentifiers = rcompareIdentifiers
5922function rcompareIdentifiers (a, b) {

Callers 2

index.jsFile · 0.85
rcompareIdentifiersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…