0.0.7 • Published 6 years ago
string-space v0.0.7
string-space
NOTE: string-space was renamed to @extra-string/space.
Returns a string of spaces.
- 5x Faster than
' '.repeat(n)
. - Uses cache &
substr
.
var space = require('string-space');
// space(<length>)
space(4); // ' '
space(6); // ' '
space(0); // ''
space(-1); // ''