humanization
Advanced tools
Comparing version 6.1.0 to 6.2.0
@@ -16,4 +16,5 @@ import { ProcessedCharacter } from "../process"; | ||
pauseMax?: number; | ||
onStroke({ stroke, strokedStream }: { | ||
onStroke({ stroke, previousStroke, strokedStream }: { | ||
stroke: StrokedCharacter; | ||
previousStroke: StrokedCharacter; | ||
strokedStream: StrokedStream; | ||
@@ -20,0 +21,0 @@ }): void | Promise<any>; |
@@ -50,8 +50,10 @@ "use strict"; | ||
var stream = _a.stream, onStroke = _a.onStroke, _b = _a.pauseMin, pauseMin = _b === void 0 ? 15 : _b, _c = _a.pauseMax, pauseMax = _c === void 0 ? 250 : _c; | ||
return exports.generateStrokedStream({ stream: stream }).reduce(function (promise, stroke) { | ||
return exports.generateStrokedStream({ stream: stream }).reduce(function (promise, stroke, index) { | ||
return promise.then(function (prevStrokes) { | ||
var nextStream = __spreadArrays(prevStrokes, [stroke]); | ||
var previousStroke = prevStrokes[index - 1]; | ||
return new Promise(function (resolve) { | ||
var maybePromise = onStroke({ | ||
stroke: stroke, | ||
previousStroke: previousStroke, | ||
strokedStream: nextStream | ||
@@ -58,0 +60,0 @@ }); |
{ | ||
"name": "humanization", | ||
"version": "6.1.0", | ||
"version": "6.2.0", | ||
"description": "To err is human", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/dzucconi/humanization", |
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
44250
988