# string-includes-x

> Determines whether one string may be found within another string.

Latest version **2.1.2** (published 2019-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install string-includes-x
pnpm add string-includes-x
yarn add string-includes-x
bun add string-includes-x
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2019-08-28 |
| First published | 2017-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8.11.4 |
| Dependencies | 6 |
| Unpacked size | 340.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Graham Fairweather |
| Maintainers | xotic750 |
| Keywords | string, includes, module, javascript, nodejs, browser |

## Links

- npm: https://www.npmjs.com/package/string-includes-x
- Repository: https://github.com/Xotic750/string-includes-x
- Issues: https://github.com/Xotic750/string-includes-x/issues
- npm.io page: https://npm.io/package/string-includes-x

## Dependencies (6)

- [attempt-x](https://npm.io/package/attempt-x.md) ^2.1.2
- [is-regexp-x](https://npm.io/package/is-regexp-x.md) ^3.1.2
- [to-string-x](https://npm.io/package/to-string-x.md) ^2.1.1
- [to-boolean-x](https://npm.io/package/to-boolean-x.md) ^2.1.1
- [simple-methodize-x](https://npm.io/package/simple-methodize-x.md) ^1.0.4
- [require-object-coercible-x](https://npm.io/package/require-object-coercible-x.md) ^2.1.1

## Recent versions

- 2.1.2 (latest) — 2019-08-28
- 2.1.1 — 2019-08-20
- 2.1.0 — 2019-08-14
- 2.0.12 — 2019-08-05
- 2.0.11 — 2019-07-31
- 2.0.10 — 2019-07-27
- 2.0.9 — 2019-07-26
- 2.0.8 — 2019-07-25
- 2.0.7 — 2019-07-24
- 2.0.6 — 2019-07-24
- 2.0.5 — 2019-07-22
- 2.0.4 — 2019-07-21
- 2.0.3 — 2019-07-19
- 2.0.2 — 2019-07-18
- 2.0.1 — 2019-07-18
- … 3 more at https://npm.io/package/string-includes-x/versions

## README

<a
  href="https://travis-ci.org/Xotic750/string-includes-x"
  title="Travis status">
<img
  src="https://travis-ci.org/Xotic750/string-includes-x.svg?branch=master"
  alt="Travis status" height="18">
</a>
<a
  href="https://david-dm.org/Xotic750/string-includes-x"
  title="Dependency status">
<img src="https://david-dm.org/Xotic750/string-includes-x/status.svg"
  alt="Dependency status" height="18"/>
</a>
<a
  href="https://david-dm.org/Xotic750/string-includes-x?type=dev"
  title="devDependency status">
<img src="https://david-dm.org/Xotic750/string-includes-x/dev-status.svg"
  alt="devDependency status" height="18"/>
</a>
<a
  href="https://badge.fury.io/js/string-includes-x"
  title="npm version">
<img src="https://badge.fury.io/js/string-includes-x.svg"
  alt="npm version" height="18">
</a>
<a
  href="https://www.jsdelivr.com/package/npm/string-includes-x"
  title="jsDelivr hits">
<img src="https://data.jsdelivr.com/v1/package/npm/string-includes-x/badge?style=rounded"
  alt="jsDelivr hits" height="18">
</a>
<a
  href="https://bettercodehub.com/results/Xotic750/string-includes-x"
  title="bettercodehub score">
<img src="https://bettercodehub.com/edge/badge/Xotic750/string-includes-x?branch=master"
  alt="bettercodehub score" height="18">
</a>
<a
  href="https://coveralls.io/github/Xotic750/string-includes-x?branch=master"
  title="Coverage Status">
<img src="https://coveralls.io/repos/github/Xotic750/string-includes-x/badge.svg?branch=master"
  alt="Coverage Status" height="18">
</a>

<a name="module_string-includes-x"></a>

## string-includes-x

Determines whether one string may be found within another string.

<a name="exp_module_string-includes-x--module.exports"></a>

### `module.exports` ⇒ <code>boolean</code> ⏏

This method determines whether one string may be found within another string,
returning true or false as appropriate.

**Kind**: Exported member  
**Returns**: <code>boolean</code> - `true` if the given string is found anywhere within the
search string; otherwise, `false` if not.  
**Throws**:

- <code>TypeError</code> If target is null or undefined.
- <code>TypeError</code> If searchString is a RegExp.

| Param        | Type                | Description                                                                                  |
| ------------ | ------------------- | -------------------------------------------------------------------------------------------- |
| string       | <code>string</code> | The target string.                                                                           |
| searchString | <code>string</code> | A string to be searched for within the target string.                                        |
| [position]   | <code>number</code> | The position within the string at which to begin searching for searchString.(defaults to 0). |

**Example**

```js
import strIncludes from 'string-includes-x';

const str = 'To be, or not to be, that is the question.';

includes(str, 'To be'); // true
includes(str, 'question'); // true
includes(str, 'nonexistent'); // false
includes(str, 'To be', 1); // false
includes(str, ('TO BE'); // false
```

---
_Source: https://npm.io/package/string-includes-x · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
