mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-20 01:07:12 +08:00
22fc7dddfb
* perf: text splitter * update doc
4 lines
107 B
TypeScript
4 lines
107 B
TypeScript
export const getTextValidLength = (chunk: string) => {
|
|
return chunk.replaceAll(/[\s\n]/g, '').length;
|
|
};
|