Last Updated : 03 Sep, 2024
Lodash _.isArrayBuffer() method Checks if the given object or value can be classified as an ArrayBuffer Value or not.
Syntax:_.isArrayBuffer( value );Parameters:
Example 1: In this example, this method returns true as the given value is an array buffer object.
JavaScript
// Defining Lodash variable
const _ = require('lodash');
let val = new ArrayBuffer(3)
// Checking for an ArrayBuffer
console.log("The Value is ArrayBuffer : "
+ _.isArrayBuffer(val));
Output:
The Value is ArrayBuffer : true
Example 2: In this example, this method returns false as the given value is not an array buffer object it is a string.
JavaScript
// Defining Lodash variable
const _ = require('lodash');
let val = "GeeksforGeeks"
// Checking for an ArrayBuffer
console.log("The Value is Array : "
+ _.isArrayBuffer(val));
Output:
The Value is ArrayBuffer : false
Example 3: In this example, this method returns false as the given value is not an array buffer object.
JavaScript
// Defining Lodash variable
const _ = require('lodash');
let val = { 1: 1 }
// Checking for an ArrayBuffer
console.log("The Value is Array : "
+ _.isArrayBuffer(val));
Output:
The Value is ArrayBuffer : false
Note: This will not work in normal JavaScript because it requires the lodash library to be installed and can be installed using
npm install lodash
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4