UNPKG

@popeindustries/lit-html

Version:

Seamlessly and efficiently use @popeindustries/lit-html-server rendered HTML to hydrate lit-html templates in the browser

6 lines (5 loc) 625 B
/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const i=async(s,e)=>{for await(const r of s)if(await e(r)===!1)return};class t{constructor(e){this._ref=e}disconnect(){this._ref=void 0}reconnect(e){this._ref=e}deref(){return this._ref}}class o{constructor(){this._promise=void 0,this._resolve=void 0}get(){return this._promise}pause(){var e;(e=this._promise)!==null&&e!==void 0||(this._promise=new Promise(r=>this._resolve=r))}resume(){var e;(e=this._resolve)===null||e===void 0||e.call(this),this._promise=this._resolve=void 0}}export{o as Pauser,t as PseudoWeakRef,i as forAwaitOf};