Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 1.95 KB

README.md

File metadata and controls

58 lines (42 loc) · 1.95 KB
Arcjet Logo

@arcjet/analyze

npm badge

Arcjet helps developers protect their apps in just a few lines of code. Implement rate limiting, bot protection, email verification, and defense against common attacks.

This is the Arcjet local analysis engine.

Installation

npm install -S @arcjet/analyze

Example

import { generateFingerprint, isValidEmail } from "@arcjet/analyze";

const fingerprint = generateFingerprint("127.0.0.1");
console.log("fingerprint: ", fingerprint);

const valid = isValidEmail("[email protected]");
console.log("is email valid?", valid);

Implementation

This package uses the Wasm bindings provided by @arcjet/analyze-wasm to call various functions that are exported by our wasm bindings.

We chose to put this logic in a separate package because we need to change the import structure for each runtime that we support in the wasm bindings. Moving this to a separate package allows us not to have to duplicate code while providing a combined higher-level api for calling our core functionality in Wasm.

License

Licensed under the Apache License, Version 2.0.