MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / findTussByCodeExact

Function findTussByCodeExact

services/tuss/index.js:42–49  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

40}
41
42export function findTussByCodeExact(code) {
43 const query = sanitizeCode(code);
44 const terms = getTussTerms();
45 return terms.find((item) => {
46 const itemCode = sanitizeCode(item.tuss || item.codigo || item.codigo_tuss);
47 return itemCode === query;
48 });
49}
50
51function compareAsc(a, b) {
52 if (a < b) return -1;

Callers 1

getTussDetailFunction · 0.90

Calls 2

sanitizeCodeFunction · 0.85
getTussTermsFunction · 0.85

Tested by

no test coverage detected