MCPcopy Create free account
hub / github.com/aurelia/binding / for

Method for

src/array-observation.js:135–143  ·  view source on GitHub ↗

* Searches for observer or creates a new one associated with given array instance * @param taskQueue * @param array instance for which observer is searched * @returns ModifyArrayObserver always the same instance for any given array instance

(taskQueue, array)

Source from the content-addressed store, hash-verified

133 * @returns ModifyArrayObserver always the same instance for any given array instance
134 */
135 static for(taskQueue, array) {
136 if (!('__array_observer__' in array)) {
137 Reflect.defineProperty(array, '__array_observer__', {
138 value: ModifyArrayObserver.create(taskQueue, array),
139 enumerable: false, configurable: false
140 });
141 }
142 return array.__array_observer__;
143 }
144
145 static create(taskQueue, array) {
146 return new ModifyArrayObserver(taskQueue, array);

Callers 1

getArrayObserverFunction · 0.45

Calls 1

createMethod · 0.45

Tested by

no test coverage detected