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

equity-report-api

v0.0.1

Published

Equity Report 2019 Typescript API

Readme

Equity Report API

Equity Report 2019 Typescript API

Usage

Installation

# using ssh
git clone [email protected]:SpacebarTech/equity-report-api

# using https
git clone https://github.com/SpacebarTech/equity-report-api.git

Contributing

Folder structure

.vscode/
  settings.json      # disable Jest, use [email protected], etc.
  snippets.code-snippets # project snippets.
bin/                 # nodejs bin scripts.
  nu.js              # bin script to create all the things.
src/                 # all project files.
  controllers/       # route logic ONLY
    {entity}/        # PLURAL; e.g. users, panes, etc.
      {verb}/        # LOWERCASE; get, put, post, patch, delete, etc.
        router.ts    # the router itself.
        validator.ts # the validator for a specific verb's router.
  helpers/           # helper functions and enums, not including type defs.
    enums/           # enums go here.
    executeSproc.ts  # the primary function of executing sprocs.
  lib/               # business logic goes here.
    {entity}/        # SINGULAR; logic for specific entity (e.g. user, pane, etc.)
      repo.ts        # the primary method of hitting a sproc for a given entity.
      service.ts     # calls repo method and transforms it for frontend.
  index.ts           # the entry-point of the project.
  server.ts          # server logic itself.
.editorconfig
.gitignore
.nvmrc
nodemon.json
README.md
package.json
tsconfig.json
tslint.json

Path mapping

In Typescript, you can map paths in order to avoid the use of ../../../../ all over the place in your code. Each folder in src has a map as specified in the tsconfig.json. So instead of writing

// src/lib/user/service.ts

import myHelperFunction from '../../helpers/myHelperFunction';

You would now write

import myHelperFunction from 'helpers/myHelperFunction';

nu

There's an available bin script called nu (pronounced "new"). Executing this command will make a new entity folder, with a repo and a service file, as well as will make all necessary routers and validators.

nu <NAME>

Files generated:
/src/controllers/<NAME>/get/router.ts
/src/controllers/<NAME>/get/validator.ts
# remaining routers for other http verbs
/src/lib/<NAME>/repo.ts
/src/lib/<NAME>/service.ts

You can get access to this script by running the following:

chmod +x bin/nu.js && npm link

Notes

This project utilizes stored procedures (or "sprocs" for short). Stored procedures remove most, if not all, compiling overhead from queries as they are stored directly in the database. Because of this, ObjectionJS and Knex cannot be used as there will be no need to perform SQL queries from the API.

Instead, an executeSproc (or similarly named) function will be called to execute a specific query.

Due to the nature of sprocs and using a production database, tests may not be written for this project.