UNPKG

typerinth

Version:

A TypeScript library for interacting with the Modrinth API.

48 lines (47 loc) 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class Facet { type; operation; value; /** * Creates a new Facet * @param type The type of the facet * @param operation The operation of the facet * @param value The value of the facet */ constructor(type, operation, value) { this.type = type; this.operation = operation; this.value = value; } /** * Gets the type of the facet * @returns The type of the facet */ getType() { return this.type; } /** * Gets the operation of the facet * @returns The operation of the facet */ getOperation() { return this.operation; } /** * Gets the value of the facet * @returns The value of the facet */ getValue() { return this.value; } /** * Stringifies the facet * @returns The stringified facet */ stringify() { return `${this.type}${this.operation}${this.value}`; } } exports.default = Facet;