Skip to main content
Home

@pup/common@1.0.3
Built and signed on GitHub Actions

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
76%
Published
a year ago (1.0.3)

@pup/common

Purpose:

This package provides essential utility modules and types that are used across multiple Pup components, including core, telemetry and api.

Submodules

  • /ipc: Provides types and mechanisms for inter-process communication (IPC) within the Pup ecosystem. This is especially important for communication between Pup and managed processes.
  • /path: Offers cross-platform path manipulation utilities, ensuring consistent path handling across different operating systems.
  • /eventemitter: Includes an event emitter implementation, facilitating event-driven communication between Pup components.

Usage

  1. Install:

    npm install @pup/common
    

    or

    yarn add @pup/common
    
  2. Import and Use:

    import { normalizePath } from "@pup/common/path";
    import { EventEmitter } from "@pup/common/eventemitter";
    
    const eventBus = new EventEmitter();
    eventBus.close(); // Allow the application to exit
    
    // Checks if absolute, else resolves using the supplied working directory
    const myAbsoutePath = toResolvedAbsolutePath(
      "/some/windows/style/path",
      "/working/directory",
    );
    

Development and Contributions

The @pup/common package is actively maintained by the Pup development team. If you have suggestions for new utility modules, improvements, or bug fixes, please open an issue on the GitHub repository: https://github.com/hexagon/pup-common. Contributions are welcome!

This library follows semantic versioning. For a detailed history of changes, please refer to the CHANGELOG.md.

License

This package is released under the MIT License. See LICENSE for details.

Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.