secret-friend
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

secret-friend

Usage example

Let's suppose you have friends: Arthur, Bob, Clara

const genSecretFriends = require("secret-friend");

const friends = ["Arthur", "Bob", "Clara"];
const tuples = genSecretFriends(friends);

console.log(tuples);
/**
 * [
 *   { from: 'Arthur', to: 'Bob' }, // Arthur gives a gift to Bob
 *   { from: 'Bob', to: 'Carla' }, // Bob gives a gift to Carla
 *   { from: 'Carla', to: 'Arthur' }, // Carla gives a gift to Arthur
 * ]
 */

Readme

Keywords

none

Package Sidebar

Install

npm i secret-friend

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

165 kB

Total Files

9

Last publish

Collaborators

  • leobastiani