(a, b)
| 5903 | |
| 5904 | var numeric = /^[0-9]+$/ |
| 5905 | function 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 | |
| 5921 | exports.rcompareIdentifiers = rcompareIdentifiers |
| 5922 | function rcompareIdentifiers (a, b) { |
no outgoing calls
no test coverage detected
searching dependent graphs…