Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

an-uint8-array.js 395B

1234567891011
  1. 'use strict';
  2. var classof = require('../internals/classof');
  3. var $TypeError = TypeError;
  4. // Perform ? RequireInternalSlot(argument, [[TypedArrayName]])
  5. // If argument.[[TypedArrayName]] is not "Uint8Array", throw a TypeError exception
  6. module.exports = function (argument) {
  7. if (classof(argument) === 'Uint8Array') return argument;
  8. throw new $TypeError('Argument is not an Uint8Array');
  9. };