Sha256: 61feccbfd48b8ee49e599fca51a9543ed739d081c4f17c6888c1d24e9a414f6c
Contents?: true
Size: 612 Bytes
Versions: 6
Compression:
Stored size: 612 Bytes
Contents
const AbstractHandler = require("./AbstractHandler") class ArrayGetSizeHandler extends AbstractHandler { constructor() { super() } requiredParametersCount = 1 process(command) { try { if (command.payload.length < this.requiredParametersCount) { throw new Error("Array Get Size parameters mismatch") } let array = command.payload[0] return array.length } catch (error) { throw this.process_stack_trace(error, this.constructor.name) } } } module.exports = new ArrayGetSizeHandler()
Version data entries
6 entries across 3 versions & 1 rubygems