New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

Neuro

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Neuro - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

@@ -21,3 +21,3 @@ (function(modules) {

var Neuro = {
version: "0.1.3"
version: "0.1.4"
};

@@ -300,4 +300,5 @@ exports = module.exports = Neuro;

_bound: {},
_Model: Model,
options: {
Model: Model,
Model: undefined,
modelOptions: undefined,

@@ -314,3 +315,5 @@ silent: false

};
this._Model = this.options.Model;
if (this.options.Model) {
this._Model = this.options.Model;
}
this.silence(this.options.silent);

@@ -317,0 +320,0 @@ if (models) {

{
"name": "Neuro",
"description": "A MVC written with MooTools.",
"version": "0.1.3",
"version": "0.1.4",
"license": "MIT (http://mootools.net/license.txt)",

@@ -6,0 +6,0 @@ "main": "Source/main.js",

@@ -6,3 +6,3 @@ Neuro

### Version: 0.1.3 (Alpha)
### Version: 0.1.4 (Alpha)

@@ -35,12 +35,28 @@ ### Influences:

// Set the default data
_data: {
firstName: ''
,lastName: ''
,hp: 10
,max: 100
,lvl: 1
// You can set a function as a custom getter. "this" will be _data, not the model itself.
,name: function(){
return this.firstName + ' ' + this.lastName;
,options: {
defaults: {
firstName: ''
,lastName: ''
,hp: 10
,max: 100
,lvl: 1
// You can set a function as a custom getter. "this" will be _data, not the model itself.
,name: function(){
return this.firstName + ' ' + this.lastName;
}
}
// Custom setters and getters go here.
// Return a null not trigger change.
,accessors: {
name: {
// isPrevious is a flag set when using the getPrevious method, to help you know what data to look for
get: function(isPrevious){
// Just an example. You can also go directly to the data because "this" is exposed, which will allow you to bypass other custom getters.
var getMethod = 'get';
isPrevious && (method += 'Previous');
return this[getMethod]('firstName') + ' ' + this[getMethod]('lastName');
}
}
}
}

@@ -85,4 +101,4 @@ });

// Add multiple datasets to the collection
Humans.add({
// Add multiple datasets to the collection, must be an Array
Humans.add([{
firstName: 'Kareem Abdul'

@@ -97,3 +113,3 @@ ,lastName: 'Jabbar'

,lvl: 81
});
}]);

@@ -119,4 +135,3 @@ // Add a model instance

----
* Add a builder
* Add a Router mechanism
* Add a Sync mechanism
* Add a basic View Class

@@ -13,2 +13,4 @@ // (function(context){

_Model: Model,
options: {

@@ -18,3 +20,3 @@ // onAdd: function(){},

// onEmpty: function(){},
Model: Model,
Model: undefined,
// Model Options

@@ -36,3 +38,5 @@ modelOptions: undefined,

this._Model = this.options.Model;
if (this.options.Model) {
this._Model = this.options.Model;
}

@@ -39,0 +43,0 @@ // Silent property determines whether model will excute signals

var Neuro = {
version: '0.1.3'
version: '0.1.4'
};
exports = module.exports = Neuro;

Sorry, the diff of this file is not supported yet