UNPKG

alpaca

Version:

Alpaca provides the easiest and fastest way to generate interactive forms for the web and mobile devices. It runs simply as HTML5 or more elaborately using Bootstrap, jQuery Mobile or jQuery UI. Alpaca uses Handlebars to process JSON schema and provide

48 lines (45 loc) 1.1 kB
/* * JavaScript Templates Runtime 2.4.1 * https://github.com/blueimp/JavaScript-Templates * * Copyright 2011, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT */ /*jslint sloppy: true */ /*global define */ (function ($) { var tmpl = function (id, data) { var f = tmpl.cache[id]; return data ? f(data, tmpl) : function (data) { return f(data, tmpl); }; }; tmpl.cache = {}; tmpl.encReg = /[<>&"'\x00]/g; tmpl.encMap = { "<" : "&lt;", ">" : "&gt;", "&" : "&amp;", "\"" : "&quot;", "'" : "&#39;" }; tmpl.encode = function (s) { /*jshint eqnull:true */ return (s == null ? "" : "" + s).replace( tmpl.encReg, function (c) { return tmpl.encMap[c] || ""; } ); }; if (typeof define === "function" && define.amd) { define(function () { return tmpl; }); } else { $.tmpl = tmpl; } }(this));