Socket
Socket
Sign inDemoInstall

hyperapplicable

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperapplicable - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

3

dist/hyperapplicable.d.ts

@@ -20,2 +20,3 @@ import { Action, MaybeVNode, CustomPayloads, Dispatch, Effect, Unsubscribe, ClassProp, VNode, Dispatchable } from 'hyperapp';

declare const isVNode: <S>(x: unknown) => x is VNode<S>;
declare const vista: <S>(xs: readonly (Content<S> | View<S>)[]) => (state: S) => MaybeVNode<S>[];

@@ -32,2 +33,2 @@ declare const handleWith: <S>(handlers: readonly Transform<S, Event>[]) => (state: StateFormat<S, any>, event: Event) => StateFormat<S, any>;

export { ActionWithPayload, Content, CustomProps, Effecter, Reaction, StateFormat, StateWithEffects, Subscriber, Transform, View, ViewComponent, box, contentNode, handleWith, isAction, isContent, isVNode, next, readout, unite };
export { ActionWithPayload, Content, CustomProps, Effecter, Reaction, StateFormat, StateWithEffects, Subscriber, Transform, View, ViewComponent, box, contentNode, handleWith, isAction, isContent, isVNode, next, readout, unite, vista };

@@ -5,2 +5,6 @@ import { text, h } from "hyperapp";

const isVNode = (x) => x != null && typeof x === "object" && "node" in x;
const vista = (xs) => (state) => xs.reduce((nodes, x) => [
...nodes,
typeof x === "function" ? x(state) : contentNode(x)
], []);
const box = (classProp, content) => h("div", { class: classProp }, contentNode(content));

@@ -27,2 +31,2 @@ const unite = (transform, stateForm, payload) => {

const readout = (prop) => (obj) => h("pre", {}, text(`${prop}: ${JSON.stringify(obj[prop], readoutReplacer, 2)}`));
export { box, contentNode, handleWith, isAction, isContent, isVNode, next, readout, unite };
export { box, contentNode, handleWith, isAction, isContent, isVNode, next, readout, unite, vista };

@@ -1,1 +0,1 @@

(function(t,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("hyperapp")):typeof define=="function"&&define.amd?define(["exports","hyperapp"],o):(t=typeof globalThis!="undefined"?globalThis:t||self,o(t.hyperapplicable={},t.Hyperapp))})(this,function(t,o){"use strict";const f=e=>typeof e=="number"||typeof e=="string"?o.text(e):e,y=e=>typeof e=="number"||typeof e=="string"||e==null||typeof e=="boolean"||r(e),r=e=>e!=null&&typeof e=="object"&&"node"in e,a=(e,n)=>o.h("div",{class:e},f(n)),d=(e,n,i)=>{if(!Array.isArray(n))return e(n,i);const[s,...c]=n,u=e(s,i);if(!Array.isArray(u))return[u,...c];const[g,...m]=u;return[g,...c,...m]},l=e=>(n,i)=>e.reduce((s,c)=>d(c,s,i),n),h=e=>typeof e=="function"||Array.isArray(e)&&e.length>0,b=(e,n)=>{window.requestAnimationFrame(()=>e(n))},p=e=>[b,e],A=(e,n)=>typeof n=="function"?"function":n,N=e=>n=>o.h("pre",{},o.text(`${e}: ${JSON.stringify(n[e],A,2)}`));t.box=a,t.contentNode=f,t.handleWith=l,t.isAction=h,t.isContent=y,t.isVNode=r,t.next=p,t.readout=N,t.unite=d,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
(function(t,i){typeof exports=="object"&&typeof module!="undefined"?i(exports,require("hyperapp")):typeof define=="function"&&define.amd?define(["exports","hyperapp"],i):(t=typeof globalThis!="undefined"?globalThis:t||self,i(t.hyperapplicable={},t.Hyperapp))})(this,function(t,i){"use strict";const u=e=>typeof e=="number"||typeof e=="string"?i.text(e):e,y=e=>typeof e=="number"||typeof e=="string"||e==null||typeof e=="boolean"||r(e),r=e=>e!=null&&typeof e=="object"&&"node"in e,a=e=>n=>e.reduce((c,o)=>[...c,typeof o=="function"?o(n):u(o)],[]),l=(e,n)=>i.h("div",{class:e},u(n)),d=(e,n,c)=>{if(!Array.isArray(n))return e(n,c);const[o,...s]=n,f=e(o,c);if(!Array.isArray(f))return[f,...s];const[m,...S]=f;return[m,...s,...S]},h=e=>(n,c)=>e.reduce((o,s)=>d(s,o,c),n),b=e=>typeof e=="function"||Array.isArray(e)&&e.length>0,p=(e,n)=>{window.requestAnimationFrame(()=>e(n))},A=e=>[p,e],N=(e,n)=>typeof n=="function"?"function":n,g=e=>n=>i.h("pre",{},i.text(`${e}: ${JSON.stringify(n[e],N,2)}`));t.box=l,t.contentNode=u,t.handleWith=h,t.isAction=b,t.isContent=y,t.isVNode=r,t.next=A,t.readout=g,t.unite=d,t.vista=a,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
{
"name": "hyperapplicable",
"version": "0.3.1",
"version": "0.4.0",
"description": "A utility library for Hyperapp.",

@@ -5,0 +5,0 @@ "keywords": [

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