Bundler can't parse multiple exports per module
This commit is contained in:
parent
28d35b47a2
commit
da76ed9054
1 changed files with 8 additions and 4 deletions
|
|
@ -1,18 +1,22 @@
|
||||||
"use strict"
|
"use strict"
|
||||||
|
|
||||||
var delayedRemoval = new WeakMap
|
var delayedRemoval = new WeakMap
|
||||||
module.exports.delayedRemoval = delayedRemoval
|
|
||||||
|
|
||||||
module.exports.domFor = function *domFor({dom, domSize}, {generation} = {}) {
|
function *domFor({dom, domSize}, {generation} = {}) {
|
||||||
if (dom != null) do {
|
if (dom != null) do {
|
||||||
const {nextSibling} = dom
|
const {nextSibling} = dom
|
||||||
|
|
||||||
if (delayedRemoval.get(dom) === generation) {
|
if (delayedRemoval.get(dom) === generation) {
|
||||||
yield dom
|
yield dom
|
||||||
domSize--
|
domSize--
|
||||||
}
|
}
|
||||||
|
|
||||||
dom = nextSibling
|
dom = nextSibling
|
||||||
}
|
}
|
||||||
while (domSize)
|
while (domSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
delayedRemoval: delayedRemoval,
|
||||||
|
domFor: domFor,
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue