This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-extensions/wecom/node_modules/node-llama-cpp/dist/utils/includesText.js
T

12 lines
547 B
JavaScript

export function includesText(value, textToCheckFor, strictCase = false) {
if (value instanceof Array)
return value.some((v) => includesText(v, textToCheckFor, strictCase));
else if (typeof value !== "string")
return false;
if (textToCheckFor instanceof Array)
return textToCheckFor.some((t) => includesText(value, t, strictCase));
if (strictCase)
return value.includes(textToCheckFor);
return value.toLowerCase().includes(textToCheckFor.toLowerCase());
}
//# sourceMappingURL=includesText.js.map