tfk-saksbehandling-skoleskyss-tbr

6.0.22 • Public • Published

Build Status Coverage Status js-standard-style

tfk-saksbehandling-skoleskyss-tbr

Greenkeeper badge Node-module for identifying Telemark Bilruter as transporter.

It uses a combination of zipcodes and schoolids.

Installation

From GitHub

$ git clone git@github.com:telemark/tfk-saksbehandling-skoleskyss-tbr.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.

postnummer zipcode, required

skole schoolid, required

 
'use strict';
 
var transportByTbr = require('tfk-saksbehandling-skoleskyss-tbr');
var options = {
  postnummer: 3681,
  skoleid: 3880
};
 
console.log(transportByTbr(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

/tfk-saksbehandling-skoleskyss-tbr/

    Package Sidebar

    Install

    npm i tfk-saksbehandling-skoleskyss-tbr

    Weekly Downloads

    2

    Version

    6.0.22

    License

    MIT

    Last publish

    Collaborators

    • cybermelmac
    • maccyber
    • telemark
    • zrrrzzt