inspectlet-es
Version:
ES module for Inspectlet.
35 lines (30 loc) • 922 B
Markdown
# Inspectlet as ES module
[](https://www.npmjs.com/package/inspectlet-es)

ES module for [Inspectlet](https://www.inspectlet.com).
## Install
```sh
$ npm install --save inspectlet-es
```
If using TypeScript, also install the type definitions:
```sh
$ npm install --save @types/inspectlet-es
```
## Usage
Pick your favorite:
```js
const { insp, install } = require("inspectlet-es");
```
```js
import insp, { install } from 'inspectlet-es';
```
... then:
```js
install(12345678); // Substitute your ID
```
From there `insp()` can be used as a substitute to `__insp.push()`. `window.__insp` can also be used if you need access to the raw array:
```js
// Equivalent statements :
insp(['identify', "john@example.com"]);
window.__insp.push(['identify', "john@example.com"]);
```