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

light-observable

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

light-observable - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

10

es/extras/merge.js
import { getSpecies } from '../helpers/getSpecies';
export function merge(...streams) {
return (stream) => {
const C = getSpecies(stream);
const allStreams = [stream].concat(streams);
return (otherStream) => {
const C = getSpecies(otherStream);
const allStreams = [otherStream].concat(streams);
return new C((observer) => {
let numObservers = allStreams.length;
const subscriptions = allStreams.map((operator) => {
return operator.subscribe({
const subscriptions = allStreams.map((stream) => {
return stream.subscribe({
next(value) {

@@ -11,0 +11,0 @@ observer.next(value);

@@ -1,2 +0,1 @@

export declare const $$iterator: any;
export declare const $$observable: any;
export declare const getSymbol: (name: string) => any;

@@ -1,6 +0,4 @@

const getSymbol = (name) => {
export const getSymbol = (name) => {
return (typeof Symbol === 'function' && Symbol[name]) || '@@' + name;
};
export const $$iterator = getSymbol('iterator');
export const $$observable = getSymbol('observable');
//# sourceMappingURL=symbols.js.map
import { enqueue } from './helpers/enqueue';
import { $$iterator, $$observable } from './helpers/symbols';
import { getSymbol } from './helpers/symbols';
import { ObservableSubscription } from './ObservableSubscription';

@@ -39,4 +39,4 @@ const fromArray = (arrayLike) => {

}
if (ish[$$observable]) {
const observable = ish[$$observable]();
if (ish[getSymbol('observable')]) {
const observable = ish[getSymbol('observable')]();
if (Object(observable) !== observable) {

@@ -50,4 +50,4 @@ throw new TypeError(error);

}
if (ish[$$iterator]) {
return new C(fromArray(ish[$$iterator]()));
if (ish[getSymbol('iterator')]) {
return new C(fromArray(ish[getSymbol('iterator')]()));
}

@@ -75,3 +75,3 @@ // For old browsers that doesn't support @@iterator

}
[$$observable]() {
[getSymbol('observable')]() {
return this;

@@ -78,0 +78,0 @@ }

@@ -13,4 +13,2 @@ 'use strict';

};
const $$iterator = getSymbol('iterator');
const $$observable = getSymbol('observable');

@@ -190,4 +188,4 @@ function cleanupSubscription(subscription) {

}
if (ish[$$observable]) {
const observable = ish[$$observable]();
if (ish[getSymbol('observable')]) {
const observable = ish[getSymbol('observable')]();
if (Object(observable) !== observable) {

@@ -201,4 +199,4 @@ throw new TypeError(error);

}
if (ish[$$iterator]) {
return new C(fromArray(ish[$$iterator]()));
if (ish[getSymbol('iterator')]) {
return new C(fromArray(ish[getSymbol('iterator')]()));
}

@@ -226,3 +224,3 @@ // For old browsers that doesn't support @@iterator

}
[$$observable]() {
[getSymbol('observable')]() {
return this;

@@ -326,9 +324,9 @@ }

function merge(...streams) {
return (stream) => {
const C = getSpecies(stream);
const allStreams = [stream].concat(streams);
return (otherStream) => {
const C = getSpecies(otherStream);
const allStreams = [otherStream].concat(streams);
return new C((observer) => {
let numObservers = allStreams.length;
const subscriptions = allStreams.map((operator) => {
return operator.subscribe({
const subscriptions = allStreams.map((stream) => {
return stream.subscribe({
next(value) {

@@ -335,0 +333,0 @@ observer.next(value);

{
"name": "light-observable",
"version": "1.3.0",
"version": "1.4.0",
"description": "Light observable ponyfill",

@@ -85,2 +85,3 @@ "main": "lib/index.js",

"prettier": "^1.13.6",
"redux": "^4.0.0",
"rollup": "^0.62.0",

@@ -87,0 +88,0 @@ "rollup-plugin-commonjs": "^9.1.3",

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