UNPKG

@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.

21 lines (20 loc) 520 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HashCalculator = void 0; const stream_1 = require("stream"); class HashCalculator extends stream_1.Writable { constructor(hash, options) { super(options); this.hash = hash; } _write(chunk, encoding, callback) { try { this.hash.update(chunk); } catch (err) { return callback(err); } callback(); } } exports.HashCalculator = HashCalculator;