Quantumbraid's picture
download
raw
502 Bytes
"use strict";
exports.__esModule = true;
exports.default = prepend;
/**
* Insert a given element as the first child of a parent element.
*
* @param node the element to prepend
* @param parent the parent element
*/
function prepend(node, parent) {
if (node && parent) {
if (parent.firstElementChild) {
parent.insertBefore(node, parent.firstElementChild);
} else {
parent.appendChild(node);
}
return node;
}
return null;
}
module.exports = exports["default"];

Xet Storage Details

Size:
502 Bytes
·
Xet hash:
08a94ec0884b36f81f85a25b5e6e6978febb708c81532c333db50678b66ee74b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.