How to use the italia-ts-commons/lib/strings.IPString.decode function in italia-ts-commons

To help you get started, we’ve selected a few italia-ts-commons 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 teamdigitale / io-functions / lib / utils / middlewares / client_ip_middleware.ts View on Github external
return new Promise(resolve => {
    const clientIp = requestIp.getClientIp(request);
    winston.debug(`Handling request for client IP|${clientIp}`);
    resolve(
      right(OptionFromEither(IPString.decode(clientIp)))
    );
  });
};