UNPKG

@twind/with-react

Version:

Seamless integration of Twind in a React project

18 lines (17 loc) 693 B
import { createState } from './_/internal-55eec367.js'; let encoder = /* #__PURE__ */ new TextEncoder(), decoder = /* #__PURE__ */ new TextDecoder(), InlineStream = class InlineStream extends TransformStream { constructor(options){ let state = createState(options), flush = (controller)=>{ let markup = state.flush(); markup && controller.enqueue(encoder.encode(markup)); }; super({ transform (chunk, controller) { if (state.push(decoder.decode(chunk))) return flush(controller); }, flush }); } }; export { InlineStream as default }; //# sourceMappingURL=readableStream.js.map