/
githubmirror
/
preact
Обзор
Документация
Войти
/
githubmirror
/
preact
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/util.js
13 строк
376 B
jdecroock
Save bytes
06 июн 2025, 20:24
06 июн 2025, 20:24
e2dd222
Код
Авторство
О чём код?
import { EMPTY_ARR } from './constants'; export const isArray = Array.isArray; export const slice = EMPTY_ARR.slice; export const assign = Object.assign; /** * Remove a child node from its parent if attached. * @param {import('./internal').PreactElement | null} node The node to remove */ export function removeNode(node) { if (node && node.parentNode) node.remove(); }