Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "tagster", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Tagster is simple library which is helping you create html strings with ease.", | ||
@@ -5,0 +5,0 @@ "main": "tagster.js", |
@@ -109,2 +109,11 @@ /* | ||
return this; | ||
}, | ||
img: function (src, attrs) { | ||
this.el = 'img'; | ||
this.attrs = attrs; | ||
this.attrs.src = src; | ||
this.createAttributes(); | ||
this.createElement(); | ||
return this; | ||
} | ||
@@ -111,0 +120,0 @@ }; |
@@ -1,3 +0,3 @@ | ||
var Tagster = require("../tagster.js"); | ||
var chai = require("chai"); | ||
var Tagster = require('../tagster.js'); | ||
var chai = require('chai'); | ||
var should = chai.should(); | ||
@@ -79,3 +79,3 @@ | ||
return lis.join(""); | ||
return lis.join(''); | ||
}).element; | ||
@@ -97,2 +97,7 @@ }).element; | ||
it('should create img tag', function () { | ||
var style = new Tagster().img('img/srbija.png', { alt: 'Bog cuva Srbe!' }).element; | ||
style.should.equal('<img alt="Bog cuva Srbe!" src="img/srbija.png">'); | ||
}); | ||
it('should be extensible', function () { | ||
@@ -121,2 +126,2 @@ Tagster.prototype.form = function (attrs) { | ||
}); | ||
}); | ||
}); |
13318
7
241