assertthat
Version:
assertthat provides fluent TDD.
20 lines (16 loc) • 389 B
text/typescript
import { maximumFormattingDepth } from '../../constants/maximumFormattingDepth';
const prepareSimple = function (content: string, depth: number): string[] {
return `${content}`.
split('\n').
map(
(line): string => {
if (depth >= maximumFormattingDepth) {
return line;
}
return ` ${line}`;
}
);
};
export {
prepareSimple
};