Update README.md

This commit is contained in:
Fehmi Özüseven 2020-12-17 18:03:47 +03:00
parent 7f41d20c6f
commit 0f81c2cfff
1 changed files with 12 additions and 12 deletions

View File

@ -33,18 +33,6 @@ arr[3] = 5;//3__5__4
### observe class instance
```js
obaa(obj, function (name, value , old, parents) {
console.log("key:" + name + ", new value: " + value + ", old value: " + old + ", tree: " + parents);
});
var obj = [{"firstKey": "firstValue"}] ;
obj.push({"secondKey": "secondValue"});
obaa.set(obj[1], "changedKey", "changedValue");
obaa.delete(obj[1], "changedKey");
```
### remove prop
```js
var User = function (name, age) {
this.name = name;
@ -59,6 +47,18 @@ user.name = "wangwu";//name__wangwu__lisi
user.age = 20; //nothing output
```
### remove prop
```js
obaa(obj, function (name, value , old, parents) {
console.log("key:" + name + ", new value: " + value + ", old value: " + old + ", tree: " + parents);
});
var obj = [{"firstKey": "firstValue"}] ;
obj.push({"secondKey": "secondValue"});
obaa.set(obj[1], "changedKey", "changedValue");
obaa.delete(obj[1], "changedKey");
```
## Other
```js