MCPcopy
hub / github.com/meteor/meteor / each

Method each

packages/callback-hook/hook.js:97–114  ·  view source on GitHub ↗
(iterator)

Source from the content-addressed store, hash-verified

95 // value or throws an exception.
96 //
97 each(iterator) {
98 // Invoking bindEnvironment'd callbacks outside of a Fiber in Node doesn't
99 // run them to completion (and exceptions thrown from onException are not
100 // propagated), so we need to be in a Fiber.
101 Meteor._nodeCodeMustBeInFiber();
102
103 var ids = Object.keys(this.callbacks);
104 for (var i = 0; i < ids.length; ++i) {
105 var id = ids[i];
106 // check to see if the callback was removed during iteration
107 if (hasOwn.call(this.callbacks, id)) {
108 var callback = this.callbacks[id];
109 if (! iterator(callback)) {
110 break;
111 }
112 }
113 }
114 }
115}
116
117// Copied from Meteor.bindEnvironment and removed all the env stuff.

Callers 15

project-context.jsFile · 0.80
upgraders.jsFile · 0.80
convertPluginVersionsFunction · 0.80
initalizeDefaultsMethod · 0.80
createAppConfigurationFunction · 0.80
convertBySchemaFunction · 0.80
http-helpers.jsFile · 0.80

Calls 1

callMethod · 0.45

Tested by

no test coverage detected