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

zen-observable

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zen-observable - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

test/species.js

2

package.json
{
"name": "zen-observable",
"version": "0.5.0",
"version": "0.5.1",
"repository": "zenparsing/zen-observable",

@@ -5,0 +5,0 @@ "description": "An Implementation of ES Observables",

@@ -30,5 +30,11 @@ // === Symbol Support ===

function getSpecies(ctor) {
let symbol = getSymbol("species");
return symbol ? ctor[symbol] : ctor;
function getSpecies(obj) {
let ctor = obj.constructor;
if (ctor !== undefined) {
ctor = ctor[getSymbol("species")];
if (ctor === null) {
ctor = undefined;
}
}
return ctor !== undefined ? ctor : Observable;
}

@@ -266,3 +272,3 @@

let C = getSpecies(this.constructor);
let C = getSpecies(this);

@@ -289,3 +295,3 @@ return new C(observer => this.subscribe({

let C = getSpecies(this.constructor);
let C = getSpecies(this);

@@ -312,3 +318,3 @@ return new C(observer => this.subscribe({

let C = getSpecies(this.constructor);
let C = getSpecies(this);
let hasSeed = arguments.length > 1;

@@ -355,3 +361,3 @@ let hasValue = false;

let C = getSpecies(this.constructor);
let C = getSpecies(this);

@@ -358,0 +364,0 @@ return new C(observer => {

@@ -9,2 +9,3 @@ import { runTests } from "es-observable-tests";

import filterTests from "./filter.js";
import speciesTests from "./species.js";

@@ -17,3 +18,4 @@ runTests(Observable).then(() => {

"filter": filterTests,
"species": speciesTests,
});
});

@@ -30,5 +30,11 @@ 'use strict'; (function(fn, name) { if (typeof exports !== 'undefined') fn(exports, module); else if (typeof self !== 'undefined') fn(name === '*' ? self : (name ? self[name] = {} : {})); })(function(exports, module) { // === Symbol Support ===

function getSpecies(ctor) {
var symbol = getSymbol("species");
return symbol ? ctor[symbol] : ctor;
function getSpecies(obj) {
var ctor = obj.constructor;
if (ctor !== undefined) {
ctor = ctor[getSymbol("species")];
if (ctor === null) {
ctor = undefined;
}
}
return ctor !== undefined ? ctor : Observable;
}

@@ -266,3 +272,3 @@

var C = getSpecies(this.constructor);
var C = getSpecies(this);

@@ -289,3 +295,3 @@ return new C(function(observer) { return __this.subscribe({

var C = getSpecies(this.constructor);
var C = getSpecies(this);

@@ -312,3 +318,3 @@ return new C(function(observer) { return __this.subscribe({

var C = getSpecies(this.constructor);
var C = getSpecies(this);
var hasSeed = arguments.length > 1;

@@ -355,3 +361,3 @@ var hasValue = false;

var C = getSpecies(this.constructor);
var C = getSpecies(this);

@@ -358,0 +364,0 @@ return new C(function(observer) {

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