npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

inspetor

v1.1.3

Published

Inspetor Frontend Library for Javascript

Readme

Inspetor Antifraud

Inspetor's antrifraud SDK for Javascript (browser) integrations.

Description

Inspetor is a product developed to help your company to avoid fraudulent transactions. This README file should help you to integrate the Inspetor Javascript library into your product with a couple steps.

How to use

The Inspetor Javascript Library can be installed through npm or by a <script> (Global Variable) tag.

We recommend you to use the <script> tag (Global Variable) since this is a browser library.

Npm Method

First, install it:

npm install inspetor

After that you can import the library as usual:

import inspetor from 'inspetor'

or using require

const inspetor = require('inspetor')

PS: If you are using Browserify check on how to make our variable global

Script Tag (Global Variable)

You can also use the latest release from our CDN and import the build directly in your HTML:

<script src="https://files.inspcdn.net/inspetor-js/inspetor.min.js" />

The library will be available as the global variable inspetor.

API Docs

You can find more in-depth documentation about our frontend libraries and integrations in general here.

Library setup

In order to properly relay information to Inspetor's processing pipeline, you'll need to provide your customer-specific authentication credential:

  • authToken (provided by Inspetor)

P.S: Remember to use the sandbox authToken when you are not in production

With these, you can instantiate the Inspetor tracking instance. Our integration library instantiates a singleton instance to prevent multiple trackers from being instantiated, which could otherwise result in duplicate or inconsistent data being relayed to Inspetor.

The singleton instance is instantiated as follows:

  inspetor.sharedInstance().setup(authToken="authToken", requestLocation=false);

Be advised, that this function can throw an exception if you pass invalids (empty strings or not in the format required) authToken.

All the access to the Inspetor functions is made via calling the inspetor.sharedInstance().

The parameters passed are the following, in order:

Parameter | Required | Type | Description --------- | -------- | ---- | ----------- authToken | Yes | String | An unique identifier that the Inspetor Team will provide to you requestLocation | Yes | Boolean | If set to true we will ask for the user's permission (which will help us provide more accurate results)

Library Calls

If you've already read the general Inspetor files, you should be aware of all of Inspetor requests and collection functions.

Here we will show you some details to be aware of if you are calling the Inspetor tracking functions.

All of out track functions can throw exceptions, but the only exception they will through is if you forget to configure the Inspetor Library before calling one of them. Because of that the Inspetor class have a function called isConfigured() that returns a boolean saying if you have configured or not the Inspetor Library. We recommend that when you call any of our tracking functions you check if the Inspetor Library is configured. Here is an example on how to do that:

if (inspetor.sharedInstance().isConfigured()) {
    inspetor.sharedInstance().trackAccountCreation("123");
}

trackPageView

Pageview tracking is performed automatically by the library every time the user reloads the page or changes the url. We do provide the option to manually trigger "pseudo pageview" events (pageviews that do not change the page or do not change the url of the page). You should be careful when manually tracking pageviews since it can lead to duplicate pageview events. We recommend that you contact the Inspetor team to get advice when using the trackPageView function.

Here you can see an example of manually triggering the trackPageView function:

if (inspetor.sharedInstance().isConfigured()) {
    inspetor.sharedInstance().trackPageView("Pseudo PageView")
}

Models

If you are coming from one of our backend libraries you will notice that we do not use models (e.g. Account, Sale) in our frontend libraries. Here you just need to send us the id of the model (e.g. sale ID, account ID).

More Information

For more info you should check the Inspetor Frontend docs