How to use the any-observable function in any-observable

To help you get started, we’ve selected a few any-observable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jamesfer / cypher-query-builder / src / connection.ts View on Github external
stream(query: Query): Observable> {
    return new Observable((subscriber: Observer>): void => {
      if (!this.open) {
        subscriber.error(new Error('Cannot run query; connection is not open.'));
        return;
      }

      if (query.getClauses().length === 0) {
        subscriber.error(Error('Cannot run query: no clauses attached to the query.'));
        return;
      }

      const session = this.session();
      if (!session) {
        throw Error('Cannot run query: connection is not open.');
      }

      // Run the query
github jamesfer / cypher-query-builder / src / query.ts View on Github external
stream(): RxObservable> {
    if (!this.connection) {
      return new Observable((subscriber: Observer>): void => {
        subscriber.error(new Error('Cannot run query; no connection object available.'));
      });
    }

    return this.connection.stream(this);
  }

any-observable

Support any Observable library and polyfill

MIT
Latest version published 4 years ago

Package Health Score

70 / 100
Full package analysis

Popular any-observable functions