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

ustaxlib

v2.1.0

Published

A library for modeling individual US tax returns.

Downloads

2

Readme

ustaxlib

CI npm version

This project provides modules for modeling the US tax system for individuals. The ustaxlib/core module provides a generic framework for defining tax return forms. And peer modules like ustaxlib/fed2019 provide forms for specific revisions/years of tax returns.

There is a peer project ustaxviewer that can render a tax return as HTML.

Core

The ustaxlib/core module provides a very simple data model for tax returns:

  • TaxReturn: An abstract class that is the root of the object graph. It holds at least one Person and several Forms.
  • Person: A person for whom the TaxReturn is being computed.
  • Form: An abstract class that represents a single form in the tax system. Holds one or more Lines. Forms optionally take an input object, the values of which are typically exposed by an InputLine.
  • Line: An abstract class, with several concrete subclasses provided by core, that corresponds to a single line on a tax system form. A Line's parametrized type corresponds to the type of value that is computed by it. Examples are:
    • ComputedLine: Uses a function to produce a value.
    • ReferenceLine: Returns the value of a specific line of a Form.
    • InputLine: Returns the value of a Form's input.
    • AccumulatorLine: Some Forms can have multiple instances in a TaxReturn, and this line sums a specific line for all instances of that form type.

The core module provides what is effectively a specialized spreadsheet. Rather than sheets and rows, there are forms and lines. A TaxReturn provides a way to find forms by their type, and a Form provides access to the values computed by Lines.

Models

Currently ustaxlib supports the following models:

Getting Started

To start using the software, create a new, private NPM project, and install the necessary dependencies. This will also install the HTML viewer. Then copy an example file and run the viewer with it.

mkdir taxes && cd taxes
echo '{"private":true}' > package.json
npm i ts-node typescript ustaxlib ustaxviewer
cp node_modules/ustaxlib/examples/fed2019.ts .
npx ustaxviewer fed2019.ts

Contributing

Contributions to address bugs and not-supported forms or situations are welcome. Only forms for individuals are accepted (no estates, trusts, businesses, etc.). Please include tests with your contribution and keep your commit history clean.

Issues should be filed on GitHub.

Anticipated Answers

Why?

This project can be used to check the values produced by other tax software, to model expected tax liability throughout the year, or to learn about the US tax system.

Should I use this to file my own tax returns?

Please, heck no. There are guaranteed to be bugs in this software. The models do not support every situation, and many more complex parts of forms are not implemented. This software is provided with no warranty. There is no wizard/interview system; it is expected that you use the instructions on the IRS website to set up and input data into the forms.

How well does it work?

I have run my personal income tax information through the fed2019 model and received identical results to the commercial tax prep software I'm using to actually file my tax returns. My situation is moderately complex, and it exercises most of the forms in the fed2019 module. Your results may vary.