wiki.techinc.nl/tests/phpunit/data/resourceloader/codex/modules/useSlotContents.js
Roan Kattouw fe62ebafd2 CodexModule: Remove CODEX_MODULE_DIR, instead use CODEX_LIBRARY_DIR
CODEX_MODULE_DIR is always the /modules subdirectory of
CODEX_LIBRARY_DIR, so remove it and derive it that way instead.

- Update tests accordingly
- Rename test data files accordingly
- Use CODEX_LIBRARY_DIR in one place where we had neglected to use a
  constant

Change-Id: Ieb347c2d128f3addfb11f6aca79d63969434f342
2024-05-15 17:12:20 -04:00

1 line
618 B
JavaScript

"use strict";const o=require("vue");function r(e){const t=[];for(const n of e)typeof n.type=="string"||typeof n.type=="object"?t.push(n):n.type!==o.Comment&&(typeof n.children=="string"&&n.children.trim()!==""?t.push(n.children):Array.isArray(n.children)&&t.push(...r(n.children)));return t}function i(e,t){return typeof e.type=="object"&&"name"in e.type?t!==void 0?e.type.name===t:!0:!1}function s(e,t){return typeof e.type=="string"?t!==void 0?e.type===t.toLowerCase():!0:!1}function f(e){const t=typeof e=="function"?e():e;return t?r(t):[]}exports.isComponentVNode=i;exports.isTagVNode=s;exports.useSlotContents=f;