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

windowed-observable

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

windowed-observable - npm Package Compare versions

Comparing version 0.3.4 to 0.4.0

dist/windowed-observable.cjs.development.js

0

dist/index.d.ts
export { Observer, ObserversArray, EventsArray, SubscriptionOptions, default as Observable, } from './observable';

12

dist/index.js

@@ -1,4 +0,8 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var observable_1 = require("./observable");
exports.Observable = observable_1.default;
'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./windowed-observable.cjs.production.min.js')
} else {
module.exports = require('./windowed-observable.cjs.development.js')
}

@@ -5,15 +5,10 @@ export declare const EVENTS = "__events__";

export declare type EventsArray = Array<any>;
interface EventsArrayMap {
[namespace: string]: EventsArray;
}
export declare type Observer = (data: any) => void;
export declare type ObserversArray = Array<Observer>;
interface ObserversArrayMap {
[namespace: string]: ObserversArray;
}
declare global {
interface Window {
[SHARED]: any;
[EVENTS]: EventsArrayMap;
[OBSERVERS]: ObserversArrayMap;
[SHARED]: {
[EVENTS]: Record<string, EventsArray>;
[OBSERVERS]: Record<string, ObserversArray>;
};
}

@@ -34,4 +29,4 @@ }

set namespace(namespace: string);
dispatch(data: any): void;
publish(data: any): void;
dispatch: (data: any) => void;
subscribe(observer: Observer, options?: SubscriptionOptions): void;

@@ -38,0 +33,0 @@ unsubscribe(observer: Observer): void;

{
"name": "windowed-observable",
"version": "0.3.4",
"description": "Simple messaging api",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"author": "Luis Takahashi",
"version": "0.4.0",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"module": "dist/windowed-observable.esm.js",
"files": [
"/dist"
"dist",
"src"
],
"engines": {
"node": ">=10"
},
"scripts": {
"test": "jest",
"lint": "eslint --ignore-path .gitignore '*/**/*.{js,ts,tsx}' --quiet --fix",
"prebuild": "rm -Rf dist/",
"build": "tsc",
"prepare": "yarn build",
"start": "tsdx watch",
"build": "tsdx build",
"test": "tsdx test",
"lint": "tsdx lint",
"prepare": "tsdx build",
"validate": "npm-run-all --parallel lint test build"

@@ -22,4 +28,2 @@ },

},
"author": "luis.takahashi",
"license": "Unlicense",
"bugs": {

@@ -29,25 +33,21 @@ "url": "https://github.com/luistak/windowed-observable/issues"

"homepage": "https://github.com/luistak/windowed-observable#readme",
"peerDependencies": {},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
}
},
"prettier": {
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
},
"devDependencies": {
"@types/jest": "^24.0.24",
"@typescript-eslint/eslint-plugin": "^2.18.0",
"@typescript-eslint/parser": "^2.18.0",
"eslint": "^6.8.0",
"jest": "^24.9.0",
"npm-run-all": "^4.1.5",
"ts-jest": "^24.2.0",
"typescript": "^3.7.2"
},
"jest": {
"transform": {
"^.+\\.ts?$": "ts-jest"
},
"moduleFileExtensions": [
"ts",
"js"
],
"testPathIgnorePatterns": [
"dist",
"node_modules"
]
"husky": "^4.2.5",
"tsdx": "^0.13.2",
"tslib": "^2.0.0",
"typescript": "^3.9.7",
"npm-run-all": "^4.1.5"
}
}

@@ -5,7 +5,7 @@ # windowed-observable

**windowed-observable** is a library for messaging using Observables, making it easier to communicate multiple apps or parts of an app using the window. It expose a Observable that behaves like a scoped Pub/Sub topic using namespaces.
**windowed-observable** is a library for messaging using Observables, making it easier to communicate multiple apps or parts of an app using the window. It exposes an Observable that behaves like a scoped Pub/Sub topic using namespaces.
## Installation
```sh
npm install windowed-obserbale
npm install windowed-observable

@@ -25,12 +25,10 @@ # or

import { Observable } from 'windowed-observable';
const observable = new Observable('konoha');
observable.subscribe((ninja) => {
console.log(ninja)
})
observable.publish('Uchiha Shisui');
// > Uchiha Shisui
```
### Retrieving latest event

@@ -115,2 +113,2 @@ ```ts

);
```
```

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