@cgtk/std 0.0.202 → 0.0.203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dom.d.ts +1 -0
  2. package/fn.js +0 -1
  3. package/package.json +1 -1
package/dom.d.ts CHANGED
@@ -53,6 +53,7 @@ export declare const imageData: (img: ImageBitmap) => ImageData;
53
53
  export type Child = ChildNode | string;
54
54
  export declare const append: (el: ParentNode, ...children: Child[]) => () => void;
55
55
  export type Attribs = Record<string, string | number | boolean>;
56
+ export type Canvas = HTMLCanvasElement | OffscreenCanvas;
56
57
  export declare const setAttrs: (el: Element, attrs: Attribs) => void;
57
58
  export declare const css: (styles: Record<string, {
58
59
  toString(): string;
package/fn.js CHANGED
@@ -4,7 +4,6 @@ import { isPromise } from "./checks.js";
4
4
  export const tee = f => x => (f(x), x);
5
5
  export const comp = (...fs) => (x) => fs.reduce((x, f) => f(x), x);
6
6
  export const pipe = (x, ...fs) => fs.reduce((x, f) => f(x), x);
7
- // export const forEach = <T, R = any>(...fs: Fn<T, R>[]) => (x: T) => fs.forEach(f => f(x));
8
7
  export const forEach = (...fs) => (...x) => fs.forEach(f => f(...x));
9
8
  export const and = (...fs) => (x) => fs.reduce((a, f) => a && f(x), true);
10
9
  export const or = (...fs) => (x) => fs.reduce((a, f) => a || f(x), false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgtk/std",
3
- "version": "0.0.202",
3
+ "version": "0.0.203",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "exports": {