(value)
| 725 | * collect dependencies and dispatches updates. |
| 726 | */ |
| 727 | var Observer = function Observer (value) { |
| 728 | this.value = value; |
| 729 | this.dep = new Dep(); |
| 730 | this.vmCount = 0; |
| 731 | def(value, '__ob__', this); |
| 732 | if (Array.isArray(value)) { |
| 733 | var augment = hasProto |
| 734 | ? protoAugment |
| 735 | : copyAugment; |
| 736 | augment(value, arrayMethods, arrayKeys); |
| 737 | this.observeArray(value); |
| 738 | } else { |
| 739 | this.walk(value); |
| 740 | } |
| 741 | }; |
| 742 | |
| 743 | /** |
| 744 | * Walk through each property and convert them into |