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

@byu-oit/admissions-report-class

v0.0.4

Published

Two class definitions used to help format the code in various report handlers

Downloads

452

Readme

@byu-oit/admissions-report-class

Two class definitions used to help format metadata in various report handlers

Installation

npm install @byu-oit/admissions-report-class

Usage

const { Report } = require('@byu-oit/admissions-report-class')
// ...
exports.getMetaData = () => {
  return new Report('pathwayFieldSupportMissionaries')
    .description('Field Support Missionaries Contacts')
    .longDescription('Student contact information for field support missionaries.')
    .category('reports')
    .institutions('PW')
    .contentTypes('text/csv')
    .parameters('admitPeriod')
    .column('Application ID', '/detail-new/:value', 'link_app')
    .column('Pathway ID')
    .column('First Name', '', 'sort')
    .column('Surname', '', 'sort')
    .column('Phone Number')
    .column('Email Address')
    .column('Applicant Type', '', 'sort', 'filter')
    .column('Certificate Selected', '', 'sort', 'filter')
    .column('Application Start Date', '', 'sort', 'timestamp')
    .column('Application Submit Date', '', 'sort', 'timestamp')
    .column('Application Complete Date', '', 'sort', 'timestamp')
    .column('Admit Decision Date', '', 'sort', 'timestamp')
    .column('Admit Decision Details', '', 'sort', 'filter')
    .column('Application Status', '', 'sort', 'filter')
    .column('Admit Period', '', 'sort', 'filter')
    .column('Endorsement Status')
    .column('Transcripts')
    .column('Application Status Progress')
    .toJSON() // needed in some cases
}

Notes

  • The return value for 'institutions' is variablized, and will only be returned in the JSON if there is at least one value
  • In the member functions that accept a list of values, the (...values) syntax is used so pass in elements one at a time as separate parameters and not as a list/array (e.g. .institutions('PW', 'BYUH', 'BYUI') not .institutions(['PW', 'BYUH', 'BYUI']))
  • Columns in the report class, when transformed to JSON, will be auto assigned an ordinal value based on the order they are added to the class. The first value will be 1, the second 2, etc.
  • Be careful to use the member functions that accept multiple parameters (e.g. contentTypes() instead of contentType()). The former will accept multiple parameters, the latter will only accept one. If you try to add multiple parameters to a function that only accepts one, it won't throw an error, but it will only use the first parameter. which is probably not what you want. You can pass only one parameter into a function that accepts multiple parameters with no problems, so it's safe to use the plural version of the function even if you only have one parameter to pass in.