one
Version:
One is a new React Framework that makes Vite serve both native and web.
17 lines (16 loc) • 595 B
JavaScript
import { Children, isValidElement } from "react";
const NAVIGATOR_CONFIG = "__oneNavigatorConfig";
function isNavigatorConfigChild(child) {
return isValidElement(child) && typeof child.type === "function" && child.type[NAVIGATOR_CONFIG] === true;
}
function getCustomNavigatorChildren(children) {
const custom = [];
Children.forEach(children, child => {
if (child != null && !isNavigatorConfigChild(child)) {
custom.push(child);
}
});
return custom;
}
export { NAVIGATOR_CONFIG, getCustomNavigatorChildren, isNavigatorConfigChild };
//# sourceMappingURL=children.mjs.map