Socket
Socket
Sign inDemoInstall

haunted

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haunted - npm Package Compare versions

Comparing version 4.6.3 to 4.7.0

4

haunted.js

@@ -426,6 +426,6 @@ import { directive, render } from 'https://unpkg.com/lit-html@^1.0.0/lit-html.js';

const useReducer = hook(class extends Hook {
constructor(id, state, _, initialState) {
constructor(id, state, _, initialState, init) {
super(id, state);
this.dispatch = this.dispatch.bind(this);
this.currentState = initialState;
this.currentState = init !== undefined ? init(initialState) : initialState;
}

@@ -432,0 +432,0 @@ update(reducer) {

declare type Reducer<S, A> = (state: S, action: A) => S;
declare const useReducer: <S, A>(_: Reducer<S, A>, initialState: S) => readonly [S, (action: A) => void];
declare const useReducer: <S, I, A>(_: Reducer<S, A>, initialState: I, init?: ((_: I) => S) | undefined) => readonly [S, (action: A) => void];
export { useReducer };
import { hook, Hook } from './hook';
const useReducer = hook(class extends Hook {
constructor(id, state, _, initialState) {
constructor(id, state, _, initialState, init) {
super(id, state);
this.dispatch = this.dispatch.bind(this);
this.currentState = initialState;
this.currentState = init !== undefined ? init(initialState) : initialState;
}

@@ -8,0 +8,0 @@ update(reducer) {

{
"name": "haunted",
"version": "4.6.3",
"version": "4.7.0",
"description": "Hooks for web components",

@@ -34,3 +34,3 @@ "main": "lib/haunted.js",

"@matthewp/compile": "^2.4.3",
"http-server": "^0.11.1",
"http-server": "^0.12.0",
"mocha-headless-chrome": "^2.0.3",

@@ -37,0 +37,0 @@ "typescript": "^3.6.2"

@@ -534,2 +534,7 @@ # Haunted 🦇 🎃

}
disconnectedCallback() {
super.disconnectedCallback();
this.hauntedState.teardown();
}
}

@@ -536,0 +541,0 @@ ```

@@ -426,6 +426,6 @@ import { directive, render } from '../lit-html/lit-html.js';

const useReducer = hook(class extends Hook {
constructor(id, state, _, initialState) {
constructor(id, state, _, initialState, init) {
super(id, state);
this.dispatch = this.dispatch.bind(this);
this.currentState = initialState;
this.currentState = init !== undefined ? init(initialState) : initialState;
}

@@ -432,0 +432,0 @@ update(reducer) {

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