Skip to content

Jaid/insert-string-before

Repository files navigation

insert-string-before

License Sponsor insert-string-before
Build status Commits since v1.0.1 Last commit Issues
Latest version on npm Dependents Downloads

Inserts a string before a needle's start in a haystack.

Installation

insert-string-before on npm

npm install --save insert-string-before@^1.0.1

insert-string-before on Yarn

yarn add insert-string-before@^1.0.1

@jaid/insert-string-before on GitHub Packages
(if configured properly)

npm install --save @jaid/insert-string-before@^1.0.1

Example

import insertStringBefore from "insert-string-before"

const result = insertStringBefore("I am the Hedgehog!", "the", "Sanic ")

Variable result will be:

"I am Sanic the Hedgehog!"

Development

Setting up:

git clone git@github.com:jaid/insert-string-before.git
cd insert-string-before
npm install

Testing:

npm run test:dev

Testing in production environment:

npm run test

License

MIT License
Copyright © 2020, Jaid <jaid.jsx@gmail.com> (github.com/jaid)