react-textmotion
Version:
Lightweight yet powerful library that provides variable animation effects for React applications.
12 lines (11 loc) • 437 B
TypeScript
import type { Split } from '../../types';
/**
* @description
* `splitText` is a utility function that splits a string into an array of substrings based on the specified split type.
*
* @param {string} text - The text to be split.
* @param {Split} split - The split type (`character`, `word`, or `line`).
*
* @returns {string[]} An array of substrings.
*/
export declare const splitText: (text: string, split: Split) => string[];