npm.io
1.0.312 • Published 7 years ago

neuroscience

Licence
ISC
Version
1.0.312
Deps
2
Size
29 kB
Vulns
1
Weekly
0

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)