Buffer Class
Packages > @fluidframework/common-utils > Buffer
Declare the subset of Buffer functionality we want to make available instead of exposing the entirely of Node’s typings. This should match the public interface of the browser implementation, so any changes made in one should be made in both.
Signature:
export declare class Buffer extends Uint8Array
Extends: Uint8Array
Methods
Method | Modifiers | Description |
---|---|---|
from(value, encodingOrOffset, length) | static |
|
isBuffer(obj) | static |
|
toString(encoding) |
Methods
from
Signature:
static from(value: any, encodingOrOffset?: any, length?: any): IsoBuffer;
Parameters
Parameter | Type | Description |
---|---|---|
value | any | string | ArrayBuffer |
encodingOrOffset | any | string | number |
length | any | number |
Returns:
isBuffer
Signature:
static isBuffer(obj: any): obj is Buffer;
Parameters
Parameter | Type | Description |
---|---|---|
obj | any |
Returns:
obj is Buffer
toString
Signature:
toString(encoding?: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
encoding | string |
Returns:
string