New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@iflix/events-receiver-client

Package Overview
Dependencies
Maintainers
31
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iflix/events-receiver-client - npm Package Compare versions

Comparing version 1.0.0-beta.10 to 1.0.1

2

built/src/index.d.ts

@@ -20,2 +20,2 @@ import { createQueue } from './queue';

export declare type EventQueuer = ReturnType<typeof createQueue>;
export declare function createClient({ buffer: bufferOptions, submitUrl, client: clientInfo }: ClientOptions): EventQueuer;
export declare function createClient({ buffer: bufferOptions, submitUrl, client: clientInfo }: ClientOptions): Promise<EventQueuer>;

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

});
function createBuffer(options) {
async function createBuffer(options) {
var _a;
if (idb_1.idbAvailable()) {
if (await idb_1.idbAvailable()) {
return new IndexedDbBuffer_1.IndexedDbBuffer((_a = options) === null || _a === void 0 ? void 0 : _a.indexedDb);

@@ -48,3 +48,3 @@ }

}
function createClient({ buffer: bufferOptions, submitUrl, client: clientInfo }) {
async function createClient({ buffer: bufferOptions, submitUrl, client: clientInfo }) {
const send = sender_1.createSender({

@@ -60,3 +60,3 @@ submitUrl,

send,
buffer: createBuffer(bufferOptions)
buffer: await createBuffer(bufferOptions)
});

@@ -63,0 +63,0 @@ return queueEvent;

declare type Transactor<T> = (store: IDBObjectStore) => T;
export declare function idbAvailable(): boolean;
export declare function idbAvailable(): Promise<boolean>;
export declare class IdbKv {

@@ -4,0 +4,0 @@ db: Promise<IDBDatabase>;

@@ -44,4 +44,13 @@ "use strict";

}
function idbAvailable() {
return typeof indexedDB !== 'undefined';
async function idbAvailable() {
// we need to try open db to test if it is available as it can be blocked
try {
if (typeof indexedDB === 'undefined')
return false;
const testdb = new IdbKv('availabilityTest', 'availabilityTest');
await testdb.db;
return true;
}
catch (e) { }
return false;
}

@@ -48,0 +57,0 @@ exports.idbAvailable = idbAvailable;

@@ -42,4 +42,14 @@ "use strict";

exports.StorageMap = StorageMap;
function isLocalStorageAvailable() {
try {
if (typeof localStorage === 'undefined')
return false;
localStorage.getItem('availabilityTestItem');
return true;
}
catch (e) { }
return false;
}
function tryCreateLocalStorageMap(ttlSeconds) {
if (typeof localStorage === 'undefined') {
if (!isLocalStorageAvailable()) {
return undefined;

@@ -46,0 +56,0 @@ }

{
"name": "@iflix/events-receiver-client",
"version": "1.0.0-beta.10",
"version": "1.0.1",
"description": "Decodes (and encodes) user tokens",

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

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

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