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

transparency

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transparency - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

browser/lib/benchmark.js

24

browser/spec/basics.spec.js

@@ -5,7 +5,7 @@ (function() {

require('./spec_helper');
require('../src/jquery.transparency');
require('../src/transparency');
}
describe("Transparency", function() {
it("should work with null values", function() {
xit("should work with null values", function() {
var data, doc, expected;

@@ -97,3 +97,3 @@ doc = jQuery('<div>\

});
it("should match by element id, class, name and data-bind", function() {
return it("should match by element id, class, name and data-bind", function() {
var data, doc, expected, res;

@@ -125,22 +125,4 @@ doc = jQuery('<div>\

});
return xit("should render html", function() {
var data, doc, expected, res;
doc = jQuery('<div>\
<div class="container">\
<div id="post"></div>\
</div>\
</div>');
data = {
post: '<h1>This is the title</h1><p>This is the body</p>'
};
expected = jQuery('<div>\
<div class="container">\
<div id="post"><h1>This is the title</h1><p>This is the body</p></div>\
</div>\
</div>');
res = doc.find('.container').render(data);
return expect(doc.html()).htmlToBeEqual(expected.html());
});
});
}).call(this);

@@ -5,3 +5,3 @@ (function() {

require('./spec_helper');
require('../src/jquery.transparency');
require('../src/transparency');
}

@@ -8,0 +8,0 @@

@@ -5,3 +5,3 @@ (function() {

require('./spec_helper');
require('../src/jquery.transparency');
require('../src/transparency');
}

@@ -8,0 +8,0 @@

@@ -5,3 +5,3 @@ (function() {

require('./spec_helper');
require('../src/jquery.transparency');
window.Transparency = require('../src/transparency');
}

@@ -36,2 +36,28 @@

});
it("should render safe html content with directives", function() {
var directives, doc, expected, person;
doc = jQuery('<div>\
<div class="person">\
<span class="name"></span><span class="email"></span>\
</div>\
</div>');
person = {
firstname: '<b>Jasmine</b>',
lastname: '<i>Taylor</i>',
email: 'jasmine.tailor@example.com'
};
directives = {
name: function(element) {
return window.Transparency.safeHtml("" + this.firstname + " " + this.lastname);
}
};
expected = jQuery('<div>\
<div class="person">\
<span class="name"><b>Jasmine</b> <i>Taylor</i></span>\
<span class="email">jasmine.tailor@example.com</span>\
</div>\
</div>');
doc.find('.person').render(person, directives);
return expect(doc.html()).htmlToBeEqual(expected.html());
});
return it("should handle nested directives", function() {

@@ -38,0 +64,0 @@ var directives, doc, expected, nameDecorator, person;

@@ -6,3 +6,3 @@ (function() {

require('./spec_helper');
require('../src/jquery.transparency');
require('../src/transparency');
}

@@ -9,0 +9,0 @@

@@ -5,3 +5,3 @@ (function() {

require('./spec_helper');
require('../src/jquery.transparency');
require('../src/transparency');
}

@@ -8,0 +8,0 @@

require('jsdom');
jQuery = require('jquery');
require('./lib/jquery.transparency');
require('./lib/transparency');
{
"name" : "transparency",
"version" : "0.4.0",
"version" : "0.4.1",
"description" : "Transparency is a minimal template engine for jQuery. It maps JSON objects to DOM elements with zero configuration.",

@@ -5,0 +5,0 @@ "homepage" : "https://github.com/leonidas/transparency",

@@ -11,3 +11,3 @@ Transparency is a minimal template engine for jQuery. It maps JSON objects to DOM elements with zero configuration.

For more insight please see (FAQ)[https://github.com/leonidas/transparency/blob/master/FAQ.md]
For more insight please see [FAQ](https://github.com/leonidas/transparency/blob/master/FAQ.md)

@@ -20,3 +20,3 @@ ## Usage

Get the [compiled and minified version](https://raw.github.com/leonidas/transparency/master/lib/jquery.transparency.min.js)
Get the [compiled and minified version](https://raw.github.com/leonidas/transparency/master/lib/transparency.min.js)
and include it to your application with jQuery

@@ -26,3 +26,3 @@

<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/jquery.transparency.min.js"></script>
<script src="js/transparency.min.js"></script>
```

@@ -29,0 +29,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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