All Downloads are FREE. Search and download functionalities are using the official Maven repository.

js.prompto.literal.DictEntryList.js Maven / Gradle / Ivy

function DictEntryList(entries, entry) {
	this.items = entries || [];
	entry = entry || null;
	if(entry!==null) {
		this.items.push(entry);
	}
	return this;
}

DictEntryList.prototype.toDialect = function(writer) {
    writer.append('{');
    if(this.items.length>0) {
        this.items.forEach(function(item) {
            item.toDialect(writer);
            writer.append(", ");
        });
        writer.trimLast(2);
    }
    writer.append('}');
};

DictEntryList.prototype.toString = function() {
	return "{" + this.items.join(", ") + "}";
};

DictEntryList.prototype.add = function(entry) {
	this.items.push(entry);
};

exports.DictEntryList = DictEntryList;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy