-1
24:42我今天跨越:「check:」在for循環前面是什麼意思?
check: for (var i = 0; i < versionList.length; i++) {
var curVersion = versionList[i];
// find the critical ranges this version is in (the ranges only it can support)
var ranges = getCriticalRanges(target.name, curVersion);
// if this version satisfies all of the ranges, then we can replace with this version
for (var j = 0; j < ranges.length; j++) {
if (!semver.match(ranges[j], lookup.version))
continue check;
}
// if the version is not equal to our target, deprecate the old version
if (lookup.version != curVersion) {
var oldName = lookup.name + '@' + curVersion;
if (ranges.length) {
useExisting = true;
ui.log('info', (nodeSemver.gt(lookup.version, curVersion) ? 'Upgrading' : 'Downgrading') + ' `' + oldName + '` to `' + lookup.version + '`');
}
else {
// wasn't critical anyway - just remove
deprecated.push(oldName);
}
// remove all traces, but leave the package in the file system for cache value
delete config.depMap[oldName];
versionList.splice(i--, 1);
}
}
我從來沒有見過,在之前的JavaScript。我在這裏找到它:https://github.com/jspm/jspm-cli/blob/0.8.0-beta.2/lib/core.js#L328
那是什麼?
這是一個[標籤](https://developer.mozilla.org/fr/docs/JavaScript/Reference/Instructions/label) – 2014-10-08 07:18:55