1 |
- {"ast":null,"code":"const numeric = /^[0-9]+$/;\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a);\n const bnum = numeric.test(b);\n if (anum && bnum) {\n a = +a;\n b = +b;\n }\n return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;\n};\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers\n};","map":{"version":3,"names":["numeric","compareIdentifiers","a","b","anum","test","bnum","rcompareIdentifiers","module","exports"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/semver/internal/identifiers.js"],"sourcesContent":["const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n"],"mappings":"AAAA,MAAMA,OAAO,GAAG,UAAU;AAC1B,MAAMC,kBAAkB,GAAGA,CAACC,CAAC,EAAEC,CAAC,KAAK;EACnC,MAAMC,IAAI,GAAGJ,OAAO,CAACK,IAAI,CAACH,CAAC,CAAC;EAC5B,MAAMI,IAAI,GAAGN,OAAO,CAACK,IAAI,CAACF,CAAC,CAAC;EAE5B,IAAIC,IAAI,IAAIE,IAAI,EAAE;IAChBJ,CAAC,GAAG,CAACA,CAAC;IACNC,CAAC,GAAG,CAACA,CAAC;EACR;EAEA,OAAOD,CAAC,KAAKC,CAAC,GAAG,CAAC,GACbC,IAAI,IAAI,CAACE,IAAI,GAAI,CAAC,CAAC,GACnBA,IAAI,IAAI,CAACF,IAAI,GAAI,CAAC,GACnBF,CAAC,GAAGC,CAAC,GAAG,CAAC,CAAC,GACV,CAAC;AACP,CAAC;AAED,MAAMI,mBAAmB,GAAGA,CAACL,CAAC,EAAEC,CAAC,KAAKF,kBAAkB,CAACE,CAAC,EAAED,CAAC,CAAC;AAE9DM,MAAM,CAACC,OAAO,GAAG;EACfR,kBAAkB;EAClBM;AACF,CAAC","ignoreList":[]},"metadata":{},"sourceType":"script","externalDependencies":[]}
|