title: Node JS, NeDB - How make sync return to parent module
body: <p>I have func:</p>
  
  <pre><code>let isExistByEmail = (email) =&gt; {
      return new Promise(function (resolve) {
          db.count({email: email}, (err, n) =&gt; {
              resolve(n &gt; 0);
          });
      }).then(result =&gt; {
          return result;
      });
  };
  </code></pre>
  
  <p>And if i make console.log inside it -> will be result.
  But, because it's operation async result don't return to parent module.
  I need to validate , if email is existed return error, but i can't.
  I try make setTimeout and try use async await, but no result.</p>