Skip to content

Repository files navigation

📦 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

npm install ura-efris-commodity-category-codes

📘 Usage

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);

About

This is a package to create a searchable list of The United Nations Standard Products and Services Code (UNSCPC) codes. The goal is to make it easier to embed the full searchable list of the codes into any Javascript backend

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages