How to use wildcard - 1 common examples

To help you get started, we’ve selected a few wildcard 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 garbin / koapi / src / View on Github external
let dispatch = async (ctx, next) => {
    if (!isIP.test(ctx.hostname) && wildcard(wc, ctx.hostname)) {
      ctx.subdomain = tld.getSubdomain(ctx.hostname);
      await middleware(ctx, next);
    } else {
      await next();
  dispatch.subdomain = wc;


Wildcard matching tools

Latest version published 8 months ago

Package Health Score

70 / 100
Full package analysis

Popular wildcard functions