Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.
[Brief description ]
- [more description]
- [more description]
- [more description]
| /** | |
| * 判断两个版本字符串的大小 | |
| * @param {string} v1 原始版本 | |
| * @param {string} v2 目标版本 | |
| * @return {number} 如果原始版本大于目标版本,则返回大于0的数值, 如果原始小于目标版本则返回小于0的数值。0当然是两个版本都相等拉。 | |
| */ | |
| function compareVersion(v1, v2) { | |
| var _v1 = v1.split("."), | |
| _v2 = v2.split("."), |