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

ax5ui-binder

Package Overview
Dependencies
Maintainers
1
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ax5ui-binder - npm Package Compare versions

Comparing version 1.3.81 to 1.3.82

2

bower.json
{
"name": "ax5ui-binder",
"version": "1.3.81",
"version": "1.3.82",
"authors": [

@@ -5,0 +5,0 @@ "ThomasJ <tom@axisj.com>"

{
"name": "ax5ui-binder",
"version": "1.3.81",
"version": "1.3.82",
"description": "Simple 2way binder plugin that works with Bootstrap & jQuery",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -108,3 +108,3 @@ /*

describe('Manipulate list item TEST', function(){
describe('Manipulate list item TEST', function () {
var myUI;

@@ -120,15 +120,15 @@ var tmpl = '<form class name="binder-list-form" onsubmit="return false;" style="border: 1px solid #ccc;padding: 10px;border-radius: 10px;">' +

$(document.body).append(tmpl);
myUI = new ax5.ui.binder();
myUI.setModel({
"list": [{A: 1}, {A: 2}]
}, jQuery(document["binder-list-form"]));
myUI = new ax5.ui.binder();
myUI.setModel({
"list": [{A: 1}, {A: 2}, {A: [{a: 1}, {a: 2}, {a: 3}]}]
}, jQuery(document["binder-list-form"]));
it('add item ax5binder', function (done) {
it('add ax5binder', function (done) {
myUI.add("list", {A: 3});
done(myUI.get("list[2][A]") === 3 && myUI.get("list[2]" + "__ADDED__") === true ? "" : "add item error");
done(myUI.get("list[3][A]") === 3 && myUI.get("list[3]" + "__ADDED__") === true ? "" : "add error");
});
it('remove item ax5binder', function (done) {
it('remove ax5binder', function (done) {
myUI.remove("list", 1);
done(myUI.get("list[1]" + "__DELETED__") === true ? "" : "remove item error");
done(myUI.get("list[1]" + "__DELETED__") === true ? "" : "remove error");
});

@@ -138,10 +138,35 @@

myUI.add("list", {A: 3});
myUI.remove("list", 2);
done(myUI.get("list").length === 3 && myUI.get("list[1][A]") === 2 ? "" : "remove added item error");
myUI.remove("list", 3);
done(myUI.get("list").length === 4 && myUI.get("list[3][A]") === 3 ? "" : "remove added item error");
});
it('update item ax5binder', function (done) {
it('update ax5binder', function (done) {
myUI.update("list", 1, {A: 3});
done(myUI.get("list[1][A]") === 3 ? "" : "update item error");
done(myUI.get("list[1][A]") === 3 ? "" : "update error");
});
it('childAdd ax5binder', function (done) {
myUI.childAdd("list", 2, "A", {d: 4});
done(myUI.get("list[2][A][3][d]") === 4 ? "" : "childAdd error");
});
it('childAdd ax5binder', function (done) {
myUI.childAdd("list", 2, "A", {d: 4});
done(myUI.get("list[2][A][3][d]") === 4 ? "" : "childAdd error");
});
it('childRemove ax5binder', function (done) {
myUI.childRemove("list", 2, "A", 3);
done(myUI.get("list[2][A]").length === 4 ? "" : "childRemove error");
});
it('childUpdate ax5binder', function (done) {
myUI.childUpdate("list", 2, "A", 3, {d: 5});
done(myUI.get("list[2][A][3][d]") === 5 ? "" : "childUpdate error");
});
it('childSet ax5ui', function (done) {
myUI.childSet("list", 2, "A", [{a: 10}, {b: 20}]);
done(myUI.get("list[2][A]").length === 2 && myUI.get("list[2][A][0][a]") === 10 ? "" : "childSet error");
});
});
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