Add support for ArrayBuffer input (#3548)

This commit is contained in:
Jérémy Lal
2023-02-05 10:45:17 +01:00
committed by GitHub
parent 4798d9da64
commit 9608f219bd
6 changed files with 37 additions and 2 deletions

View File

@@ -71,6 +71,14 @@ const typedArray = function (val) {
return false;
};
/**
* Is this value an ArrayBuffer object?
* @private
*/
const arrayBuffer = function (val) {
return val instanceof ArrayBuffer;
};
/**
* Is this value a non-empty string?
* @private
@@ -134,6 +142,7 @@ module.exports = {
bool: bool,
buffer: buffer,
typedArray: typedArray,
arrayBuffer: arrayBuffer,
string: string,
number: number,
integer: integer,