### Installing DetectTor NPM Package - Bash Source: https://github.com/the-best-codes/detecttor/blob/main/README.md This snippet demonstrates how to install the DetectTor library using npm, which is a package manager for JavaScript. This command adds the package to your project's dependencies, making its functionalities available for use. ```bash npm install @bestcodes/detecttor ``` -------------------------------- ### Using DetectTor to Check IP and Current Client for Tor - TypeScript Source: https://github.com/the-best-codes/detecttor/blob/main/README.md This snippet shows how to import and use the `isIpTor` and `amIUsingTor` functions from the DetectTor library. `isIpTor` checks if a given IP address is a Tor exit node, while `amIUsingTor` determines if the current client making the request is using Tor. Both functions return a Promise that resolves with the detection result or rejects with an error. ```typescript import isIpTor, { amIUsingTor } from "@bestcodes/detecttor"; isIpTor("89.0.142.86") .then((result) => { console.log(result); }) .catch((error) => { console.error(error); }); amIUsingTor() .then((result) => { console.log(result); }) .catch((error) => { console.error(error); }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.