persona-community-5/.pnpm-store/v3/files/6e/d2273be9c7fb7acdc3c480bede48912486697481ec1e0857e992bbd34a57fbd55cde55fd133e0eb4e1db9cf7579cfdfa954c1422184c7cc8a8c65b46d5e4f9
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

22 lines
1.3 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNotTokenOfTypeWithConditions = exports.isTokenOfTypeWithConditions = exports.isNodeOfTypeWithConditions = exports.isNodeOfTypes = exports.isNodeOfType = void 0;
const isNodeOfType = (nodeType) => (node) => node?.type === nodeType;
exports.isNodeOfType = isNodeOfType;
const isNodeOfTypes = (nodeTypes) => (node) => !!node && nodeTypes.includes(node.type);
exports.isNodeOfTypes = isNodeOfTypes;
const isNodeOfTypeWithConditions = (nodeType, conditions) => {
const entries = Object.entries(conditions);
return (node) => node?.type === nodeType &&
entries.every(([key, value]) => node[key] === value);
};
exports.isNodeOfTypeWithConditions = isNodeOfTypeWithConditions;
const isTokenOfTypeWithConditions = (tokenType, conditions) => {
const entries = Object.entries(conditions);
return (token) => token?.type === tokenType &&
entries.every(([key, value]) => token[key] === value);
};
exports.isTokenOfTypeWithConditions = isTokenOfTypeWithConditions;
const isNotTokenOfTypeWithConditions = (tokenType, conditions) => (token) => !(0, exports.isTokenOfTypeWithConditions)(tokenType, conditions)(token);
exports.isNotTokenOfTypeWithConditions = isNotTokenOfTypeWithConditions;
//# sourceMappingURL=helpers.js.map