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 🙏

© 2026 – Pkg Stats / Ryan Hefner

generator-identity-code-api

v0.1.3

Published

Generates the BYU identity code APIs

Readme

generator-identity-code-api

Generates the identity code APIs

*Note: This project requires that you have Node and NPM installed on your computer. If you do not, click here.

Overview and Explanation

Read each instuction completely before you walk through the next step

The Identity Code APIs will be used in the near future to manage all the codes used in the BYU application process. On the webpage where one fills out an application, certain codes are used that represent values that the future student may select. For example: the future student will be asked about their native and secondary language abilities. They will select their native language, which will appear as the name of the language but in the computer, it is registered as a code such as EN for English.

There are 40 of these APIs that need to be created. This generator will help us create all that repeatable code a lot more quickly and we will have the assurance that the code is up-to-date with current BYU API standards. We will also appreciate the consistency of the 40+ APIs that we will create.

Let's get started!

Getting Started

Make sure you understand the data that your API will manage. Talk with Mark Crowther about locating the codes from a database.

Continue only when you have the codes located. We will organize them in a later step.

The GitHub Repository

Follow the instructions on how to create a GitHub Repository. Only do the section titled "Create A Repo". If you have questions about the tutorial, check below for an answer to your question before you ask for help.

  • The name will be 'identity-' + your code api name (e.g. state_codes)
  • The description will be 'Code API for managing ' and your code api name.
  • Choose private repository

Now follow the instructions to clone the repository to your computer. *Note: the repository will be cloned in the directory that your shell is currently in. Navigate to your projects directory before you clone the repository to keep everything organized.

Generator Installation

Install Yeoman and generator-swagger-node-byu-api using npm (we assume you have pre-installed node.js).

*Note: the global flag (-g) requires elevated shell access

npm i -g yo
npm i -g generator-identity-code-api

Then generate your new project by navigating to your project directory and entering:

yo identity-code-api

or simply:

yo 

then select Identity Code Api from the list using your arrow keys

Walk through the prompts and answer accordingly. If you do not know about a particular prompt, see the suggestions below:

  • You will need to supply some s3 bucket configurations, such as: the bucket name, the file where you will store the codes, and the file where you will store the logs.
  • Some questions may ask you to supply an answer in snake case.
  • Sort names are defined as a sub-grouping for codes. For example: if I were to make an API for international state codes, I would group the state codes by their country. Hence we get: UT, USA.
  • Pagination is not a requirement but can be useful for very large code APIs. If you do choose to use pagination, you will be asked if you want to use the defaults, which are: start page on element 1, page size defaults to 50 elements per page, max page size (for client queries) defaults to 100. If you choose not to use the defaults, you will then be asked to supply the 3 fields that were just mentioned.
  • Don't worry about raising events if you are just beginning to create your API. There is a tutorial about how to set up event raising that you should review later on. Any of these configurations can be changed in the api.js file created by this generator. If you need to modify the configurations, look in api.js under the controller function.