@softchef/cdk-iot-device-management
Version:
IoT device management is composed of things, thing types, thing groups, jobs, files API services. The constructs can be used independently, that are based on full-managed service to create an API Gateway & Lambda function.
22 lines (21 loc) • 606 B
JavaScript
import { __extends } from "tslib";
import { Writable } from "stream";
var HashCalculator = (function (_super) {
__extends(HashCalculator, _super);
function HashCalculator(hash, options) {
var _this = _super.call(this, options) || this;
_this.hash = hash;
return _this;
}
HashCalculator.prototype._write = function (chunk, encoding, callback) {
try {
this.hash.update(chunk);
}
catch (err) {
return callback(err);
}
callback();
};
return HashCalculator;
}(Writable));
export { HashCalculator };