# string-wrap

> 🥪 wrap a string from both sides

Latest version **1.0.0** (published 2019-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install string-wrap
pnpm add string-wrap
yarn add string-wrap
bun add string-wrap
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-04-16 |
| First published | 2019-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 38 |
| Author | omrilotan |
| Maintainers | omrilotan |
| Keywords | string, wrap, 🥪 |

## Links

- npm: https://www.npmjs.com/package/string-wrap
- Repository: https://github.com/omrilotan/mono
- Homepage: https://omrilotan.com/mono/string-wrap/
- Issues: https://github.com/omrilotan/mono/issues
- npm.io page: https://npm.io/package/string-wrap

## 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

- 1.0.0 (latest) — 2019-04-16

## README

# string-wrap [![](https://img.shields.io/npm/v/string-wrap.svg)](https://www.npmjs.com/package/string-wrap) [![](https://img.shields.io/badge/source--000000.svg?logo=github&style=social)](https://github.com/omrilotan/mono/tree/master/packages/string-wrap)

## 🥪 wrap a string from both sides

```js
const wrap = require('string-wrap');

// Both sides
wrap('someone else said it', '"') // "someone else said it"

// Before and after
wrap('some comment', '(', ')') // (some comment)
```

## Transpiled version
Environments which exclude node_modules from the transpiling pipeline should include the "browser" entry instead of "main". This exposes an ES5 commonjs module.

Also available for explicit import:
```js
const wrap = require('string-wrap/dist');
```

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