Provides an overview of how a value changed since the last time you checked.
install:
npm install what-changed
require:
var WhatChanged = require('what-changed');
instantiate:
var state = new WhatChanged([initial value]);
change the value, and get the change overview:
state.update(123);
// -> {type: true, value: true}
The following describes expected output based on how a value changes:
{}
{
value: true,
any: true
}
{
value: true,
type: true,
any: true
}
{
type: true,
any: true
}
{}
{
reference: true
}
{
keys: true,
structure: true,
any: true
}
{
structure: true,
any: true
}
{
reference: true,
keys: true,
structure: true,
any: true
}