6.0.7 • Published 7 months ago

rostertool v6.0.7

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
7 months ago

Rotating Roster Tool

Installation

	npm i rostertool

Usage

Setup

Use with default setup (Curragh Mine)

	import Roster from 'rostertool';

Use constructor with custom dataset

	import { RosterToolConstructor } from 'rostertool';
	import { Data as rostertoolData } from 'rostertool/data/curragh';
	const Roster = new RosterToolConstructor(rostertoolData);

Using Roster.run()

Roster.run() is used to find out what shift a given crew is rostered on a given day.

	//Roster.run(crew, date[, output])

	// What shift is F crew on today?
	Roster.run("F", new Date());

	// Same information, but with custom outputs for D/N/O
	Roster.run("F", new Date(), {O: `day off`, D: `day shift`, N: `night shift`});

Where a custom output has not been defined in the object, the default string from the dataset pattern will be used.
The built-in dataset only uses D (dayshift), N (nightshift), A (afternoon shift) and O (not rostered). However technically any string could be returned by the dataset pattern.

Custom Datasets

Built-in

  • rostertool/data/curragh
6.0.7

7 months ago

6.0.6

10 months ago

6.0.5

3 years ago

6.0.1

3 years ago

6.0.0

3 years ago

6.0.3

3 years ago

6.0.2

3 years ago

6.0.4

3 years ago

5.1.4

3 years ago

5.1.3

3 years ago

5.1.2

4 years ago

5.1.1

4 years ago

5.1.0

4 years ago

5.1.0-beta.23

4 years ago

5.1.0-beta.24

4 years ago

5.1.0-beta.21

4 years ago

5.1.0-beta.22

4 years ago

5.1.0-beta.20

4 years ago

5.1.0-beta.19

4 years ago

5.1.0-beta.18

4 years ago

5.1.0-beta.17

4 years ago

5.1.0-beta.15

4 years ago

5.1.0-beta.16

4 years ago

5.1.0-beta.14

4 years ago

5.1.0-beta.13

4 years ago

5.1.0-beta.12

4 years ago

5.1.0-beta.11

4 years ago

5.1.0-beta.7

4 years ago

5.1.0-beta.8

4 years ago

5.1.0-beta.9

4 years ago

5.1.0-beta.5

4 years ago

5.1.0-beta.6

4 years ago

5.1.0-beta.4

4 years ago

5.1.0-beta.3

4 years ago

5.1.0-beta.1

4 years ago

5.1.0-beta.2

4 years ago

5.0.4

4 years ago

5.0.3

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago