1.0.4 • Published 8 months ago
@jswork/create-proxy v1.0.4
create-proxy
Create proxy with callback.
installation
npm install @jswork/create-proxy
usage
import createProxy from '@jswork/create-proxy';
const person = {
name: 'John Doe',
age: 42,
nationality: 'American',
};
const state = createProxy(person, (target, key, newValue)=>{
const oldValue = target[key];
console.log(newValue, oldValue, key, target);
});
license
Code released under the MIT license.