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.

esnext.uint8-array.set-from-base64.js 696B

12345678910111213141516171819
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var globalThis = require('../internals/global-this');
  4. var $fromBase64 = require('../internals/uint8-from-base64');
  5. var anUint8Array = require('../internals/an-uint8-array');
  6. var Uint8Array = globalThis.Uint8Array;
  7. // `Uint8Array.prototype.setFromBase64` method
  8. // https://github.com/tc39/proposal-arraybuffer-base64
  9. if (Uint8Array) $({ target: 'Uint8Array', proto: true }, {
  10. setFromBase64: function setFromBase64(string /* , options */) {
  11. anUint8Array(this);
  12. var result = $fromBase64(string, arguments.length > 1 ? arguments[1] : undefined, this, this.length);
  13. return { read: result.read, written: result.written };
  14. }
  15. });