put-after
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

Put after Travis CI Build Status

Put an element after another element.

NPM Badge

Install

npm install put-after

Usage

const putAfter = require("put-after")

putAfter("ac", "a", "b")
//=> 'abc'

putAfter(["a", "c"], "a", "b")
//=> ['a', 'b', 'c']

API

putAfter(source, find, add)

source

Type: string | array

The element to search.

find

Type: string | number

The search key. Can be a specific part of the element or an index.

add

Type: any

The element to add.

Package Sidebar

Install

npm i put-after

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

3.83 kB

Total Files

6

Last publish

Collaborators

  • richienb