Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

smartlook-client

Package Overview
Dependencies
Maintainers
10
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartlook-client - npm Package Compare versions

Comparing version 7.0.1 to 7.0.2

1

dist/index.d.ts

@@ -5,2 +5,3 @@ declare const _default: {

version?: "nextgen" | "legacy" | undefined;
cookies?: boolean | undefined;
} | undefined) => boolean;

@@ -7,0 +8,0 @@ identify: (userId: string | number, props: {

4

dist/index.js

@@ -14,5 +14,5 @@ "use strict";

};
var _a = params !== null && params !== void 0 ? params : {}, _b = _a.region, region = _b === void 0 ? 'eu' : _b, _c = _a.version, version = _c === void 0 ? 'nextgen' : _c;
var _a = params !== null && params !== void 0 ? params : {}, _b = _a.region, region = _b === void 0 ? 'eu' : _b, _c = _a.version, version = _c === void 0 ? 'nextgen' : _c, _d = _a.cookies, cookies = _d === void 0 ? true : _d;
w.smartlook.api = [];
w.smartlook('init', key, { region: region });
w.smartlook('init', key, { region: region, cookies: cookies });
var head = window.document.getElementsByTagName('head')[0];

@@ -19,0 +19,0 @@ var script = window.document.createElement('script');

@@ -9,5 +9,6 @@ type SmartlookWindow = Window & { smartlook?: any }

* @param key Project key from project settings
* @param params Not required parameters, default region is 'eu' and default version is 'nextgen'
* @param params Not required parameters, default region is 'eu', default version is 'nextgen'
* and storing metadata in cookies is enabled by default
*/
init: function (key: string, params?: { region?: 'eu' | 'us'; version?: 'nextgen' | 'legacy' }): boolean {
init: function (key: string, params?: { region?: 'eu' | 'us'; version?: 'nextgen' | 'legacy', cookies?: boolean }): boolean {
const w = window as SmartlookWindow

@@ -22,6 +23,6 @@ if (w.smartlook) {

const { region = 'eu', version = 'nextgen' } = params ?? {}
const { region = 'eu', version = 'nextgen', cookies = true } = params ?? {}
w.smartlook.api = []
w.smartlook('init', key, { region })
w.smartlook('init', key, { region, cookies })

@@ -28,0 +29,0 @@ const head = window.document.getElementsByTagName('head')[0]

{
"name": "smartlook-client",
"version": "7.0.1",
"version": "7.0.2",
"description": "Official Smartlook client for easy frontend integration.",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -25,3 +25,3 @@ # Smartlook-client

init(string key)
init(string key, params?: { region?: 'eu' | 'us', version?: 'legacy' | 'nextgen' })
init(string key, params?: { region?: 'eu' | 'us', version?: 'legacy' | 'nextgen', cookies?: boolean })
```

@@ -28,0 +28,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc