UNPKG

react-element-to-jsx-string

Version:

Turn a ReactElement into the corresponding JSX string.

10 lines (7 loc) 174 B
/* @flow */ export default (times: number, tabStop: number): string => { if (times === 0) { return ''; } return new Array(times * tabStop).fill(' ').join(''); };