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

Function searchByDescription

pages/api/ncm/v1/index.js:4–6  ·  view source on GitHub ↗
(input, search)

Source from the content-addressed store, hash-verified

2import { getNcmData } from '@/services/sefaz';
3
4const searchByDescription = (input, search) => {
5 return String(input).toLowerCase().includes(search.toLowerCase());
6};
7
8const searchByCode = (input, search) => {
9 return input.replace(/\D/g, '').startsWith(search.replace(/[,.]/, ''));

Callers 1

getAllNcmDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected