1.0.312 • Published 5 years ago
neuroscience v1.0.312
Neuroscience
npm i neuroscience;
Example:
const { Model } = require('neuroscience');
const person = new Model();
const insightOne = person.update('Information', {
age: 25,
weight: 155
}, [
function(e) {
const l = {
age: e.age+1,
weight: e.weight+25
}
return l;
}
]);
const insightTwo = person.update('Information', {
hair: 'Brown'
}, [
function(e) {
const test = JSON.parse(insightOne[0]);
if (test.age === 26) {
const l = {
hair: "Blue"
}
return l;
} else {
return e;
}
}
]);
console.log(insightTwo)
// Currently equals insightTwo
const query = person.query('Information');
console.log(query)