JSPM

  • Created
  • Published
  • Downloads 2216
  • Score
    100M100P100Q118030F
  • License MIT

Low-level utilities (helper functions, etc.) used by Code PushUp CLI

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@code-pushup/utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @code-pushup/utils

    npm downloads dependencies

    Low-level utilities (helper functions, etc.) used by Code PushUp CLI.

    Setup

    If you've already installed another @code-pushup/* package, then you may have already installed @code-pushup/utils indirectly.

    If not, you can always install it separately:

    npm install --save-dev @code-pushup/utils
    yarn add --dev @code-pushup/utils
    pnpm add --save-dev @code-pushup/utils

    Usage

    import { executeProcess, readJsonFile, slugify } from '@code-pushup/utils';
    
    await executeProcess({
      command: 'npx',
      args: ['eslint', '--format=json', '--output-file=output.json', '**/*.js'],
    });
    
    const data = await readJsonFile('output.json');
    
    const slug = slugify('Hello, world!'); // "hello-world"