espolar 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1346,8 +1346,14 @@ function pushMapping(mappings, mapping, combineMappingData) {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
mappings.push(mapping);
|
|
1348
1348
|
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Two adjacent mappings with identical lengths can be merged into one mapping.
|
|
1351
|
+
* @param left
|
|
1352
|
+
* @param right
|
|
1353
|
+
* @returns
|
|
1354
|
+
*/
|
|
1349
1355
|
function canMerge(left, right) {
|
|
1350
|
-
return left.sourceStart
|
|
1356
|
+
return left.sourceEnd - left.sourceStart === left.generatedEnd - left.generatedStart && right.sourceEnd - right.sourceStart === right.generatedEnd - right.generatedStart && left.sourceEnd === right.sourceStart && left.generatedEnd === right.generatedStart;
|
|
1351
1357
|
}
|
|
1352
1358
|
function toVolarMapping(mapping) {
|
|
1353
1359
|
const sourceLength = mapping.sourceEnd - mapping.sourceStart;
|