use-detect-capture
v1.0.1
Published
use-detect-capture is a React hook that detects screen capture or recording attempts in a web application. It monitors the usage of screen capture tools and notifies the application, enhancing security and privacy by allowing you to take action when scre
Downloads
5
Readme
use-detect-capture
use-detect-capture is a React hook that detects screen capture or recording attempts in a web application. It monitors the usage of screen capture tools and notifies the application, enhancing security and privacy by allowing you to take action when screen recording or capture is detected.
Installation
You can install the package using npm, yarn, or pnpm.
pnpm add use-detect-capture
yarn install use-detect-capture
npm install use-detect-capture
Usage
import { textSimilarity } from "use-detect-capture";
const similarity1 = textSimilarity("hello world", "hello", 2); // Default parameters (substring length: 2, case insensitive)
console.log(similarity1);
const similarity2 = textSimilarity("JavaScript", "javascript", 2, true); // Comparison is case-sensitive and the strings differ in case
console.log(similarity2);
const similarity3 = textSimilarity("apple pie", "apple", 3); // Substring length of 3, ignoring case by default
console.log(similarity3);
tsup
Bundle your TypeScript library with no config, powered by esbuild.
https://tsup.egoist.dev/
How to use this
- install dependencies
# pnpm
$ pnpm install
# yarn
$ yarn install
# npm
$ npm install
- Add your code to
src
- Add export statement to
src/index.ts
- Test build command to build
src
. Once the command works properly, you will seedist
folder.
# pnpm
$ pnpm run build
# yarn
$ yarn run build
# npm
$ npm run build
- Publish your package
$ npm publish
test package
https://www.npmjs.com/package/use-detect-capture