Socket
Socket
Sign inDemoInstall

zen-observable-ts

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zen-observable-ts - npm Package Compare versions

Comparing version 0.4.4 to 0.5.0

lib/bundle.umd.js

2

lib/types.js

@@ -1,3 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

@@ -1,3 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function cleanupSubscription(subscription) {

@@ -75,3 +73,3 @@ var cleanup = subscription._cleanup;

}());
exports.Subscription = Subscription;
export { Subscription };
var SubscriptionObserver = (function () {

@@ -147,3 +145,3 @@ function SubscriptionObserver(subscription) {

}());
exports.SubscriptionObserver = SubscriptionObserver;
export { SubscriptionObserver };
var Observable = (function () {

@@ -400,3 +398,3 @@ function Observable(subscriber) {

}());
exports.default = Observable;
export default Observable;
//# sourceMappingURL=zenObservable.js.map
{
"name": "zen-observable-ts",
"version": "0.4.4",
"version": "0.5.0",
"description": "An Implementation of ES Observables in Typescript",

@@ -8,3 +8,5 @@ "author": "Evans Hauser <evanshauser@gmail.com>",

"license": "MIT",
"main": "./lib/zenObservable.js",
"main": "./lib/bundle.umd.js",
"module": "./lib/zenObservable.js",
"jsnext:main": "./lib/zenObservable.js",
"typings": "./lib/zenObservable.d.ts",

@@ -20,38 +22,36 @@ "repository": {

"scripts": {
"pretest": "npm run build",
"test": "npm run test-only --",
"posttest": "npm run lint",
"test-only": "mocha --reporter spec --full-trace dist/tests/tests.js",
"test-watch":
"mocha --reporter spec --full-trace dist/tests/tests.js --watch",
"coverage":
"istanbul cover ./node_modules/.bin/_mocha -- --reporter dot --full-trace dist/tests/tests.js",
"postcoverage":
"remap-istanbul --input coverage/coverage.json --type lcovonly --output coverage/lcov.info",
"build:browser":
"browserify ./lib/bundle.umd.js -o=./lib/bundle.js && npm run minify:browser",
"build": "tsc -p .",
"bundle": "rollup -c",
"clean": "rimraf lib/* && rimraf coverage/*",
"filesize": "npm run build && npm run build:browser",
"lint":
"tslint --type-check -p tsconfig.json src/*.ts && tslint --type-check -p tsconfig.json tests/*.ts",
"prebuild": "npm run clean:dist",
"build": "tsc -p .",
"postbuild": "cp -R ./dist/src/. ./lib",
"watch": "tsc -w -p .",
"clean": "npm run clean:dist && npm run clean:coverage",
"clean:dist": "rimraf dist/* && rimraf lib/*",
"clean:coverage": "rimraf coverage/*",
"prepublishOnly": "npm run clean && npm run build"
"tslint --type-check -p tsconfig.json -c ../../tslint.json src/*.ts",
"minify:browser":
"uglifyjs -c -m -o ./lib/bundle.min.js -- ./lib/bundle.js",
"postbuild": "npm run bundle",
"prebuild": "npm run clean",
"prepublishOnly": "npm run clean && npm run build",
"test": "jest",
"watch": "tsc -w -p ."
},
"devDependencies": {
"@types/chai": "4.0.4",
"@types/chai-as-promised": "0.0.31",
"@types/mocha": "2.2.42",
"chai": "4.1.1",
"chai-as-promised": "7.1.1",
"istanbul": "0.4.5",
"mocha": "3.5.0",
"remap-istanbul": "0.9.5",
"@types/jest": "21.1.1",
"browserify": "14.4.0",
"jest": "21.2.1",
"rimraf": "2.6.1",
"sinon": "3.2.0",
"source-map-support": "0.4.16",
"rollup": "0.45.2",
"ts-jest": "21.0.1",
"tslint": "5.7.0",
"typescript": "2.5.1"
"typescript": "2.5.1",
"uglify-js": "3.1.3"
},
"jest": {
"transform": {
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"moduleFileExtensions": ["ts", "tsx", "js", "json"]
}
}

@@ -283,28 +283,26 @@ import { ZenObservable } from './types';

this.subscribe(
<ZenObservable.Observer<T>>{
start(subscription: ZenObservable.Subscription) {
this._subscription = subscription;
},
this.subscribe(<ZenObservable.Observer<T>>{
start(subscription: ZenObservable.Subscription) {
this._subscription = subscription;
},
next(value: T) {
let subscription = this._subscription;
next(value: T) {
let subscription = this._subscription;
if (subscription.closed) {
return;
}
if (subscription.closed) {
return;
}
try {
fn(value);
return;
} catch (err) {
reject(err);
subscription.unsubscribe();
}
},
try {
fn(value);
return;
} catch (err) {
reject(err);
subscription.unsubscribe();
}
},
error: reject,
complete: resolve,
},
);
error: reject,
complete: resolve,
});
});

@@ -311,0 +309,0 @@ }

{
"extends": "../../tsconfig",
"compilerOptions": {
"target": "es5",
"lib": ["es6", "dom"],
"module": "commonjs",
"moduleResolution": "node",
"removeComments": true,
"sourceMap": true,
"declaration": true,
"rootDir": ".",
"outDir": "dist",
"noImplicitAny": true,
"noUnusedParameters": false,
"noUnusedLocals": true,
"skipLibCheck": true
"rootDir": "./src",
"outDir": "lib"
},
"include": ["src/**/*.ts", "tests/**/*.ts"]
"include": ["src/**/*.ts"],
"exclude": ["src/**/__tests__/*.ts"]
}

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