insert-string-before
Inserts a string before a needle's start in a haystack.
Installation
npm install --save insert-string-before@^1.0.1
yarn add insert-string-before@^1.0.1
(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 [email protected]: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 <[email protected]> (github.com/jaid)