Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

formist

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formist - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

13

lib/form.js

@@ -52,6 +52,7 @@

Form.prototype.render = function () {
Form.prototype.render = function (callback) {
var content = '',
tag;
tag,
html;

@@ -64,4 +65,10 @@ for (var i = 0; i < this.elements.length; i++) {

return this.options.theme.form(tag.render(), this);
html = this.options.theme.form(tag.render(), this);
if (callback) {
return callback(html);
}
return html;
};

@@ -68,0 +75,0 @@

{
"name": "formist",
"version": "0.1.1",
"version": "0.1.2",
"description": "A library to publish, consume and validate HTML5 forms.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -87,2 +87,21 @@

it('synchronously', function () {
var form = new formist.Form();
expect(form.render()).to.equal('<form></form>');
});
it('asynchronously', function (done) {
var form = new formist.Form();
form.render(function (html) {
expect(html).to.equal('<form></form>');
return done()
});
});
it('an empty form', function () {

@@ -89,0 +108,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc