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.9.0 to 0.10.0

4

lib/Observable.js

@@ -13,6 +13,2 @@ "use strict";

if (!hasSymbol('observable') && Object.isExtensible(Symbol)) {
Symbol.observable = Symbol('observable');
}
const SymbolIterator = getSymbol('iterator');

@@ -19,0 +15,0 @@ const SymbolObservable = getSymbol('observable');

2

package.json
{
"name": "zen-observable",
"version": "0.9.0",
"version": "0.10.0",
"repository": "zenparsing/zen-observable",

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

@@ -6,6 +6,2 @@ // === Symbol Support ===

if (!hasSymbol('observable') && Object.isExtensible(Symbol)) {
Symbol.observable = Symbol('observable');
}
const SymbolIterator = getSymbol('iterator');

@@ -12,0 +8,0 @@ const SymbolObservable = getSymbol('observable');

@@ -44,3 +44,3 @@ import assert from 'assert';

'constructor': Observable,
[Symbol.observable]() { return this },
[observableSymbol]() { return this },
};

@@ -50,5 +50,13 @@ assert.ok(Observable.from(obj) !== obj);

it('uses @@observable as the property name unless polyfilled', () => {
let obj = {
'constructor': Observable,
'@@observable'() { return this },
};
assert.ok(Observable.from(obj) !== obj);
});
it('throws if @@observable property is not a method', () => {
assert.throws(() => Observable.from({
[Symbol.observable]: 1
[observableSymbol]: 1
}));

@@ -67,3 +75,3 @@ });

let observable = Observable.from({
[Symbol.observable]() { return inner },
[observableSymbol]() { return inner },
});

@@ -70,0 +78,0 @@ observable.subscribe();

@@ -7,4 +7,5 @@ import { Observable } from '../src/Observable.js';

let $extensions = Object.getOwnPropertySymbols(Observable)[1];
let { hostReportError } = Observable[$extensions];
let { hostReportError, symbol } = Observable[$extensions];
hostReportError.log = (e => global.hostError = e);
global.observableSymbol = symbol;
});
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