title: how to create gremlin custom predicate in javascript
body: <p>I am trying to create a Regex custom predicate for my query</p>
  <p>I am seeing this can be done from the gremlin console as below</p>
  <pre><code>f = {x,y -&gt; x ==~ y}
  g.V().has('desc',test(f,/^Dal.*/)).values('desc')
  </code></pre>
  <p>however I am wondering how I can create custom predicate in a Javascript client?
  I am using npm package (<a href="https://www.npmjs.com/package/gremlin" rel="nofollow noreferrer">https://www.npmjs.com/package/gremlin</a>) and Typescript.</p>