UNPKG

gentyl

Version:

A Generator That You'll Love

35 lines (34 loc) 1.26 kB
var Gentyl; (function (Gentyl) { var GForm = (function () { function GForm(formObj) { this.ctxmode = formObj.m || ""; this.carrier = formObj.c || Gentyl.Util.identity; this.resolver = formObj.f || Gentyl.Util.identity; this.selector = formObj.s || function (keys, carg) { return true; }; this.preparator = formObj.p || function (x) { }; this.inputLabel = formObj.il; this.outputLabel = formObj.ol; this.inputFunction = formObj.i || Gentyl.Util.identity; this.outputFunction = formObj.o || Gentyl.Util.identity; this.targeting = formObj.t; this.contextLabel = formObj.cl; } GForm.prototype.extract = function () { return { f: this.resolver, c: this.carrier, m: this.ctxmode, p: this.preparator, il: this.inputLabel, ol: this.outputLabel, i: this.inputFunction, o: this.outputFunction, t: this.targeting, s: this.selector }; }; return GForm; }()); Gentyl.GForm = GForm; })(Gentyl || (Gentyl = {}));