secret-santa-matcher

1.0.0 • Public • Published

Secret Santa Matcher

Installation

npm install secret-santa-matcher or yarn add secret-santa-matcher.

API

import { match } from 'secret-santa-matcher'

match(people)

  • people: Array<string>
  • returns: Map<string=>string>

Returns a map describing the flow of present giving. Example:

match(['john', 'jane', 'dave'])

// returns Map('john' => 'dave', 'dave' => 'jane', 'jane' => 'john') // or any random permutation

Roadmap

Add support for exclusion groups, e.g. if you don't to prevent some specific persons being matched to some other specific persons ; can be useful to favor giving outside of small groups of people who know each other

Package Sidebar

Install

npm i secret-santa-matcher

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.04 kB

Total Files

4

Last publish

Collaborators

  • yannp