main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
395 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict';
|
---|
| 2 | var classof = require('../internals/classof');
|
---|
| 3 |
|
---|
| 4 | var $TypeError = TypeError;
|
---|
| 5 |
|
---|
| 6 | // Perform ? RequireInternalSlot(argument, [[TypedArrayName]])
|
---|
| 7 | // If argument.[[TypedArrayName]] is not "Uint8Array", throw a TypeError exception
|
---|
| 8 | module.exports = function (argument) {
|
---|
| 9 | if (classof(argument) === 'Uint8Array') return argument;
|
---|
| 10 | throw new $TypeError('Argument is not an Uint8Array');
|
---|
| 11 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.