1.0.4 • Published 8 months ago

@jswork/create-proxy v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

create-proxy

Create proxy with callback.

version license size download

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.

1.0.4

8 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago