Comparing version 0.1.6 to 0.1.7
{ | ||
"name": "cakken", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"private": false, | ||
@@ -22,2 +22,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@types/aws-lambda": "^8.10.13", | ||
"@types/node": "^8.10.20" | ||
@@ -24,0 +25,0 @@ }, |
import { Iterator } from './iterator.interface'; | ||
import { IReducingComponent } from './reducing-component.interface'; | ||
import { NullReducingComponent } from './null-reducing-component'; | ||
import { ItemIterator } from './item-iterator'; | ||
@@ -49,2 +50,10 @@ export class Chain<S, T>{ | ||
public async runOne(initialValue: T, item: S): Promise<T> { | ||
this.validate(); | ||
const iterator = new ItemIterator<S>(); | ||
iterator.add([item]); | ||
return this.run(initialValue, iterator); | ||
} | ||
private validate() { | ||
@@ -51,0 +60,0 @@ |
import { ReducingComponent } from "./reducing-component"; | ||
import { Iterator} from './iterator.interface'; | ||
/** | ||
* S - item type to be processed | ||
* T - reduced item type | ||
*/ | ||
export abstract class SingleItemReducingComponent<S, T> extends ReducingComponent<S, T>{ | ||
@@ -5,0 +9,0 @@ |
31186
39
576
2
+ Added@types/aws-lambda@^8.10.13
+ Added@types/aws-lambda@8.10.147(transitive)