@thi.ng/transducers 8.3.25 → 8.3.26

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-11-30T22:27:38Z
3
+ - **Last updated**: 2022-12-16T12:52:25Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
 
3
- # ![transducers](https://media.thi.ng/umbrella/banners-20220914/thing-transducers.svg?ac87c470)
3
+ # ![@thi.ng/transducers](https://media.thi.ng/umbrella/banners-20220914/thing-transducers.svg?ac87c470)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/transducers.svg)](https://www.npmjs.com/package/@thi.ng/transducers)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/transducers.svg)
7
- [![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella)
7
+ [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  This project is part of the
10
10
  [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
@@ -55,13 +55,11 @@ This project is part of the
55
55
  - [Generators / Iterators](#generators--iterators)
56
56
  - [Reducers](#reducers)
57
57
  - [Authors](#authors)
58
- - [Maintainer](#maintainer)
59
- - [Contributors](#contributors)
60
58
  - [License](#license)
61
59
 
62
60
  ## About
63
61
 
64
- Lightweight transducer implementations for ES6 / TypeScript.
62
+ Lightweight transducer implementations for ES6 / TypeScript
65
63
 
66
64
  This library provides altogether ~130 transducers, reducers, sequence
67
65
  generators (ES6 generators/iterators) and additional supporting
@@ -171,11 +169,8 @@ ES module import:
171
169
 
172
170
  For Node.js REPL:
173
171
 
174
- ```text
175
- # with flag only for < v16
176
- node --experimental-repl-await
177
-
178
- > const transducers = await import("@thi.ng/transducers");
172
+ ```js
173
+ const transducers = await import("@thi.ng/transducers");
179
174
  ```
180
175
 
181
176
  Package sizes (brotli'd, pre-treeshake): ESM: 8.64 KB
@@ -1006,14 +1001,9 @@ and return a reduced result (as if it would be called via `reduce()`).
1006
1001
 
1007
1002
  ## Authors
1008
1003
 
1009
- ### Maintainer
1010
-
1011
- - Karsten Schmidt ([@postspectacular](https://github.com/postspectacular))
1012
-
1013
- ### Contributors
1014
-
1015
- - Alberto ([@nkint](https://github.com/nkint))
1016
- - Gavin Cannizzaro ([@gavinpc-mindgrub](https://github.com/gavinpc-mindgrub))
1004
+ - [Karsten Schmidt](https://thi.ng) (Main author)
1005
+ - [Gavin Cannizzaro](https://github.com/gavinpc-mindgrub)
1006
+ - [@nkint](https://github.com/nkint)
1017
1007
 
1018
1008
  If this project contributes to an academic publication, please cite it as:
1019
1009
 
@@ -1028,4 +1018,4 @@ If this project contributes to an academic publication, please cite it as:
1028
1018
 
1029
1019
  ## License
1030
1020
 
1031
- &copy; 2016 - 2022 Karsten Schmidt // Apache Software License 2.0
1021
+ &copy; 2016 - 2022 Karsten Schmidt // Apache License 2.0
package/api.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { Comparator, Fn, IObjectOf } from "@thi.ng/api";
2
2
  import type { Reduced } from "./reduced.js";
3
- export declare type Transducer<A, B> = (rfn: Reducer<any, B>) => Reducer<any, A>;
4
- export declare type TxLike<A, B> = Transducer<A, B> | IXform<A, B>;
5
- export declare type ReductionFn<A, B> = (acc: A, x: B) => A | Reduced<A>;
3
+ export type Transducer<A, B> = (rfn: Reducer<any, B>) => Reducer<any, A>;
4
+ export type TxLike<A, B> = Transducer<A, B> | IXform<A, B>;
5
+ export type ReductionFn<A, B> = (acc: A, x: B) => A | Reduced<A>;
6
6
  export interface Reducer<A, B> extends Array<any> {
7
7
  [0]: () => A;
8
8
  [1]: (acc: A) => A;
@@ -49,8 +49,8 @@ export interface IXform<A, B> {
49
49
  export interface IReducible<A, B> {
50
50
  $reduce(rfn: ReductionFn<A, B>, acc: A): A | Reduced<A>;
51
51
  }
52
- export declare type TransformFn = (x: any) => any;
53
- export declare type TransformSubSpec = IObjectOf<TransformSpec | TransformFn>;
52
+ export type TransformFn = (x: any) => any;
53
+ export type TransformSubSpec = IObjectOf<TransformSpec | TransformFn>;
54
54
  export interface TransformSpec extends Array<any> {
55
55
  [0]: TransformFn;
56
56
  [1]?: TransformSubSpec;
package/convolve.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { Fn0 } from "@thi.ng/api";
2
2
  import type { Reducer, Transducer } from "./api.js";
3
- export declare type ConvolutionKernel1D = [number, number][];
4
- export declare type ConvolutionKernel2D = [number, [number, number]][];
5
- export declare type ConvolutionKernel3D = [number, [number, number, number]][];
3
+ export type ConvolutionKernel1D = [number, number][];
4
+ export type ConvolutionKernel2D = [number, [number, number]][];
5
+ export type ConvolutionKernel3D = [number, [number, number, number]][];
6
6
  export interface ConvolutionOpts<K> {
7
7
  /**
8
8
  * Current cell states
package/flatten-with.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { DeepArrayValue, Fn, Nullable } from "@thi.ng/api";
2
2
  import type { Transducer } from "./api.js";
3
- declare type MaybeIterable<T> = Nullable<Iterable<T>>;
3
+ type MaybeIterable<T> = Nullable<Iterable<T>>;
4
4
  /**
5
5
  * Transducer. Takes a function `fn` which will be applied to each input
6
6
  * value. If the function returns an ES6 Iterable, the result will be
package/labeled.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Transducer } from "./api.js";
2
- export declare type LabelFn<L, T> = L | ((x: T) => L);
2
+ export type LabelFn<L, T> = L | ((x: T) => L);
3
3
  export declare function labeled<L, T>(id: LabelFn<L, T>): Transducer<T, [L, T]>;
4
4
  export declare function labeled<L, T>(id: LabelFn<L, T>, src: Iterable<T>): IterableIterator<[L, T]>;
5
5
  //# sourceMappingURL=labeled.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/transducers",
3
- "version": "8.3.25",
3
+ "version": "8.3.26",
4
4
  "description": "Lightweight transducer implementations for ES6 / TypeScript",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -21,7 +21,11 @@
21
21
  "url": "https://patreon.com/thing_umbrella"
22
22
  }
23
23
  ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
24
+ "author": "Karsten Schmidt (https://thi.ng)",
25
+ "contributors": [
26
+ "Gavin Cannizzaro (https://github.com/gavinpc-mindgrub)",
27
+ "@nkint (https://github.com/nkint)"
28
+ ],
25
29
  "license": "Apache-2.0",
26
30
  "scripts": {
27
31
  "build": "yarn clean && tsc --declaration",
@@ -34,22 +38,22 @@
34
38
  "test": "testament test"
35
39
  },
36
40
  "dependencies": {
37
- "@thi.ng/api": "^8.5.1",
38
- "@thi.ng/arrays": "^2.4.4",
39
- "@thi.ng/checks": "^3.3.4",
40
- "@thi.ng/compare": "^2.1.18",
41
- "@thi.ng/compose": "^2.1.20",
42
- "@thi.ng/errors": "^2.2.5",
43
- "@thi.ng/math": "^5.3.15",
44
- "@thi.ng/random": "^3.3.17"
41
+ "@thi.ng/api": "^8.6.0",
42
+ "@thi.ng/arrays": "^2.4.5",
43
+ "@thi.ng/checks": "^3.3.5",
44
+ "@thi.ng/compare": "^2.1.19",
45
+ "@thi.ng/compose": "^2.1.21",
46
+ "@thi.ng/errors": "^2.2.6",
47
+ "@thi.ng/math": "^5.3.16",
48
+ "@thi.ng/random": "^3.3.18"
45
49
  },
46
50
  "devDependencies": {
47
- "@microsoft/api-extractor": "^7.33.5",
48
- "@thi.ng/testament": "^0.3.6",
51
+ "@microsoft/api-extractor": "^7.33.7",
52
+ "@thi.ng/testament": "^0.3.7",
49
53
  "rimraf": "^3.0.2",
50
54
  "tools": "^0.0.1",
51
- "typedoc": "^0.23.20",
52
- "typescript": "^4.8.4"
55
+ "typedoc": "^0.23.22",
56
+ "typescript": "^4.9.4"
53
57
  },
54
58
  "keywords": [
55
59
  "2d",
@@ -567,5 +571,5 @@
567
571
  ],
568
572
  "year": 2016
569
573
  },
570
- "gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n"
574
+ "gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
571
575
  }