How to use the @colony/purser-core/validators.messageValidator function in @colony/purser-core

To help you get started, we’ve selected a few @colony/purser-core 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 JoinColony / purser / packages / node_modules / @colony / purser-trezor / src / helpers.js View on Github external
export const sanitizeUrl = (url: string): string => {
  messageValidator(url);
  /*
   * Flow for some reason (well, there is one...) doesn't play well when matching
   * a string to a regex pattern.
   *
   * See this issue about that:
   * https://github.com/facebook/flow/issues/3554
   */
  /* $FlowFixMe */
  return url.match(MATCH.URL)[0];
};