MCPcopy Create free account
hub / github.com/microsoft/tslib / __read

Function __read

tslib.es6.js:181–196  ·  view source on GitHub ↗
(o, n)

Source from the content-addressed store, hash-verified

179}
180
181export function __read(o, n) {
182 var m = typeof Symbol === "function" && o[Symbol.iterator];
183 if (!m) return o;
184 var i = m.call(o), r, ar = [], e;
185 try {
186 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
187 }
188 catch (error) { e = { error: error }; }
189 finally {
190 try {
191 if (r && !r.done && (m = i["return"])) m.call(i);
192 }
193 finally { if (e) throw e.error; }
194 }
195 return ar;
196}
197
198/** @deprecated */
199export function __spread() {

Callers 2

tslib.jsFile · 0.70
__spreadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…