dntzhang / Oba
Licence: mit
Observe any object's any change
Stars: ✭ 101
Programming Languages
javascript
184084 projects - #8 most used programming language
Labels
Projects that are alternatives of or similar to Oba
Receiver
Swift µframework implementing the Observer pattern 📡
Stars: ✭ 238 (+135.64%)
Mutual labels: observable, observer
Lightweightobservable
📬 A lightweight implementation of an observable sequence that you can subscribe to.
Stars: ✭ 114 (+12.87%)
Mutual labels: observable, observer
state inspector
State change & method call logger. A debugging tool for instance variables and method calls.
Stars: ✭ 24 (-76.24%)
Mutual labels: observer, observable
EventEmitter
Simple EventEmitter with multiple listeners
Stars: ✭ 19 (-81.19%)
Mutual labels: observer, observable
ng-observe
Angular reactivity streamlined...
Stars: ✭ 65 (-35.64%)
Mutual labels: observer, observable
react-mobx-router5
React components for routing solution using router5 and mobx
Stars: ✭ 58 (-42.57%)
Mutual labels: observer, observable
mutation-observer
A library for idiomatic use of MutationObserver with Angular
Stars: ✭ 32 (-68.32%)
Mutual labels: observer, observable
Observable
The easiest way to observe values in Swift.
Stars: ✭ 346 (+242.57%)
Mutual labels: observable, observer
React Reactive Form
Angular like reactive forms in React.
Stars: ✭ 259 (+156.44%)
Mutual labels: observable, observer
Dob
Light and fast 🚀 state management tool using proxy.
Stars: ✭ 713 (+605.94%)
Mutual labels: observable, observer
Angular1 Async Filter
Angular2 async pipe implemented as Angular 1 filter to handle promises & RxJS observables
Stars: ✭ 59 (-41.58%)
Mutual labels: observable
Read Multiple Files
Read multiple files Observable way
Stars: ✭ 13 (-87.13%)
Mutual labels: observable
Observer Util
Transparent reactivity with 100% language coverage. Made with ❤️ and ES6 Proxies.
Stars: ✭ 905 (+796.04%)
Mutual labels: observable
Object Observer
Object Observer functionality of JavaScript objects/arrays via native Proxy
Stars: ✭ 88 (-12.87%)
Mutual labels: observable
Observer cli
Visualize Erlang/Elixir Nodes On The Command Line
Stars: ✭ 1,058 (+947.52%)
Mutual labels: observer
Ngx Restangular
Restangular for Angular 2 and higher versions
Stars: ✭ 787 (+679.21%)
Mutual labels: observable
oba.js
用于观察任意对象的任意变化的类库,以轻巧、实用、强大而闻名。
ps:源代码未压缩版仅仅只有158行代码:)
安装
npm install obajs
3分钟精通observe.js
对象字面量
var obj = { a: 1 };
observe(obj, function (name, value , old) {
console.log(name + "__" + value + "__" + old);
});
obj.a = 2; //a__2__1
数组
var arr = [1, 2, 3];
observe(arr, function (name, value, old) {
console.log(name + "__" + value+"__"+old);
});
arr.push(4);//Array-push__[1,2,3,4]__[1,2,3]
arr[3] = 5;//3__5__4
复杂对象
var complexObj = { a: 1, b: 2, c: [{ d: [4] }] };
observe(complexObj, function (name, value , old, path) {
console.log(name + "__" + value + "__" + old); //d__100__4
console.log(path) //#-c-0
});
complexObj.c[0].d = 100;
普通对象
var User = function (name, age) {
this.name = name;
this.age = age;
//只监听name
observe(this, ["name"], function (name, value, oldValue) {
console.log(name + "__" + value + "__" + oldValue);
});
}
var user = new User("lisi", 25);
user.name = "wangwu";//name__wangwu__lisi
user.age= 20; //什么都输出,因为没有监听age
This content is released under the (http://opensource.org/licenses/MIT) MIT License.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].