# @extra-array/search-infix

> Finds first index of an infix.

Latest version **2.10.19** (published 2022-02-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @extra-array/search-infix
pnpm add @extra-array/search-infix
yarn add @extra-array/search-infix
bun add @extra-array/search-infix
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.10.19 |
| Published | 2022-02-19 |
| First published | 2020-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | wolfram77@gmail.com |
| Maintainers | wolfram77 |
| Keywords | extra, array, search, infix, searchInfix |

## Links

- npm: https://www.npmjs.com/package/@extra-array/search-infix
- Repository: https://github.com/nodef/extra-array
- Homepage: https://github.com/nodef/extra-array#readme
- Issues: https://github.com/nodef/extra-array/issues
- npm.io page: https://npm.io/package/@extra-array/search-infix

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 2.10.19 (latest) — 2022-02-19
- 2.10.18 — 2021-04-13
- 2.10.17 — 2021-02-05
- 2.10.16 — 2021-02-03
- 2.10.15 — 2021-02-03
- 2.10.14 — 2021-02-02
- 2.10.13 — 2021-02-02
- 2.10.12 — 2021-02-02
- 2.10.11 — 2021-02-02
- 2.10.10 — 2021-02-02
- 2.10.9 — 2020-12-16
- 2.10.8 — 2020-09-14
- 2.10.7 — 2020-06-29
- 2.10.6 — 2020-06-28
- 2.10.5 — 2020-06-28
- … 15 more at https://npm.io/package/@extra-array/search-infix/versions

## README

Finds first index of an infix.
[:package:](https://www.npmjs.com/package/@extra-array/search-infix)
[:smiley_cat:](https://github.com/orgs/nodef/packages?repo_name=extra-array)
[:running:](https://npm.runkit.com/@extra-array/search-infix)
[:vhs:](https://asciinema.org/a/342305)
[:moon:](https://www.npmjs.com/package/@extra-array/search-infix.min)
[:scroll:](https://unpkg.com/@extra-array/search-infix/)
[:newspaper:](https://nodef.github.io/extra-array/)
[:blue_book:](https://github.com/nodef/extra-array/wiki/)

> Alternatives: [searchInfix], [searchInfixRight], [searchInfixAll].<br>
> Similar: [hasInfix], [searchInfix].<br>
> Similar: [search], [scan], [find].

> This is part of package [extra-array].

[extra-array]: https://www.npmjs.com/package/extra-array

<br>

```javascript
array.searchInfix(x, y, [fc], [fm]);
// x:  an array
// y:  search infix
// fc: compare function (a, b)
// fm: map function (v, i, x)
```

```javascript
const array = require("extra-array");

var x = [1, 2, 3, 4];
var y = [2, 3];
array.searchInfix(x, y);
// 1

var y = [-2, -3];
array.searchInfix(x, y);
// -1

array.searchInfix(x, y, (a, b) => Math.abs(a) - Math.abs(b));
// 1

array.searchInfix(x, y, null, v => Math.abs(v));
// 1
```

<br>
<br>


## References

- [Data.List.isInfixOf: Haskell](https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-List.html#v:isInfixOf)
- [List-Extra.isInfixOf: elm](https://package.elm-lang.org/packages/elm-community/list-extra/7.1.0/List-Extra#isInfixOf)

[searchInfix]: https://github.com/nodef/extra-array/wiki/searchInfix
[searchInfixRight]: https://github.com/nodef/extra-array/wiki/searchInfixRight
[searchInfixAll]: https://github.com/nodef/extra-array/wiki/searchInfixAll
[hasInfix]: https://github.com/nodef/extra-array/wiki/hasInfix
[search]: https://github.com/nodef/extra-array/wiki/search
[scan]: https://github.com/nodef/extra-array/wiki/scan
[find]: https://github.com/nodef/extra-array/wiki/find

---
_Source: https://npm.io/package/@extra-array/search-infix · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
