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

ueb-validate

v0.0.26

Published

The original idea behind this package was handling front and back end validation in one centralized location. We also wanted to improve frontend validation by giving the user specific error messages to help them understand why what they are trying to save

Downloads

6

Readme

ueb-validate

The original idea behind this package was handling front and back end validation in one centralized location. We also wanted to improve frontend validation by giving the user specific error messages to help them understand why what they are trying to save is invalid.

As of this update 9/9/19, this package is only being used in the frontend with the improved validation error messages.

Getting Started

Prerequisites

Node should be at least version 8.11

Installing

To install this package into your node project, simply run this command inside your project's folder:

npm i ueb-validate

Running the tests

Run npm test to run tests.

Deployment

To use this package, import whichever card data validator that you interested like this:

import cardValidator from "./ueb-validate/card-validate.js";

Then use this validator by calling it on a card. Take a look at /ueb-validate/src/card-validate.test.js to see how this works.

Development

Modifying or adding a new card-subschema

The javascript functions only act as a medium between the JSON schema validation and the error output. If you want to change or add a schema follow these steps:

  1. Clone the repo, cd ueb-validate, then create and checkout a new branch to work on your new schema in
  2. Run npm i to install the dependencies
  3. Think about what the required fields should be for your new card body type
  4. Implement the required fields as a schema based on the JSON schema specification
  5. Add your sweet new schema into the folder: ueb-validate/src/schemas/
  6. Then add your new schema to the: ueb-validate/src/CardSubSchemas.js card sub schema map
  7. Add tests to show how your new schema works to the file: ueb-validate/src/card-subschema-validate.js
  8. Once you're happy with your new schema and tests merge your branch with the master

Compiling and publishing the package to npm

  1. In the master branch run npm version <type> where <type> is either patch, minor or major
  2. Commit and push the version change to GitHub
  3. Push the new version tag to GitHub with: git push --tags
  4. Compile the package with babel by running the predefined npm script: npm run prepare
  5. Run npm publish to publish this new version to NPM package

README.md Updates

| Update | Date | | ----------- | ----------- | | Original | 1/4/19 | | First | 9/9/19 |