2.0.20 • Published 4 years ago
@extra-string/space v2.0.20
Returns a string of spaces.
- 5x Faster than
' '.repeat(n)
. - Uses cache &
substr
.This is part of package extra-string.
var space = require('@extra-string/space');
// space(<length>)
space(4); // ' '
space(6); // ' '
space(0); // ''
space(-1); // ''