Skip to content

Feature: Type: Buffer

Аниса edited this page Sep 9, 2022 · 9 revisions

━ What's the Objective?

Buffers beside serving as cache are also important for simplifying complex modules. Vital.kit reutilizes Class to simulate buffers, thus reducing code redundancy!

━ APIs

ℹ️ Note:

Our extensions are written with backwards compatibility in mind; Expect your previous code to work as usual! However we recommend upgrading to newer syntax.


━ vKit.Buffer() (Shared)

@Objective: Creates a new buffer.
const class: cBuffer = vKit.Buffer(
  string: category // Category of the buffer
)

// Note: Avoid exposing the entire class to another scripts unless needed, otherwise just expose 'cBuffer.public'
cBuffer: {
  public, // Public variables must be appended here
  private, // Private variables must be appended here
  instance  // Instances are stored here
}
Clone this wiki locally