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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@soulla/woocommerce-address-validator

v1.5.0

Published

A JavaScript library designed to validate and clean address input fields in WooCommerce forms. This tool helps ensure that street names and house numbers are entered in the correct format.

Downloads

27

Readme

WooCommerce Address Validator

A JavaScript library designed to validate and clean address input fields in WooCommerce forms. This tool helps ensure that street names and house numbers are entered in the correct format.

Features

  • Validates if the street name and house number are entered correctly.
  • Handles edge cases such as extra text after house numbers and street names.
  • Provides real-time input validation with custom error messages.
  • Automatically updates the house number field based on the street name and vice versa.

Installation

You can install the woocommerce-address-validator via npm, yarn, or pnpm.

Using pnpm:

pnpm add @soulla/woocommerce-address-validator

Using npm:

npm install @soulla/woocommerce-address-validator

Installation & Setup

Before you start using this project, follow these steps to install pnpm and the necessary dependencies.

1. Install pnpm

If you don't have pnpm installed, you can install it globally using the following command:

Using npm:

npm install -g pnpm

2. Clone the Repository & Install Dependencies

Once pnpm is installed, clone the repository and install the project dependencies.

Clone the repository:

git clone https://github.com/TooCodeSavvy/woocommerce-address-validator.git
cd woocommerce-address-validator

Install dependencies:

pnpm install

This will install all the required dependencies listed in package.json.

3. Build the Project

Once dependencies are installed, you can build the project:

pnpm build

This will transpile and prepare the project for production.

4. Running Commands

Here are the available commands you can run during development:

  • pnpm changeset: Create a changeset for versioning and changelog updates.
  • pnpm build: Build the project, typically to prepare for production or testing.
  • pnpm check: Run TypeScript checks without emitting any files.
  • pnpm lint: Run ESLint to check the code for style and quality issues.
  • pnpm lint:fix: Run ESLint and automatically fix any fixable issues.

5. Publishing to NPM (Optional)

If you plan to contribute and push changes to NPM, you'll need to set up your NPM credentials.

Steps to set up publishing:

  1. Create an NPM Token:

    • Go to NPM's website and log in or create an account.
    • Navigate to your profile, and under the "Access Tokens" section, generate a new "Automation" token.
  2. Add NPM Token to GitHub Secrets:

    • Go to your repository on GitHub.
    • Under "Settings" > "Secrets" > "New repository secret", add your NPM token as NPM_TOKEN.
    • This will allow the CI pipeline to automatically publish the package to NPM when changes are pushed to the main branch.

CI/CD Pipeline

This repository has a CI/CD pipeline set up using GitHub Actions to automatically handle versioning, linting, and publishing to NPM. Here's a breakdown of the process:

Workflow for Releases

  • Trigger: The pipeline runs when a pull request is opened or merged into the main branch.
  • Check for Changes: The pipeline runs checks such as linting and build to ensure code quality.
  • Versioning: If a changeset has been created, it automatically updates the version and changelog.
  • Publish to NPM: If there is an NPM_TOKEN secret in the repository, the pipeline will publish the package to NPM.
  • Git Tag: After publishing, a new Git tag is created and pushed.

Explanation:

  1. Checkout Repo: Clones the repository.
  2. Setup pnpm and Node.js: Installs the required versions of pnpm and Node.js.
  3. Install Dependencies: Installs the project dependencies using pnpm install.
  4. Build Project: Runs the build script to prepare the code for deployment.
  5. Versioning: Uses changesets to handle versioning and changelog updates.
  6. Publishing to NPM: If an NPM_TOKEN is available, it creates an .npmrc file for authentication and pushes the package to NPM.
  7. Create Git Tag: Once the release is complete, a Git tag is created and pushed to the remote repository.

How the Workflow Works:

  • Pull Request: When a pull request is opened, the workflow checks for linting issues, builds the project, and checks if there are any version changes or unpublished packages.
  • Merging to main: Once the pull request is merged into the main branch, the workflow runs again and publishes the package to NPM if everything is correct.

License

This project is licensed under the MIT License - see the LICENSE file for details.