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

b2

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

b2 - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

bower.json

2

b2-min.js

@@ -1,2 +0,2 @@

!function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore","jquery","exports"],function(c,d,e,f){a.B2=b(a,f,c,d,e)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");b(a,exports,c,d)}else a.B2=b(a,{},a.Backbone,a._,a.jQuery||a.Zepto||a.ender||a.$)}(this,function(a,b,c,d,e){var f=a.B2;b.VERSION="0.1.0",b.noConflict=function(){return a.B2=f,this},d.extend(b,c),b.View=c.View.extend({template:function(){return""},appEvents:{},registerComponent:function(a,b,c){var f;if(this._components=this._components||{},this._components.hasOwnProperty(a)){var g=this._components[a];g.trigger&&g.trigger("beforeRemove"),this.stopListening(g,"all"),g.remove()}c&&(d.isString(c)?this.$(c).append(b.el):e(c).append(b.el),b.render()),this._components[a]=b,b._parentView=this,b._componentName=a;var h=/^(\S+)\s*(\S+)$/;for(var i in this.appEvents)if(this.appEvents.hasOwnProperty(i)){var j=this.appEvents[i],k=i.match(h),l=k[1],m=k[2];if(k&&m){var n=/\/(.*?)\//.exec(m),o=n[1];o&&(m=new RegExp(o.replace(/\\/g,"\\\\")))}if(m){var p=!1;if(d.isRegExp(m)&&m.test(a)?p=!0:m==a&&(p=!0),p){var q=l.split(/,/);for(f=0;f<q.length;f++)this.listenTo(b,q[f],this[j])}}}return this.listenTo(b,"all",function(a){if(this.appEvents.hasOwnProperty("all")){var c=this.appEvents.all;this[c].apply(this,[arguments[0],b].concat(d.toArray(arguments).slice(1)))}else b._events&&b._events[a]||this.trigger.apply(this,arguments)}),this},getComponent:function(a){return this._components[a]},getComponents:function(){return this._components},freeChildren:function(a){d.each(this._components,function(b,c){var e=!1;e=a?d.isRegExp(a)?a.test(c):a===c||a===b:!0,e&&(this.stopListening(b,"all"),b.remove(),this._components[c]&&(delete this._components[c],delete b._parentView))},this)},_addFieldToFormParams:function(a,b,c){if(d.isObject(c)){var e=c[a],f={};f[a]=b,"undefined"==typeof e?e=[]:d.isArray(e)||(e=[e]),e.push(f)}else d.isArray(c)&&c.push({name:a,value:b})},serializeForm:function(a,b,c){var d=e(a||this.el).find("input, select, textarea").filter(function(){return this.name&&-1===this.name.indexOf(b||"ignore")}),f={};return c&&(f={}),d.each(function(){var a=e(this),b=a.attr("name"),c=a.val(),d=a.attr("value2"),g=!0;switch(a.prop("type")){case"radio":a.prop("checked")?b=a.attr("name"):g=!1;break;case"checkbox":a.prop("checked")?(null==c||"on"==c)&&(c=!0):null==d&&(c=!1)}this._addFieldToFormParams(b,c,f)}),f},serializeArray:function(a,b){return this.serializeForm(a,b,!0)},remove:function(){this.freeChildren();var a=this._parentView;a&&(a.stopListening(this,"all"),a._components&&delete a._components[this._componentName],delete this._parentView),this.trigger("beforeRemove"),c.View.prototype.remove.apply(this,arguments)},render:function(){this.$el.html(this.template())}}),b.Model=c.Model.extend({}),b.Collection=c.Collection.extend({}),b.Router=c.Router.extend({}),b.History=c.History.extend({});var g=function(a,b,c){c=c||[];var e,f=this,g=f.prototype;e=a&&d.has(a,"constructor")?a.constructor:function(){return f.apply(this,arguments)},d.extend(e,f,b);var h=function(){this.constructor=e};h.prototype=f.prototype;var i=e.prototype=new h,j=/xyz/.test(function(){return"xyz"})?/\b_super\b/:/.*/;for(var k in a)a.hasOwnProperty(k)&&(i[k]="function"==typeof a[k]&&"function"==typeof g[k]&&(j.test(a[k])||c.indexOf(k)>-1)?function(a,b){return function(){var c=this._super;this._super=g[a];var d=b.apply(this,arguments);return this._super=c,d}}(k,a[k]):a[k]);return e.__super__=f.prototype,e};b.Model.extend=b.Collection.extend=b.Router.extend=b.View.extend=b.History.extend=g;var h=b.View.extend;b.View.extend=function(a,b){if(a.render){var c=a.render;a.render=function(){return this.freeChildren&&this.freeChildren(),c.apply(this,arguments)}}var e=h.call(this,a,b,["render"]);return e.prototype.events=d.extend({},this.prototype.events,a.events),e.prototype.appEvents=d.extend({},this.prototype.appEvents,a.appEvents),e}});
!function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore","jquery","exports"],function(c,d,e,f){a.B2=b(a,f,c,d,e)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");b(a,exports,c,d)}else a.B2=b(a,{},a.Backbone,a._,a.jQuery||a.Zepto||a.ender||a.$)}(this,function(a,b,c,d,e){var f=a.B2;b.VERSION="0.1.1",b.noConflict=function(){return a.B2=f,this},d.extend(b,c),b.View=c.View.extend({template:function(){return""},appEvents:{},registerComponent:function(a,b,c){var f;if(this._components=this._components||{},this._components.hasOwnProperty(a)){var g=this._components[a];g.trigger&&g.trigger("beforeRemove"),this.stopListening(g,"all"),g.remove()}c&&(d.isString(c)?this.$(c).append(b.el):e(c).append(b.el),b.render()),this._components[a]=b,b._parentView=this,b._componentName=a;var h=/^(\S+)\s*(\S+)$/;for(var i in this.appEvents)if(this.appEvents.hasOwnProperty(i)){var j=this.appEvents[i],k=i.match(h),l=k[1],m=k[2];if(k&&m){var n=/\/(.*?)\//.exec(m),o=n[1];o&&(m=new RegExp(o.replace(/\\/g,"\\\\")))}if(m){var p=!1;if(d.isRegExp(m)&&m.test(a)?p=!0:m==a&&(p=!0),p){var q=l.split(/,/);for(f=0;f<q.length;f++)this.listenTo(b,q[f],this[j])}}}return this.listenTo(b,"all",function(a){if(this.appEvents.hasOwnProperty("all")){var c=this.appEvents.all;this[c].apply(this,[arguments[0],b].concat(d.toArray(arguments).slice(1)))}else b._events&&b._events[a]||this.trigger.apply(this,arguments)}),this},getComponent:function(a){return this._components[a]},getComponents:function(){return this._components},freeChildren:function(a){d.each(this._components,function(b,c){var e=!1;e=a?d.isRegExp(a)?a.test(c):a===c||a===b:!0,e&&(this.stopListening(b,"all"),b.remove(),this._components[c]&&(delete this._components[c],delete b._parentView))},this)},_addFieldToFormParams:function(a,b,c){if(d.isObject(c)){var e=c[a],f={};f[a]=b,"undefined"==typeof e?e=[]:d.isArray(e)||(e=[e]),e.push(f)}else d.isArray(c)&&c.push({name:a,value:b})},serializeForm:function(a,b,c){var d=e(a||this.el).find("input, select, textarea").filter(function(){return this.name&&-1===this.name.indexOf(b||"ignore")}),f={};return c&&(f={}),d.each(function(){var a=e(this),b=a.attr("name"),c=a.val(),d=a.attr("value2"),g=!0;switch(a.prop("type")){case"radio":a.prop("checked")?b=a.attr("name"):g=!1;break;case"checkbox":a.prop("checked")?(null==c||"on"==c)&&(c=!0):null==d&&(c=!1)}this._addFieldToFormParams(b,c,f)}),f},serializeArray:function(a,b){return this.serializeForm(a,b,!0)},remove:function(){this.freeChildren();var a=this._parentView;a&&(a.stopListening(this,"all"),a._components&&delete a._components[this._componentName],delete this._parentView),this.trigger("beforeRemove"),c.View.prototype.remove.apply(this,arguments)},render:function(){this.$el.html(this.template())}}),b.Model=c.Model.extend({}),b.Collection=c.Collection.extend({}),b.Router=c.Router.extend({}),b.History=c.History.extend({});var g=function(a,b,c){c=c||[];var e,f=this,g=f.prototype;e=a&&d.has(a,"constructor")?a.constructor:function(){return f.apply(this,arguments)},d.extend(e,f,b);var h=function(){this.constructor=e};h.prototype=f.prototype;var i=e.prototype=new h,j=/xyz/.test(function(){return"xyz"})?/\b_super\b/:/.*/;for(var k in a)a.hasOwnProperty(k)&&(i[k]="function"==typeof a[k]&&"function"==typeof g[k]&&(j.test(a[k])||c.indexOf(k)>-1)?function(a,b){return function(){var c=this._super;this._super=g[a];var d=b.apply(this,arguments);return this._super=c,d}}(k,a[k]):a[k]);return e.__super__=f.prototype,e};b.Model.extend=b.Collection.extend=b.Router.extend=b.View.extend=b.History.extend=g;var h=b.View.extend;b.View.extend=function(a,b){if(a.render){var c=a.render;a.render=function(){return this.freeChildren&&this.freeChildren(),c.apply(this,arguments)}}var e=h.call(this,a,b,["render"]);return e.prototype.events=d.extend({},this.prototype.events,a.events),e.prototype.appEvents=d.extend({},this.prototype.appEvents,a.appEvents),e}});
//# sourceMappingURL=b2-min.js.map

@@ -1,2 +0,2 @@

// B2.js 0.0.1
// B2.js 0.1.0-beta.2

@@ -39,3 +39,3 @@ // (c) 2014-2014 Percy Zhang

// Current version of the library. Keep in sync with `package.json`.
B2.VERSION = '0.1.0';
B2.VERSION = '0.1.1';

@@ -42,0 +42,0 @@ // Runs B2.js in *noConflict* mode, returning the `B2` variable

{
"name": "b2",
"version": "0.1.0",
"version": "0.1.1",
"description": "A super lightweight framework based on backbone.js",

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

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