# react-fullstory-excluder

> react-fullstory-excluder React component

Latest version **3.1.0** (published 2023-01-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-fullstory-excluder
pnpm add react-fullstory-excluder
yarn add react-fullstory-excluder
bun add react-fullstory-excluder
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2023-01-20 |
| First published | 2020-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 61.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Mark Fulton |
| Maintainers | mfulton26 |
| Keywords | react-component |

## Links

- npm: https://www.npmjs.com/package/react-fullstory-excluder
- Repository: https://github.com/mfulton26/react-fullstory-excluder
- Issues: https://github.com/mfulton26/react-fullstory-excluder/issues
- npm.io page: https://npm.io/package/react-fullstory-excluder

## Dependencies (1)

- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^4.0.0

## Recent versions

- 3.1.0 (latest) — 2023-01-20
- 3.1.0-beta.2 (beta) — 2023-01-20
- 3.1.0-beta.1 — 2023-01-20
- 3.1.0-beta.0 — 2023-01-17
- 3.0.0 — 2023-01-16
- 3.0.0-beta.0 — 2023-01-16
- 2.0.0 — 2021-07-16
- 2.0.0-beta.0 — 2021-07-16
- 1.0.3 — 2020-12-01
- 1.0.2 — 2020-12-01
- 1.0.1 — 2020-11-27

## README

# react-fullstory-excluder

Get FullStory exclusion of sensitive data without the hassle of manually placing `fs-exclude` on every element yourself.

## Limitations

Does not work with the [new JSX Transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html)… yet. 😀

## Getting Started

You need to register a `FullStoryExcluder` at the base of your app. This allows `react-fullstory-excluder` to reliably inject `fs-exclude` class name throughout your app.

### Registration

Call the hook from any component in your app:

```jsx
import { useFullStoryExcluder } from "react-fullstory-excluder";

function SomeComponent() {
  useFullStoryExcluder();

  return <>some content</>;
}
```

## `useFullStoryExcluder` options

### `className`

the `class` name to inject to exclude things in FullStory

type: `string`

default: `"fs-exclude"`

### `ignoreClassName`

space delimited list of `class` names to check for before injecting; if any of the `class` names are present then the excluding [`className`](#classname) will not be injected

type: `string`

default: `"fs-unmask"`

### `htmlFormElements`

which elements to automatically exclude in FullStory

type: `"all" | "freeform" | "none"`

default: `"freeform"`

### `exclusionStrings`

which strings to automatically exclude in FullStory

type: `string[]`

default: `[]`

### `exclusionStringsIgnoreCase`

specifies ignoring case when matching text in elements to exclude

type: `boolean`

default: `false`

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