New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rallie/vue

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rallie/vue - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

6

dist/hooks.d.ts
import { UnwrapRef } from 'vue';
import { App, Connector, State, ReadOnlyState } from 'rallie';
export declare function getStateHook<T extends object>(state: State<T> | ReadOnlyState<T>): <P>(getter: (_state: T) => P) => import("vue").Ref<UnwrapRef<P>>;
export declare function getBroadcastHook<BroadcastEvents>(app: App): (events: Partial<BroadcastEvents>) => void;
export declare function getUnicastHook<UnicastEvents>(app: App | Connector): (events: Partial<UnicastEvents>) => void;
export declare function stateHook<T extends object>(state: State<T> | ReadOnlyState<T>): <P>(getter: (_state: T) => P) => import("vue").Ref<UnwrapRef<P>>;
export declare function eventsHook<Events>(app: App | Connector): (events: Partial<Events>) => void;
export declare function methodsHook<Methods>(app: App): (events: Partial<Methods>) => void;
import { ref, onBeforeUnmount, onBeforeMount } from 'vue';
// import { effect } from '@rallie/core'
function getStateHook(state) {
function stateHook(state) {
return function (getter) {

@@ -16,21 +16,21 @@ var stateRef = ref(state.get(getter));

}
function getBroadcastHook(app) {
function eventsHook(app) {
return function (events) {
var offBroadcast = null;
var off = null;
onBeforeMount(function () {
offBroadcast = app.onBroadcast(events);
off = app.listenEvents(events);
});
onBeforeUnmount(function () {
offBroadcast();
off();
});
};
}
function getUnicastHook(app) {
function methodsHook(app) {
return function (events) {
var offUnicast = null;
var off = null;
onBeforeMount(function () {
offUnicast = app.onUnicast(events);
off = app.addMethods(events);
});
onBeforeUnmount(function () {
offUnicast();
off();
});

@@ -50,2 +50,2 @@ };

export { getBroadcastHook, getStateHook, getUnicastHook };
export { eventsHook, methodsHook, stateHook };

@@ -8,3 +8,3 @@ (function (global, factory) {

// import { effect } from '@rallie/core'
function getStateHook(state) {
function stateHook(state) {
return function (getter) {

@@ -21,21 +21,21 @@ var stateRef = vue.ref(state.get(getter));

}
function getBroadcastHook(app) {
function eventsHook(app) {
return function (events) {
var offBroadcast = null;
var off = null;
vue.onBeforeMount(function () {
offBroadcast = app.onBroadcast(events);
off = app.listenEvents(events);
});
vue.onBeforeUnmount(function () {
offBroadcast();
off();
});
};
}
function getUnicastHook(app) {
function methodsHook(app) {
return function (events) {
var offUnicast = null;
var off = null;
vue.onBeforeMount(function () {
offUnicast = app.onUnicast(events);
off = app.addMethods(events);
});
vue.onBeforeUnmount(function () {
offUnicast();
off();
});

@@ -55,5 +55,5 @@ };

exports.getBroadcastHook = getBroadcastHook;
exports.getStateHook = getStateHook;
exports.getUnicastHook = getUnicastHook;
exports.eventsHook = eventsHook;
exports.methodsHook = methodsHook;
exports.stateHook = stateHook;

@@ -60,0 +60,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

{
"name": "@rallie/vue",
"version": "0.5.1",
"version": "0.5.2",
"description": "vue binding for rallie",

@@ -25,3 +25,3 @@ "author": "runnan <1608272694@qq.com>",

"dependencies": {
"rallie": "^0.5.1"
"rallie": "^0.5.2"
},

@@ -31,3 +31,6 @@ "peerDependencies": {

},
"gitHead": "37ae2d9a65e159cb8a32d50cc7751be8cc440807"
"devDependencies": {
"@rallie/core": "^0.5.2"
},
"gitHead": "1e4b57703550354bc5d2a1149a5081a4c5065b5b"
}
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