UNPKG

ng-injector

Version:

Injector decorator for writing angular 1.x with ES6/TypeScript

22 lines 535 B
'use strict'; export function forEach(target, eachFunc) { if (!target) return; let length; if (target instanceof Array) { length = target.length; for (let i = length - 1; i >= 0; i--) { eachFunc(target[i], i); } } else { const keys = Object.keys(target); let key; length = keys.length; for (let i = 0; i < length; i++) { key = keys[i]; eachFunc(target[key], key); } } } //# sourceMappingURL=utils.js.map