lorem-ipsum
Version:
Generates passages of lorem ipsum text suitable for use as placeholder copy in web pages, graphics, and more. Works in the browser, NodeJS, and React Native.
15 lines (13 loc) • 368 B
text/typescript
import makeArrayOfLength from "./makeArrayOfLength";
/**
* @param length Length "x".
* @returns An array of strings of length "x".
*/
const makeArrayOfStrings = (
length: number,
makeString: () => string,
): string[] => {
const arr = makeArrayOfLength(length);
return arr.map(() => makeString());
};
export default makeArrayOfStrings;