last-place-of
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

lastPlaceOf

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

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

import { lastPlaceOf } from 'last-place-of'

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

This module exported from utilizes project.

Package Sidebar

Install

npm i last-place-of

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

2.77 kB

Total Files

5

Last publish

Collaborators

  • natqe3