{"ast":null,"code":"import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function pairs(obj, scheduler) {\n  if (!scheduler) {\n    return new Observable(subscriber => {\n      const keys = Object.keys(obj);\n\n      for (let i = 0; i < keys.length && !subscriber.closed; i++) {\n        const key = keys[i];\n\n        if (obj.hasOwnProperty(key)) {\n          subscriber.next([key, obj[key]]);\n        }\n      }\n\n      subscriber.complete();\n    });\n  } else {\n    return new Observable(subscriber => {\n      const keys = Object.keys(obj);\n      const subscription = new Subscription();\n      subscription.add(scheduler.schedule(dispatch, 0, {\n        keys,\n        index: 0,\n        subscriber,\n        subscription,\n        obj\n      }));\n      return subscription;\n    });\n  }\n}\nexport function dispatch(state) {\n  const {\n    keys,\n    index,\n    subscriber,\n    subscription,\n    obj\n  } = state;\n\n  if (!subscriber.closed) {\n    if (index < keys.length) {\n      const key = keys[index];\n      subscriber.next([key, obj[key]]);\n      subscription.add(this.schedule({\n        keys,\n        index: index + 1,\n        subscriber,\n        subscription,\n        obj\n      }));\n    } else {\n      subscriber.complete();\n    }\n  }\n} //# sourceMappingURL=pairs.js.map","map":null,"metadata":{},"sourceType":"module"}