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

receipt-tax-codes

v1.0.1

Published

Tax code lookup data for 15+ US retailers. Find what N, X, O, T, and other tax codes mean on receipts from Walmart, Target, Costco, CVS, and more.

Downloads

20

Readme

receipt-tax-codes

Tax code lookup data for 15+ US retailers. Find what N, X, O, T, and other tax codes mean on receipts from Walmart, Target, Costco, CVS, and more.

Built by CheckoutReceipt.com — free receipt generator with 100+ store-specific templates.

Install

npm install receipt-tax-codes

Quick Start

const { lookupCode, getRetailer, searchCode } = require("receipt-tax-codes");

// What does "N" mean on a Walmart receipt?
lookupCode("walmart", "N");
// => "Non-taxable item (grocery staples, unprepared food)"

// Get all tax codes for Target
getRetailer("target");
// => { name: "Target", codes: { N: "...", X: "...", O: "...", ... } }

// What does "X" mean across all retailers?
searchCode("X");
// => [{ retailer: "walmart", name: "Walmart", meaning: "..." }, ...]

Supported Retailers

| Retailer | Key | Codes | |----------|-----|-------| | Walmart | walmart | N, X, O, T, F, H, P | | Target | target | N, X, O, F, H, A, C | | Costco | costco | A, E, N, F, A+ | | CVS Pharmacy | cvs | N, T, F, FS, H | | Kroger | kroger | N, T, X, F, MR | | Walgreens | walgreens | N, T, F, FS, H | | Home Depot | homeDepot | N, T, X | | Lowe's | lowes | N, T, X | | Amazon | amazon | N, T, X, E | | Best Buy | bestBuy | T, N, E | | Trader Joe's | traderJoes | N, T, F | | Whole Foods | wholeFoods | N, T, F, A | | ALDI | aldi | N, T, F | | Safeway / Albertsons | safeway | N, T, F, CRV | | Publix | publix | N, T, F |

API

lookupCode(retailer, code)

Returns the meaning of a specific tax code at a specific retailer, or null if not found.

lookupCode("costco", "A");
// => "Taxable at standard rate (general merchandise)"

getRetailer(retailer)

Returns the full retailer object with name and all codes, or null if not found. Handles common aliases ("home depot" resolves to "homeDepot", "albertsons" resolves to "safeway").

getRetailer("home depot");
// => { name: "Home Depot", codes: { N: "...", T: "...", X: "..." } }

getRetailers()

Returns an array of all available retailer keys.

getRetailers();
// => ["walmart", "target", "costco", "cvs", ...]

searchCode(code)

Searches across all retailers for a specific tax code and returns an array of matches.

searchCode("F");
// => [
//   { retailer: "walmart", name: "Walmart", meaning: "Food item (may be taxed at reduced rate...)" },
//   { retailer: "target", name: "Target", meaning: "Food item (reduced tax rate...)" },
//   ...
// ]

Common Tax Code Reference

| Code | General Meaning | |------|----------------| | N | Non-taxable (grocery staples, exempt items) | | X | Taxable at standard state/local rate | | T | Taxable (alias for X at some retailers) | | O | Zero-rated / tax-exempt | | F | Food (may have reduced rate) | | H | Health / pharmacy | | A | Alcohol |

Tax codes vary by state and retailer. This package provides general guidance — always check your local tax regulations for specifics.

Use Cases

  • Receipt parsing — Automatically categorize line items as taxable or exempt
  • Expense tracking — Identify tax-deductible items on receipts
  • Receipt generation — Apply correct tax codes when creating receipt templates
  • Financial tools — Build tax calculators with retailer-specific logic
  • Education — Help consumers understand their receipts

Related

License

MIT