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

@ekidpro/bridge

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ekidpro/bridge - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

build/src/web/emitter/emitter-events.d.ts

3

build/src/web/index.d.ts
import { Listener } from './listener';
import { Emitter } from './emitter/emitter';
declare global {

@@ -15,2 +16,3 @@ interface Window {

};
emitter?: Emitter;
deeplink?: string;

@@ -22,2 +24,3 @@ };

}
export { EmitterEvents } from './emitter/emitter-events';
export { Listener, NetworkChange } from './listener';

@@ -24,0 +27,0 @@ export { controller } from './controller';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var emitter_events_1 = require("./emitter/emitter-events");
Object.defineProperty(exports, "EmitterEvents", { enumerable: true, get: function () { return emitter_events_1.EmitterEvents; } });
var listener_1 = require("./listener");

@@ -4,0 +6,0 @@ Object.defineProperty(exports, "Listener", { enumerable: true, get: function () { return listener_1.Listener; } });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Listener = void 0;
const emitter_1 = require("./emitter/emitter");
class Listener {

@@ -8,2 +9,5 @@ constructor() {

window.ekp.listener = undefined;
if (window.ekp.emitter) {
window.ekp.emitter.destroy();
}
};

@@ -18,4 +22,5 @@ }

window.ekp.listener = new Listener();
window.ekp.emitter = new emitter_1.Emitter();
return window.ekp.listener;
};
//# sourceMappingURL=listener.js.map

4

package.json
{
"name": "@ekidpro/bridge",
"version": "1.0.7",
"version": "1.0.8",
"description": "Bridge between ekidpro app with website",

@@ -47,2 +47,2 @@ "homepage": "https://github.com/ekidpro-vn/bridge",

}
}
}

@@ -162,1 +162,21 @@ ![ekidpro](./documents/image.png 'eKidPro Logo')

* // TODO: getUserInfo()
4. Lắng nghe thay đổi từ trong app
```js
window.ekp.emitter;
```
Đây là object Emitter dành cho việc giao tiếp. Nếu như khó trong việc quản lý state, việc thay đổi emitter thành object|events khác hoàn toàn khả thi.
First example:
```js
const handler = data => console.log(data);
window.ekp.emitter.add('INSETS_CHANGE', handler);
// Later
// IMPORTANT: do not forget to remove handler
window.ekp.emitter.remove('INSETS_CHANGE', handler);
```

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