Skip to content

cityssm/node-ncic-lookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NCIC Lookup

npm (scoped) DeepSource Maintainability codecov

Lookups and helper functions for FBI National Crime and Information Center (NCIC) codes.

Built using the XSD file from the National Information Exchange Model (NEIM) 5.2.

Note that the City of Sault Ste. Marie is using this information for vehicle related lookups in the Parking Ticket System, however other lookups are available and are included to increase the reusability of this package. See the codeTypes.json file for all of the lookups available.

Installation

npm install @cityssm/ncic-lookup

Usage

import * as ncicLookup from '@cityssm/ncic-lookup'

const codeTypes = await ncicLookup.getCodeTypes()
console.log(Object.keys(codeTypes))
// ["ABRA", "ADD", "Aircraft", ..., "VOW", "VPC", "VST"]

console.log(await ncicLookup.getFieldValueDescription('VMA', 'GMC'))
// "GENERAL MOTORS CORP."

console.log(await ncicLookup.vmaHelpers.getNhtsaCompatibleMake('CHEV'))
// "CHEVROLET"