npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ui-action-library

v1.0.0

Published

## Overview

Downloads

58

Readme

UI Action Library

Overview

UI Action Library is a collection of utility functions designed for internal use within our company. It provides various helpers, including string manipulation, date handling, and more. This package is private and distributed via GitHub Packages within our organization.

Table of Contents

  1. Installation
  2. Development Setup
  3. Usage
  4. Testing
  5. Building
  6. Publishing
  7. Contributing
  8. Package Management & GitHub Packages
  9. License

Installation

To install this package in your project, authenticate to GitHub Packages and run the following command:

npm install @umbrage-studios/ui-action-library --registry=https://npm.pkg.github.com/

Make sure you have your GitHub Personal Access Token (PAT) with the necessary permissions configured in your .npmrc.

Development Setup

  1. Clone the Repository:

    First, clone the repository to your local machine:

    git clone https://github.com/@umbrage-studios/ui-action-library.git
    cd my-library
  2. Install Dependencies:

    Install all project dependencies:

    bun install

    or alternatively, use npm:

    npm install
  3. Configure Authentication for GitHub Packages:

    Make sure you have a .npmrc file in the root of the project with your GitHub Packages authentication details:

    //npm.pkg.github.com/:_authToken=YOUR_PERSONAL_ACCESS_TOKEN
  4. Build the Project:

    You can start the project for development using the following command:

    bun run build

Usage

This package provides various utility functions for string manipulation, date formatting, and more. Example usage:

import {
  toTitleCase,
  nameToTwoLetters,
} from "@@umbrage-studios/ui-action-library";

const title = toTitleCase("hello world"); // "Hello World"
const initials = nameToTwoLetters("John Doe"); // "JD"

For detailed API documentation, see the source code and comments.

Testing

Tests are written using Vitest and cover all critical functions in the library. You can run the tests using the following command:

bun run test

or using npm:

npm run test

Running Tests with Coverage

To run the tests with coverage:

bun run test:coverage

Building

To build the package for distribution (ESM and UMD formats), run:

bun run build

The build files will be placed in the dist/ directory.

Publishing

GitHub Packages Setup

This package is distributed via GitHub Packages and only accessible to members of the organization.

  1. Authentication:

    Make sure your .npmrc file contains your GitHub Personal Access Token (PAT) with the necessary scopes (read:packages, write:packages, and repo):

    //npm.pkg.github.com/:_authToken=YOUR_PERSONAL_ACCESS_TOKEN
  2. Publish to GitHub Packages:

    After building the package, publish it using:

    npm publish

    This will publish the package to the GitHub Packages registry.

Contributing

When contributing to this repository, please follow these guidelines:

  1. Branching: Always branch off from main for new features or bug fixes.
  2. Pull Requests: Submit pull requests with detailed descriptions.
  3. Code Style: Use ESLint and Prettier for consistent code formatting.
  4. Testing: Ensure all changes are covered with unit tests and that existing tests pass.

Package Management & GitHub Packages

This project uses GitHub Packages to distribute the library internally. Make sure to:

  • Use a Personal Access Token (PAT) with the appropriate scopes to authenticate.
  • Ensure that the repository is private to restrict public access.
  • Verify that npm is configured correctly in the .npmrc file for internal installations.

License

This project is licensed under the terms of the MIT License, available within the repository.