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

@scalecube/utils

Package Overview
Dependencies
Maintainers
7
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scalecube/utils - npm Package Compare versions

Comparing version 0.2.10-snapshot.feature-bugfix-api-missing-rxjs.1596043949 to 0.2.10-snapshot.feature-bugfix-createGatewayProxy-unsubscribe-streams.1601511838

2

cjs/check.d.ts
declare type Collection<T> = T[] | {
[key: string]: T;
};
export declare const assert: (predicate: boolean, msg: string) => void;
export declare const assert: (predicate: boolean, msg: string) => void | never;
export declare const isDefined: (val: any) => boolean;

@@ -6,0 +6,0 @@ export declare const assertDefined: (val: any, msg?: string) => void;

@@ -314,6 +314,3 @@ 'use strict';

ports: transfer,
data: {
detail: Object.assign({}, message.detail),
type: message.type,
},
data: message,
type: 'message',

@@ -354,3 +351,7 @@ });

}
postMessage(message) {
postMessage(message, ports) {
const event = {
ports,
data: message,
};
if (!this.otherPort) {

@@ -360,6 +361,6 @@ return;

if (this.otherSideStart) {
this.otherPort.dispatchEvent({ data: message });
this.otherPort.dispatchEvent(event);
}
else {
this.queue.push(message);
this.queue.push(event);
}

@@ -394,3 +395,3 @@ }

this.otherSideStart = true;
this.queue.forEach((message) => this.otherPort && this.otherPort.dispatchEvent({ data: message }));
this.queue.forEach((event) => this.otherPort && this.otherPort.dispatchEvent(event));
}

@@ -397,0 +398,0 @@ stopSending() {

export declare const saveToLogs: (identifier: string, msg: string, extra: {
[key: string]: any;
}, debug?: boolean | undefined, type?: "log" | "warn") => void;
}, debug?: boolean | undefined, type?: 'log' | 'warn') => void;

@@ -30,3 +30,3 @@ interface IMessagePortPolyfill {

}): boolean;
postMessage(message: string): void;
postMessage(message: string, ports?: MessagePort[]): void;
addEventListener(type: string, listener: any): void;

@@ -33,0 +33,0 @@ removeEventListener(type: string, listener: any): void;

declare type Collection<T> = T[] | {
[key: string]: T;
};
export declare const assert: (predicate: boolean, msg: string) => void;
export declare const assert: (predicate: boolean, msg: string) => void | never;
export declare const isDefined: (val: any) => boolean;

@@ -6,0 +6,0 @@ export declare const assertDefined: (val: any, msg?: string) => void;

export declare const saveToLogs: (identifier: string, msg: string, extra: {
[key: string]: any;
}, debug?: boolean | undefined, type?: "log" | "warn") => void;
}, debug?: boolean | undefined, type?: 'log' | 'warn') => void;

@@ -30,3 +30,3 @@ interface IMessagePortPolyfill {

}): boolean;
postMessage(message: string): void;
postMessage(message: string, ports?: MessagePort[]): void;
addEventListener(type: string, listener: any): void;

@@ -33,0 +33,0 @@ removeEventListener(type: string, listener: any): void;

@@ -19,3 +19,7 @@ // polyfill MessagePort and MessageChannel

}
postMessage(message) {
postMessage(message, ports) {
const event = {
ports,
data: message,
};
if (!this.otherPort) {

@@ -25,6 +29,6 @@ return;

if (this.otherSideStart) {
this.otherPort.dispatchEvent({ data: message });
this.otherPort.dispatchEvent(event);
}
else {
this.queue.push(message);
this.queue.push(event);
}

@@ -59,3 +63,3 @@ }

this.otherSideStart = true;
this.queue.forEach((message) => this.otherPort && this.otherPort.dispatchEvent({ data: message }));
this.queue.forEach((event) => this.otherPort && this.otherPort.dispatchEvent(event));
}

@@ -62,0 +66,0 @@ stopSending() {

@@ -9,6 +9,3 @@ export const applyPostMessagePolyfill = () => {

ports: transfer,
data: {
detail: Object.assign({}, message.detail),
type: message.type,
},
data: message,
type: 'message',

@@ -15,0 +12,0 @@ });

{
"name": "@scalecube/utils",
"version": "0.2.10-snapshot.feature-bugfix-api-missing-rxjs.1596043949",
"version": "0.2.10-snapshot.feature-bugfix-createGatewayProxy-unsubscribe-streams.1601511838",
"private": false,

@@ -24,3 +24,3 @@ "main": "cjs/index.js",

"dependencies": {
"@scalecube/api": "^0.2.10-snapshot.feature-bugfix-api-missing-rxjs.1596043949"
"@scalecube/api": "^0.2.10-snapshot.feature-bugfix-createGatewayProxy-unsubscribe-streams.1601511838"
},

@@ -38,3 +38,3 @@ "devDependencies": {

},
"gitHead": "02d2e49f02c790f8a71d5df2e08cb8e7eff29be8"
"gitHead": "1750715800d01cd61336c95439473ccdcdaa465a"
}
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