@xituru/round-robin

1.0.2 • Public • Published

Round Robin

npm package version number Actions Status License

Round robin match scheduler

  • [x] No limitation in numbers
  • [x] Each contestant meets every other participant

Installation

NPM

$ npm install @xituru/round-robin

Yarn

$ yarn add @xituru/round-robin

Browser via CDN

<script src="https://unpkg.com/@xituru/round-robin"></script>

Usage

Node.js

const { RoundRobin } = require('@xituru/round-robin')

const schedule = RoundRobin(['P1', 'P2', 'P3', 'P4'])

ES6

import { RoundRobin } from '@xituru/round-robin'

const schedule = RoundRobin(['P1', 'P2', 'P3', 'P4'])

TS

import { RoundRobin } from '@xituru/round-robin'

const schedule: [string, string][] = RoundRobin<string>(['P1', 'P2', 'P3', 'P4'])

Browser

Install using CDN

<script>
  const schedule = window.RoundRobin(['P1', 'P2', 'P3', 'P4'])
</script>

Package Sidebar

Install

npm i @xituru/round-robin

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

8.21 kB

Total Files

10

Last publish

Collaborators

  • zdumb