UNPKG

@popeindustries/lit-html

Version:

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

19 lines (18 loc) 425 B
/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ export function* join(items, joiner) { const isFunction = typeof joiner === 'function'; if (items !== undefined) { let i = -1; for (const value of items) { if (i > -1) { yield isFunction ? joiner(i) : joiner; } i++; yield value; } } }