Inserts a string before a needle's start in a haystack.
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
import insertStringBefore from "insert-string-before"
const result = insertStringBefore("I am the Hedgehog!", "the", "Sanic ")
Variable result
will be:
"I am Sanic the Hedgehog!"
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
MIT License
Copyright © 2020, Jaid <jaid.jsx@gmail.com> (github.com/jaid)