Socket
Socket
Sign inDemoInstall

hyperapplicable

Package Overview
Dependencies
1
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.2 to 0.9.0

21

dist/hyperapplicable.d.ts

@@ -1,7 +0,10 @@

import { ClassProp, MaybeVNode, VNode, Action, Effect, Dispatchable, CustomPayloads, Dispatch, Unsubscribe } from 'hyperapp';
import { Action, Effect, Dispatchable, MaybeVNode, CustomPayloads, Dispatch, Unsubscribe, ClassProp, VNode } from 'hyperapp';
declare const box: <S>(classProp: ClassProp, contents: MaybeVNode<S> | MaybeVNode<S>[]) => VNode<S>;
declare type Debounce<S> = {
action: Action<S>;
delay: number;
payload: unknown;
};
declare const debounce: <S>(action: Action<S, any>, delay: number, payload?: unknown) => Effect<S, Debounce<S>>;
declare const isAction: <S, P = any>(x: unknown) => x is Action<S, P>;
declare const log: <S>(x: unknown) => Effect<S, any>;

@@ -11,4 +14,2 @@

declare const readout: <S>(prop: string) => (obj: Record<string, unknown>) => VNode<S>;
declare type ActionWithPayload<S, P = any> = [action: Action<S, P>, payload: P];

@@ -30,2 +31,6 @@ declare type Content<S> = number | string | MaybeVNode<S>;

declare const box: <S>(classProp: ClassProp, contents: MaybeVNode<S> | MaybeVNode<S>[]) => VNode<S>;
declare const readout: <S>(prop: string) => (obj: Record<string, unknown>) => VNode<S>;
declare const contentView: <S>(view: Content<S> | VistaView<S>) => (state: S) => MaybeVNode<S>[];

@@ -36,2 +41,4 @@ declare const isVista: <S>(x: unknown) => x is Vista<S>;

export { ActionWithPayload, Content, CustomProps, Effecter, Reaction, StateFormat, StateWithEffects, Subscriber, Transform, View, ViewComponent, Vista, VistaView, box, contentView, isAction, isVNode, isVista, log, next, readout, unite, vista };
declare const isAction: <S, P = any>(x: unknown) => x is Action<S, P>;
export { ActionWithPayload, Content, CustomProps, Effecter, Reaction, StateFormat, StateWithEffects, Subscriber, Transform, View, ViewComponent, Vista, VistaView, box, contentView, debounce, isAction, isVNode, isVista, log, next, readout, unite, vista };

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

(function(e,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("hyperapp")):typeof define=="function"&&define.amd?define(["exports","hyperapp"],i):(e=typeof globalThis<"u"?globalThis:e||self,i(e.hyperapplicable={},e.Hyperapp))})(this,function(e,i){"use strict";const l=(t,n)=>i.h("div",{class:t},n),d=t=>typeof t=="function"||Array.isArray(t)&&t.length>0,A=(t,n)=>{window.requestAnimationFrame(()=>console.log(n))},p=t=>[A,t],g=(t,n)=>{window.requestAnimationFrame(()=>t(n))},m=t=>[g,t],b=(t,n)=>typeof n=="function"?"function":n,h=t=>n=>i.h("pre",{},i.text(`${t}: ${JSON.stringify(n[t],b,2)}`)),V=(t,...n)=>{let o=t;for(let r=0;r<n.length;++r){const a=n[r];if(!Array.isArray(o))o=a(o);else{const[N,...y]=o,c=a(N);if(!Array.isArray(c))o=[c,...y];else{const[_,...j]=c;o=[_,...y,...j]}}}return o},s=t=>n=>{if(typeof t=="function"){const o=t(n);return Array.isArray(o)?o:[o]}return typeof t=="number"||typeof t=="string"?[i.text(t)]:[t]},S=t=>t==null||typeof t=="boolean"||typeof t=="function"||typeof t=="number"||typeof t=="string"||f(t),f=t=>typeof t=="object"&&t!=null&&"node"in t,u=t=>n=>Array.isArray(t)?t.reduce((o,r)=>[...o,...Array.isArray(r)?u(r)(n):s(r)(n)],[]):s(t)(n);e.box=l,e.contentView=s,e.isAction=d,e.isVNode=f,e.isVista=S,e.log=p,e.next=m,e.readout=h,e.unite=V,e.vista=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
(function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("hyperapp")):typeof define=="function"&&define.amd?define(["exports","hyperapp"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.hyperapplicable={},n.Hyperapp))})(this,function(n,i){"use strict";let u;const l=(t,e)=>{clearTimeout(u),u=setTimeout(()=>window.requestAnimationFrame(()=>t(e.action,e.payload)),e.delay)},A=(t,e,o)=>[l,{action:t,delay:e,payload:o}],m=(t,e)=>{window.requestAnimationFrame(()=>console.log(e))},b=t=>[m,t],g=(t,e)=>{window.requestAnimationFrame(()=>t(e))},h=t=>[g,t],p=(t,...e)=>{let o=t;for(let r=0;r<e.length;++r){const y=e[r];if(!Array.isArray(o))o=y(o);else{const[N,...d]=o,s=y(N);if(!Array.isArray(s))o=[s,...d];else{const[_,...j]=s;o=[_,...d,...j]}}}return o},V=(t,e)=>i.h("div",{class:t},e),S=(t,e)=>typeof e=="function"?"function":e,T=t=>e=>i.h("pre",{},i.text(`${t}: ${JSON.stringify(e[t],S,2)}`)),c=t=>e=>{if(typeof t=="function"){const o=t(e);return Array.isArray(o)?o:[o]}return typeof t=="number"||typeof t=="string"?[i.text(t)]:[t]},q=t=>t==null||typeof t=="boolean"||typeof t=="function"||typeof t=="number"||typeof t=="string"||a(t),a=t=>typeof t=="object"&&t!=null&&"node"in t,f=t=>e=>Array.isArray(t)?t.reduce((o,r)=>[...o,...Array.isArray(r)?f(r)(e):c(r)(e)],[]):c(t)(e),F=t=>typeof t=="function"||Array.isArray(t)&&t.length>0;n.box=V,n.contentView=c,n.debounce=A,n.isAction=F,n.isVNode=a,n.isVista=q,n.log=b,n.next=h,n.readout=T,n.unite=p,n.vista=f,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
{
"name": "hyperapplicable",
"version": "0.8.2",
"version": "0.9.0",
"description": "A utility library for Hyperapp.",

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc