main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
696 bytes
|
Line | |
---|
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 |
|
---|
7 | var Uint8Array = globalThis.Uint8Array;
|
---|
8 |
|
---|
9 | // `Uint8Array.prototype.setFromBase64` method
|
---|
10 | // https://github.com/tc39/proposal-arraybuffer-base64
|
---|
11 | if (Uint8Array) $({ target: 'Uint8Array', proto: true }, {
|
---|
12 | setFromBase64: function setFromBase64(string /* , options */) {
|
---|
13 | anUint8Array(this);
|
---|
14 |
|
---|
15 | var result = $fromBase64(string, arguments.length > 1 ? arguments[1] : undefined, this, this.length);
|
---|
16 |
|
---|
17 | return { read: result.read, written: result.written };
|
---|
18 | }
|
---|
19 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.