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 / middlewares.es 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

Wildcard matching tools

MIT
Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis

Popular wildcard functions