How to use the @uirouter/core.padString function in @uirouter/core

To help you get started, we’ve selected a few @uirouter/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 ui-router / react-hybrid / src / debug.ts View on Github external
export const debugLog = (
  angularOrReact: 'angularjs' | 'react',
  component: string,
  id: string,
  method: string,
  message: string,
  ...args
) => {
  if (window && window['debugReactHybrid'] !== true) return;
  console.log(
    `${padString(12, angularOrReact)} ${padString(40, `${component}[${id}]`)} ${padString(
      35,
      `${method}:`
    )} ${message}`,
    ...args
  );
};