place-of

Return the first place of a given input in a given value.

Usage no npm install needed!

<script type="module">
  import placeOf from 'https://cdn.skypack.dev/place-of';
</script>

README

placeOf

Return the first place of a given input in a given value.

Usage: placeOf<T>(target: string | Array<T>, searchValue: string | T, startSearchFrom?: number): number

import { placeOf } from 'place-of'

lastPlaceOf('abca', 'a')
// Output: 1
lastPlaceOf([1,2,3,1], 1)
// Output: 1
lastPlaceOf([1,2,3,4], 6)
// Output: 0

This module exported from utilizes project.