UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

31 lines (30 loc) 789 B
import { Type } from "../type/Types.js"; export class StringValue { constructor(value) { this.stringValue = value; } static of(value) { return new StringValue(value); } getValue() { return this.stringValue; } toString() { return this.stringValue; } equals(other) { return (StringValue.isStringValueType(other) && other.stringValue === this.stringValue); } compareTo(other) { return StringValue.collator.compare(this.stringValue, other.stringValue); } getType() { return Type.STRING; } static isStringValueType(arg) { return typeof arg.stringValue === "string"; } } StringValue.collator = new Intl.Collator(); //# sourceMappingURL=StringValue.js.map