UNPKG

506 BTypeScriptView Raw
1interface Option {
2 maxLength?: number;
3 splitPunct?: string;
4}
5/**
6 * split the long text to short texts
7 * Time Complexity: O(n)
8 *
9 * @param {string} text
10 * @param {object?} option
11 * @param {number?} option.maxLength default is 200
12 * @param {string?} option.splitPunct default is ''
13 * @returns {string[]} short text list
14 */
15declare const splitLongText: (text: string, { maxLength, splitPunct }?: Option) => string[];
16export default splitLongText;
17//# sourceMappingURL=splitLongText.d.ts.map
\No newline at end of file