# @extra-string/space

> Returns a string of spaces.

Latest version **2.0.20** (published 2020-05-23) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @extra-string/space
pnpm add @extra-string/space
yarn add @extra-string/space
bun add @extra-string/space
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.20 |
| Published | 2020-05-23 |
| First published | 2018-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | wolfram77@gmail.com |
| Maintainers | wolfram77 |
| Keywords | extra, string, space |

## Links

- npm: https://www.npmjs.com/package/@extra-string/space
- Repository: https://github.com/nodef/extra-string
- Homepage: https://github.com/nodef/extra-string#readme
- Issues: https://github.com/nodef/extra-string/issues
- npm.io page: https://npm.io/package/@extra-string/space

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 2.0.20 (latest) — 2020-05-23
- 2.0.19 — 2020-05-22
- 2.0.18 — 2020-05-22
- 2.0.17 — 2020-05-22
- 1.1.3 — 2018-12-24
- 1.1.0 — 2018-12-22
- 1.0.9 — 2018-12-22
- 0.1.1 — 2018-12-22
- 0.1.0 — 2018-12-22
- 1.0.1 — 2018-09-24
- 1.0.0 — 2018-09-24

## README

Returns a string of spaces.
- [5x Faster] than `' '.repeat(n)`.
- Uses *cache* & `substr`.<br>
> This is part of package [extra-string].

[extra-string]: https://www.npmjs.com/package/extra-string

```javascript
var space = require('@extra-string/space');
// space(<length>)

space(4);  // '    '
space(6);  // '      '
space(0);  // ''
space(-1); // ''
```


[![extra-string](https://i.imgur.com/y4YVIau.jpg)](https://www.npmjs.com/package/extra-string)

[5x Faster]: https://jsperf.com/spaces-substr-vs-search

---
_Source: https://npm.io/package/@extra-string/space · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
