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

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.5.3 to 4.5.4

14

haunted.js

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

function makeContainer(render$$1) {
function makeContainer(render) {
const read = scheduler();

@@ -103,3 +103,3 @@ const write = scheduler();

commit(result) {
render$$1(result, this.frag);
render(result, this.frag);
this.runEffects(commitSymbol);

@@ -418,6 +418,6 @@ }

Consumer: component(function ({ render: render$$1 }) {
Consumer: component(function ({ render }) {
const context = useContext(Context);
return render$$1(context);
return render(context);
}),

@@ -512,4 +512,4 @@

function haunted({ render: render$$1 }) {
const Container = makeContainer(render$$1);
function haunted({ render }) {
const Container = makeContainer(render);
const component = makeComponent(Container);

@@ -598,2 +598,2 @@ const createContext = makeContext(component);

export default haunted;
export { component, createContext, virtual, useCallback, useEffect, useState, useReducer, useMemo, useContext, useRef, hook, Hook };
export { Hook, component, createContext, hook, useCallback, useContext, useEffect, useMemo, useReducer, useRef, useState, virtual };

@@ -10,6 +10,3 @@ import { html, render, TemplateResult } from 'lit-html';

useShadowDOM: boolean,
shadowRootInit?: {
mode?: string
delegatesFocus?: boolean,
}
shadowRootInit?: ShadowRootInit,
}

@@ -54,3 +51,3 @@

interface HookWithLifecycle<T extends ComponentLike = HTMLElement, P extends any[] = null, R = void> extends Hook<T> {
interface HookWithLifecycle<T extends ComponentLike = HTMLElement, P extends any[] = [], R = void> extends Hook<T> {
update?(...args: P): R;

@@ -57,0 +54,0 @@ teardown?(): void;

{
"name": "haunted",
"version": "4.5.3",
"version": "4.5.4",
"description": "Hooks for web components",

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

"homepage": "https://github.com/matthewp/haunted#readme",
"typings": " lib/haunted.d.ts",
"typings": "lib/haunted.d.ts",
"devDependencies": {

@@ -34,0 +34,0 @@ "@matthewp/compile": "^2.4.3",

# Haunted 🦇 🎃
[![npm](https://img.shields.io/npm/dt/haunted)](https://npm.im/haunted)
[![npm](https://img.shields.io/npm/v/haunted)](https://npm.im/haunted)
React's Hooks API but for standard web components and [lit-html](https://lit-html.polymer-project.org/) or [hyperHTML](https://codepen.io/WebReflection/pen/pxXrdy?editors=0010).

@@ -4,0 +7,0 @@

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

function makeContainer(render$$1) {
function makeContainer(render) {
const read = scheduler();

@@ -103,3 +103,3 @@ const write = scheduler();

commit(result) {
render$$1(result, this.frag);
render(result, this.frag);
this.runEffects(commitSymbol);

@@ -418,6 +418,6 @@ }

Consumer: component(function ({ render: render$$1 }) {
Consumer: component(function ({ render }) {
const context = useContext(Context);
return render$$1(context);
return render(context);
}),

@@ -512,4 +512,4 @@

function haunted({ render: render$$1 }) {
const Container = makeContainer(render$$1);
function haunted({ render }) {
const Container = makeContainer(render);
const component = makeComponent(Container);

@@ -598,2 +598,2 @@ const createContext = makeContext(component);

export default haunted;
export { component, createContext, virtual, useCallback, useEffect, useState, useReducer, useMemo, useContext, useRef, hook, Hook };
export { Hook, component, createContext, hook, useCallback, useContext, useEffect, useMemo, useReducer, useRef, useState, virtual };
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