prepend-to-lines
Version:
Prepends a string to each line of another string.
15 lines • 527 B
TypeScript
/** @module prepend-to-lines
*/
declare module "prepend-to-lines" {
/**
* Returns the given string with an additional prefix on each line
* @example
* import prependToLines from "prepend-to-lines"
* const result = prependToLines("a\nb", "# ")
* result === "# a\n# b"
* @param {*} string The string that may contain "\n" and "\r"
* @param {string} linePrefix The prefix that will be added to each line of `string`
* @returns {string} New string
*/
export default var: any;
}