UNPKG

ura-efris-commodity-category-codes

Version:

The search helper for searching codes for the United Nations Standard Products and Services Code (UNSPSC) used in the Uganda Revenue Authority (URA) Electronic Fiscal Receipting and Invoicing System (EFRIS).

43 lines (27 loc) โ€ข 992 B
# ๐Ÿ“ฆ URA EFRIS Commodity Category Codes Dictionary Search A fast and efficient Node.js utility for fuzzy searching and matching the UNSPSC codes also used in the URA EFRIS products configurations. --- ## ๐Ÿš€ Features - ๐Ÿ” Fuzzy string matching on `commodityName` using Fuse.js - ๐Ÿ”ข Closest numeric match on `commodityCode` - ๐ŸŽฏ Returns top 20 relevant, unique results - โšก Fast and lightweight โ€“ designed to handle the large dataset - ๐Ÿงช Fully tested with Mocha & Chai --- ## ๐Ÿ“ฆ Installation ```bash npm install ura-efris-commodity-category-codes ``` --- ## ๐Ÿ“˜ Usage ```js const { searchDictionary } = require("ura-efris-commodity-category-codes"); // Search by name (fuzzy string match) const resultsByName = searchDictionary("cats"); // Search by commodity code (closest numeric match) const resultsByCode = searchDictionary(10101500); // Optional: limit results (default is 20) const top5 = searchDictionary("dogs", 5); console.log(resultsByName); ``` ---