string-surround

1.0.1 • Public • Published

string-surround

NPM version Build Status Coverage Status

Code Climate Dependencies DevDependencies

Surround a string with another string

Install

npm install --save string-surround

Usage

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    2
  • 1.0.0
    0

Package Sidebar

Install

npm i string-surround

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dustinspecker