# string-surround

> Surround a string with another string

Latest version **1.0.1** (published 2016-04-08) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-04-08 |
| First published | 2016-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dustin Specker |
| Maintainers | dustinspecker |
| Keywords | string, surround |

## Links

- npm: https://www.npmjs.com/package/string-surround
- Repository: https://github.com/dustinspecker/string-surround
- Homepage: https://github.com/dustinspecker/string-surround#readme
- Issues: https://github.com/dustinspecker/string-surround/issues
- npm.io page: https://npm.io/package/string-surround

## 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.1 (latest) — 2016-04-08
- 1.0.0 — 2016-04-07

## README

# string-surround
[![NPM version](https://badge.fury.io/js/string-surround.svg)](https://badge.fury.io/js/string-surround) [![Build Status](https://travis-ci.org/dustinspecker/string-surround.svg)](https://travis-ci.org/dustinspecker/string-surround) [![Coverage Status](https://img.shields.io/coveralls/dustinspecker/string-surround.svg)](https://coveralls.io/r/dustinspecker/string-surround?branch=master)

[![Code Climate](https://codeclimate.com/github/dustinspecker/string-surround/badges/gpa.svg)](https://codeclimate.com/github/dustinspecker/string-surround) [![Dependencies](https://david-dm.org/dustinspecker/string-surround.svg)](https://david-dm.org/dustinspecker/string-surround/#info=dependencies&view=table) [![DevDependencies](https://david-dm.org/dustinspecker/string-surround/dev-status.svg)](https://david-dm.org/dustinspecker/string-surround/#info=devDependencies&view=table)

> Surround a string with another string

## Install
```
npm install --save string-surround
```

## Usage
```javascript
import stringSurround from 'string-surround'

stringSurround('hello', '123')
// => '123hello123'

stringSurround('', 'ABC')
// => 'ABCABC'
```

## API

### stringSurround(string, [surroundingString])

Returns `string` surrounded with `surroundingString`.

#### string
type: `string`

The string to surround.

#### surroundingString
type: `string`

default: `''`

The string to surround around `string`.

## LICENSE
MIT © [Dustin Specker](https://github.com/dustinspecker)

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