🚀 Socket Launch Week 🚀 Day 1: Introducing .NET Support in Socket.Learn More

react-native-clarity

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-clarity - npm Package Compare versions

Comparing version

to
0.0.1-beta.3

@@ -20,3 +20,3 @@ "use strict";

* @param projectId The Clarity project id to send data to.
* @param userId A custom identifier for the current user. If passed as null, the user id
* @param userId A custom identifier for the current user. If passed as undefined, the user id
* will be auto generated. The user id in general is sticky across sessions.

@@ -32,3 +32,7 @@ * The provided user id must follow these conditions:

*/
function initialize(projectId, userId, logLevel, allowMeteredNetworkUsage, enableWebViewCapture, allowedDomains) {
function initialize(projectId, userId) {
let logLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "None";
let allowMeteredNetworkUsage = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
let enableWebViewCapture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
let allowedDomains = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : ["*"];
if (Clarity === null) {

@@ -35,0 +39,0 @@ console.error("Clarity did not initialize properly.", LINKING_ERROR);

@@ -12,3 +12,3 @@ import { NativeModules, Platform } from 'react-native';

* @param projectId The Clarity project id to send data to.
* @param userId A custom identifier for the current user. If passed as null, the user id
* @param userId A custom identifier for the current user. If passed as undefined, the user id
* will be auto generated. The user id in general is sticky across sessions.

@@ -24,3 +24,7 @@ * The provided user id must follow these conditions:

*/
export function initialize(projectId, userId, logLevel, allowMeteredNetworkUsage, enableWebViewCapture, allowedDomains) {
export function initialize(projectId, userId) {
let logLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "None";
let allowMeteredNetworkUsage = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
let enableWebViewCapture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
let allowedDomains = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : ["*"];
if (Clarity === null) {

@@ -27,0 +31,0 @@ console.error("Clarity did not initialize properly.", LINKING_ERROR);

@@ -5,3 +5,3 @@ /**

* @param projectId The Clarity project id to send data to.
* @param userId A custom identifier for the current user. If passed as null, the user id
* @param userId A custom identifier for the current user. If passed as undefined, the user id
* will be auto generated. The user id in general is sticky across sessions.

@@ -17,3 +17,3 @@ * The provided user id must follow these conditions:

*/
export declare function initialize(projectId: string, userId: string, logLevel: string, allowMeteredNetworkUsage: boolean, enableWebViewCapture: boolean, allowedDomains: string[]): void;
export declare function initialize(projectId: string, userId?: string, logLevel?: string, allowMeteredNetworkUsage?: boolean, enableWebViewCapture?: boolean, allowedDomains?: string[]): void;
/**

@@ -20,0 +20,0 @@ * Sets a custom user id that can be used to identify the user. It has less

{
"name": "react-native-clarity",
"version": "0.0.1-beta.1",
"version": "0.0.1-beta.3",
"description": "A plugin to provide the Clarity experience for the React Native applications.",

@@ -50,3 +50,3 @@ "main": "lib/commonjs/index",

},
"homepage": "https://github.com/microsoft/clarity-apps",
"homepage": "https://clarity.microsoft.com/",
"publishConfig": {

@@ -53,0 +53,0 @@ "registry": "https://registry.npmjs.org/"

@@ -19,3 +19,3 @@ # react-native-clarity

// Initialize Clarity.
initialize("<ProjectId>", "<UserId>", "Verbose", true, true, ["*"]);
initialize("<ProjectId>");

@@ -30,2 +30,3 @@ // Set custom user id.

### Initialization arguments
```js

@@ -36,3 +37,3 @@ /**

* @param projectId The Clarity project id to send data to.
* @param userId A custom identifier for the current user. If passed as null, the user id
* @param userId A custom identifier for the current user. If passed as undefined, the user id
* will be auto generated. The user id in general is sticky across sessions.

@@ -50,7 +51,7 @@ * The provided user id must follow these conditions:

projectId: string,
userId: string,
logLevel: string,
allowMeteredNetworkUsage: boolean,
enableWebViewCapture: boolean,
allowedDomains: string[])
userId?: string,
logLevel: string = "None",
allowMeteredNetworkUsage: boolean = false,
enableWebViewCapture: boolean = true,
allowedDomains: string[] = ["*"])
```

@@ -57,0 +58,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet