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

List of methods on this class
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

List of parameters
Parameter Type Description
value any string | ArrayBuffer
encodingOrOffset any string | number
length any number

Returns:

IsoBuffer

isBuffer

Signature:

static isBuffer(obj: any): obj is Buffer;

Parameters

List of parameters
Parameter Type Description
obj any

Returns:

obj is Buffer

toString

Signature:

toString(encoding?: string): string;

Parameters

List of parameters
Parameter Type Description
encoding string

Returns:

string