Node.js Buffer.kMaxLength Property
The Buffer.kMaxLength property is an inbuilt application programming interface of class Buffer within buffer module which is used to set and get the maximum length allowed for single buffer instance.
Parameters: This property works as a getter and setter so it takes integer value as a parameter sometimes.
Return Value: This property return the maximum length allowed for single buffer instance.
Example 1: Filename: index.js
kMaxLength is: 23
Example 2: Filename: index.js
If kMaxLength is not initialized
kMaxLength is: undefined
Run index.js file using the following command: