@code-pushup/utils
TypeScript icon, indicating that this package has built-in type declarations

0.46.0 • Public • Published

@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"

/@code-pushup/utils/

    Package Sidebar

    Install

    npm i @code-pushup/utils

    Weekly Downloads

    596

    Version

    0.46.0

    License

    MIT

    Unpacked Size

    123 kB

    Total Files

    49

    Last publish

    Collaborators

    • tlacenka
    • bio_photon
    • matejchalk
    • vmasek