@thi.ng/transducers
Advanced tools
Comparing version 0.10.0 to 0.10.1
{ | ||
"name": "@thi.ng/transducers", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "Lightweight transducer implementations for ES6 / TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import { Reducer, Transducer } from "./api"; | ||
export declare function transduce<A, B, C>(tx: Transducer<A, B>, rfn: Reducer<C, B>): Transducer<Iterable<A>, C>; | ||
export declare function transduce<A, B, C>(tx: Transducer<A, B>, rfn: Reducer<C, B>, xs: Iterable<A>): C; | ||
export declare function transduce<A, B, C>(tx: Transducer<A, B>, rfn: Reducer<C, B>, acc: C, xs: Iterable<A>): C; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const reduce_1 = require("./reduce"); | ||
const map_1 = require("./xform/map"); | ||
function transduce(...args) { | ||
@@ -14,2 +15,4 @@ let acc, xs; | ||
break; | ||
case 2: | ||
return map_1.map((x) => transduce(args[0], args[1], x)); | ||
default: | ||
@@ -16,0 +19,0 @@ throw new Error(`illegal arity ${args.length}`); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110863
2311