tfk-saksbehandling-skoleskyss-fara
v4.1.3
Published
Checks if FARA is transporter
Downloads
57
Readme
tfk-saksbehandling-skoleskyss-fara
Node-module for identifying FARA as transporter.
It uses a combination of zipcodes and schoolids.
Installation
From GitHub
$ git clone [email protected]:telemark/tfk-saksbehandling-skoleskyss-fara.git
cd into the directory and run the setup script
$ npm run setup
This will install the module dependencies and generate the zipcode files
Usage
Pass in an options object and get true or false in return.
gatenavn street name, required
husnummer street number, required
postnummer zipcode, required
skole schoolid, required
'use strict'
const transportByFara = require('tfk-saksbehandling-skoleskyss-fara');
const options = {
gatenavn: 'Kongsbergvegen',
husnummer: '79',
postnummer: 3681,
skoleid: 3880
}
console.log(transportByFara(options)) //Returns true
The logic is explained in the docs/rules.md
The complete list of schoolids is in lib/data/skoleliste_full.json
Test
$ npm test